/* App pages from wrongway.ca (Glyph, Veil, Leyline)
   Built from the wrongway.ca brand kit. Night is the default; Day follows a
   light system preference. App icons always sit on a void plate.
   All CSS lives here: the Content-Security-Policy allows no inline styles. */

/* ---------- Font: Manrope, self-hosted (SIL OFL 1.1, /fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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;
}

/* ---------- Tokens (brand kit) ---------- */
:root {
  --void: #031B14;
  --forest: #0D281F;
  --stone: #3B403C;
  --mist: #A49F93;
  --fog: #F1EFE9;
  --fog-deep: #E6E3DB;
  --emerald: #19F267;
  --emerald-ink: #17683C;

  /* Night (default) */
  --ground: var(--void);
  --ink: var(--fog);
  --ink-muted: var(--mist);
  --line: var(--emerald);
  --link: var(--emerald);
  --on-line: var(--void);
  --hairline: rgba(241, 239, 233, 0.14);
  --focus: var(--emerald);
  color-scheme: dark;

  --font-display: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --gutter: max(16px, min(5vw, 64px));
  --measure: 60ch;

  --route-weight: 0.035em;
  --route-gap: 0.2em;
  --route-rise: 0.16em;
  --route-short: 1.4em;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: var(--fog);
    --ink: var(--void);
    --ink-muted: var(--stone);
    --line: var(--emerald-ink);
    --link: var(--emerald-ink);
    --on-line: var(--fog);
    --hairline: rgba(3, 27, 20, 0.14);
    --focus: var(--emerald-ink);
    color-scheme: light;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 27px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1 { text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
::selection { background: var(--line); color: var(--on-line); }

.container {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  left: var(--space-16);
  top: -100px;
  z-index: 10;
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--ground);
  font-weight: 600;
}
.skip:focus { top: var(--space-16); }

/* ---------- Header: the app, small; the other language ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-block: var(--space-24);
}
.home {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
}
.home img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--void);
}
.lang {
  font-size: 15px;
  line-height: 20px;
  color: var(--ink);
}

/* ---------- The app: a plate, a name, a line, a few words ---------- */
.app {
  flex: 1 0 auto;
  display: grid;
  align-content: center;
  padding-block: clamp(32px, 8vh, 96px);
}
.app-plate {
  width: clamp(120px, 22vw, 176px);
  aspect-ratio: 1;
  margin-bottom: var(--space-32);
  border-radius: var(--radius-lg);
  background: var(--void);
  overflow: hidden;
}
.app-plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
.status {
  margin-bottom: var(--space-12);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  color: var(--ink-muted);
}
.app-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 11vw, 112px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.app-line {
  max-width: 28ch;
  margin-top: var(--space-24);
  font-family: var(--font-display);
  font-size: clamp(22px, 1.2rem + 1vw, 30px);
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
}
.app-desc {
  max-width: var(--measure);
  margin-top: var(--space-16);
  color: var(--ink-muted);
}
.curious {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12) var(--space-24);
  margin-top: var(--space-48);
  color: var(--ink-muted);
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-8) var(--space-16);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  color: var(--on-line);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }

/* ---------- Footer: where it comes from ---------- */
.site-footer {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-24) var(--space-48);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-muted);
}
.site-footer a { color: var(--ink); }

/* "Glyph · a wrongway.ca app" and the short straight line (kit: Endorsement) */
.endorse {
  --w: max(1.5px, var(--route-weight));
  display: flex;
  align-items: baseline;
  margin-bottom: var(--space-8);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  color: var(--ink);
}
.endorse b { font-weight: 700; letter-spacing: -0.005em; }
.endorse .route {
  flex: none;
  width: var(--route-short);
  height: 2px;
  margin-left: var(--route-gap);
  border-radius: 999px;
  background: var(--line);
  position: relative;
  top: calc(1px - var(--route-rise));
}

/* ---------- Not found ---------- */
.lost {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-content: center;
  gap: var(--space-48);
  padding-block: var(--space-64);
}
.lost h1, .lost h2 {
  margin: 0 0 var(--space-16);
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lost p + p { margin-top: var(--space-24); }

/* Nothing moves: hover changes are instant. */
