/* Armada launch preview: home page of tiles. One screen, no scroll, on anything from a
   phone to a wide monitor. Colours sampled from "Armada Portal Page Design.jpg" (24 Sep).
   Also styles the code-entry page (index.html) so the gate and the home read as one page.

   Face: Nunito Sans, self-hosted (SIL OFL 1.1, fonts/OFL-nunito-sans.txt). The mockup was set
   in Avenir, which is Apple-only and has no free web licence; Nunito Sans is the closest open
   face and renders the same on every device. Variable font, one file per subset (28 Sep). */

@font-face {
  font-family: "Nunito Sans"; font-style: normal; font-weight: 300 700; font-stretch: 100%; font-display: swap;
  src: url("/fonts/nunito-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito Sans"; font-style: normal; font-weight: 300 700; font-stretch: 100%; font-display: swap;
  src: url("/fonts/nunito-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sky: #8DB2DC;
  --tile: #D9E7F4;
  --tile-hover: #EEF4FA;
  --ink: #1C2530;
  --black: #000000;
  --face: "Nunito Sans", "Avenir", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5.5rem);
  --gap-x: clamp(.75rem, 2.2vw, 2rem);
  --gap-y: clamp(.5rem, 2.3vh, 1.3rem);
  --tile-w: clamp(11rem, 21vw, 19.5rem);   /* 11rem floor: three columns fit down to the 40rem phone breakpoint */
  --tile-h: clamp(2.6rem, 6.6vh, 3.8rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--sky); color: var(--ink); font-family: var(--face);
  display: grid; grid-template-rows: auto 1fr auto;
}
a { color: inherit; text-decoration: none; }

.top { padding: clamp(1.5rem, 9vh, 5.5rem) var(--pad) 0; }
.mark { display: block; height: clamp(1.6rem, 5.2vh, 2.9rem); width: auto; filter: brightness(0); }

main { display: grid; align-content: center; }
/* Three columns, each its own list (8 Oct 2026, Zach's order): Armada left, The Reserve
   middle, The Glade right. Separate lists so a tile hidden from sales (data-citadel) only closes up its
   own column and never shifts the other. */
.tiles {
  margin: 0; padding: clamp(2.5rem, 9vh, 6rem) var(--pad) clamp(1.5rem, 6vh, 4rem);
  align-self: center; justify-content: center; align-items: start;
  display: grid; grid-template-columns: repeat(3, var(--tile-w)); gap: var(--gap-y) var(--gap-x);
}
.tiles ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap-y); }
.tiles a {
  display: flex; align-items: center; justify-content: center; text-align: center;
  height: var(--tile-h); padding: 0 1rem; background: var(--tile);
  font-size: clamp(.95rem, min(1.65vw, 2.7vh), 1.5rem); font-weight: 400; letter-spacing: .01em; line-height: 1.1;
  transition: background-color .2s ease;
}
.tiles a:hover, .tiles a:focus-visible { background: var(--tile-hover); outline: none; }
.tiles a:focus-visible { box-shadow: 0 0 0 2px var(--ink); }

.foot { display: flex; justify-content: flex-end; padding: 0 var(--pad) clamp(1.25rem, 10vh, 5.5rem); }
.prow { display: block; height: clamp(1.75rem, 7vh, 4rem); width: auto; }

/* Code-entry page: one tile-width column, centred, same ground, face and tile colour. */
.gate { display: grid; place-items: center; padding: 0 var(--pad); }
.gate form { width: min(100%, calc(var(--tile-w) * 1.15)); display: grid; gap: var(--gap-y); text-align: center; }
.gate h1 { margin: 0 0 .35rem; font-size: clamp(1.25rem, min(2.2vw, 3.4vh), 1.9rem); font-weight: 400; letter-spacing: .01em; line-height: 1.15; }
.gate .lede { margin: 0 0 clamp(.5rem, 2vh, 1.25rem); font-size: clamp(.9rem, min(1.2vw, 2vh), 1.05rem); line-height: 1.4; }
.gate label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gate input[type="text"] {
  width: 100%; height: var(--tile-h); padding: 0 1rem; border: 0; border-radius: 0; background: var(--tile); color: var(--ink);
  font: 400 clamp(1.1rem, min(1.9vw, 3vh), 1.6rem)/1 var(--face); letter-spacing: .3em; text-transform: uppercase; text-align: center;
  outline: none; -webkit-appearance: none; appearance: none;
}
.gate input[type="text"]::placeholder { color: #7D8EA0; letter-spacing: .12em; text-transform: none; }
.gate input[type="text"]:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.gate button {
  height: var(--tile-h); border: 0; border-radius: 0; cursor: pointer; background: var(--ink); color: var(--tile);
  font: 400 clamp(.95rem, min(1.4vw, 2.4vh), 1.25rem)/1 var(--face); letter-spacing: .02em; transition: background-color .2s ease;
}
.gate button:hover, .gate button:focus-visible { background: #33414F; outline: none; }
.gate .error { margin: 0; font-size: .95rem; color: #6B1E14; }
.gate .error:empty { display: none; }

/* Phones: one column, the prow moves up beside the name so the whole page is the logo row
   plus nine tiles. Sizes key to the visible height (dvh: excludes the browser bars). */
@media (max-width: 40rem) {
  :root {
    --pad: 1.25rem;
    --tile-h: clamp(2.05rem, 5.1vh, 3rem); --gap-y: clamp(.3rem, 1.1vh, .65rem);
  }
  @supports (height: 1dvh) {
    :root { --tile-h: clamp(2.05rem, 5.1dvh, 3rem); --gap-y: clamp(.3rem, 1.1dvh, .65rem); }
  }
  body { grid-template-rows: auto 1fr; }
  .top { display: flex; align-items: center; justify-content: space-between; padding-top: clamp(1.25rem, 4vh, 2.5rem); }
  .mark { height: clamp(1.4rem, 4vh, 1.9rem); }
  .foot { position: absolute; top: clamp(1.25rem, 4vh, 2.5rem); right: var(--pad); padding: 0; }
  .prow { height: clamp(1.4rem, 4vh, 1.9rem); }
  .tiles { grid-template-columns: minmax(0, 20rem); padding-top: clamp(1.25rem, 5vh, 3.5rem); padding-bottom: clamp(.75rem, 2.5vh, 2rem); }
  .tiles a { font-size: clamp(.95rem, 2.1vh, 1.1rem); }
  .gate form { width: min(100%, 20rem); }
}
