/* Wesleyan Revivals — see ../../design-system/DESIGN-GUIDE.md
   Paper layer carries the words; the game layer appears exactly three times. */

@font-face {
  font-family: 'EB Garamond';
  src: url('../fonts/ebgaramond-subset.woff2') format('woff2');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

/* Poppins SemiBold is I AM LOGOS's own heading face (iamlogos.ai).
   It is used here only in the game layer, never for the historic prose. */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-600-subset.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paper layer — chosen here, no brand source. */
  --paper: #faf6ee;
  --paper-deep: #f2ece0;
  --ink: #1f1c17;
  --ink-soft: #4a443a;
  --rule: #d9d0bd;

  /* Game layer — measured off iamlogos.ai, 2 Nov 2026. */
  --navy: #0b1321;      /* the IAL site's own page ground */
  --navy-deep: #060b14;  /* footer, one step down */
  --surface: #343d4d;    /* IAL card surface */
  --aqua: #8cefe9;       /* the IAL accent */
  --slate: #8b95a6;      /* IAL secondary text on dark */
  --teal-ink: #0e6b66;   /* derived: aqua dark enough to read on paper */

  --font-display: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-game: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --measure: 34rem;
  --column: min(100% - 2.5rem, 62rem);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--teal-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: var(--column); margin-inline: auto; }
.prose { max-width: var(--measure); }
.lead {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 30rem;
}

/* Skip link ------------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* Sections -------------------------------------------------------------- */
section { padding-block: clamp(3rem, 9vw, 6rem); }

.rule { display: block; width: 100%; height: 14px; color: var(--rule); margin-block: 0; }

/* Hero: split. The engraving at full strength on one side, the words on
   plain paper on the other.
   History: the picture was first a capped, cropped plate above the title.
   Sizing it by max-height with object-fit: cover turned a 1.53:1 engraving
   into a 2.6:1 letterbox strip at 1920x1080, and every attempt to make it
   bigger fought the rule keeping the call to action above the fold. The
   split removes the conflict: the image gets a whole column, nothing is
   dimmed, and no text sits on the picture, so there is no contrast to
   manage. Measured 39% of the first screen at 1440x900, CTA at 467px. */
.hero { padding: 0; overflow: hidden; }

.hero__textcol {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__intro {
  max-width: 34rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem) 0;
}
.hero__intro .lead { max-width: 30rem; }

.hero__pic { min-height: clamp(260px, 46vh, 440px); }
.hero__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 28%;
  filter: grayscale(0.9) contrast(1.06) sepia(0.12);
}

.hero__credit {
  margin: 0;
  padding: 0.9rem clamp(1.25rem, 4vw, 3.5rem) clamp(2rem, 4vw, 2.6rem);
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 34rem;
}

/* Stacked, the credit would sit above the picture it describes. Let the
   text column dissolve so the three parts can be ordered directly. */
@media (max-width: 859px) {
  .hero { display: flex; flex-direction: column; }
  .hero__textcol { display: contents; }
  .hero__intro { order: 1; }
  /* min-height on the column plus height:100% on the image left a gap: the
     percentage height has nothing to resolve against, so the image fell back
     to its natural size inside a taller box. Stacked, let it size itself. */
  .hero__pic { order: 2; min-height: 0; }
  .hero__pic img { height: auto; }
  .hero__credit { order: 3; padding-top: 0.9rem; }
}

@media (min-width: 860px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: stretch;
  }
  .hero__pic { min-height: min(76vh, 680px); }
  .hero__intro { padding-right: clamp(2rem, 5vw, 4rem); }
}

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

/* Game layer, use 1 of 3: the primary action. */
.btn--play {
  background: var(--teal-ink);
  color: #fff;
  font-family: var(--font-game);
  box-shadow: 0 2px 0 rgba(11, 19, 33, 0.22), 0 10px 24px -14px var(--teal-ink);
}
.btn--play:hover { transform: translateY(-1px); box-shadow: 0 3px 0 rgba(31,28,23,.18), 0 16px 30px -14px var(--aqua); }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-game);
  border: 1px solid var(--rule);
}
.btn--quiet:hover { border-color: var(--ink-soft); }

.btn--onnight {
  background: var(--aqua);
  color: var(--navy);
  font-family: var(--font-game);
}
.btn--onnight:hover { transform: translateY(-1px); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }

/* Visible placeholder. Deliberately loud: it must not survive to launch.
   Delete every .todo along with this rule once the links land. */
.todo {
  display: inline-block;
  background: repeating-linear-gradient(45deg, #ffe9a8, #ffe9a8 8px, #ffdf84 8px, #ffdf84 16px);
  color: #4a3a00;
  border: 1px dashed #a3791a;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Eyebrow. Also lost with the old hero block. */
.eyebrow {
  font-family: var(--font-game);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

/* Plate: an engraving with a sketched corner frame.
   These rules were deleted along with the old hero block; the About portrait
   still uses them, so without .plate__img{position:relative} the absolutely
   positioned frame escaped its wrapper and the brackets floated free of the
   picture. The frame sits a few pixels proud of the image, like a mount. */
.plate { margin: 0; }

/* The About portrait was rendering about 349px wide on desktop and filling
   the column on a phone, which read as oversized next to the prose. Capped
   roughly 30% smaller and centred in its column. */
.plate--portrait { max-width: 15rem; margin-inline: auto; }
@media (max-width: 719px) {
  .plate--portrait { max-width: 13.5rem; }
}

.plate__img {
  position: relative;
  padding: 7px;
  display: block;
}
.plate__img img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.9) contrast(1.08) sepia(0.12);
}
.plate__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--rule);
  pointer-events: none;
}

.caption {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0.8rem 0 0;
  max-width: 30rem;
}

/* About ----------------------------------------------------------------- */
.about__grid { display: grid; gap: clamp(2rem, 5vw, 3rem); }
@media (min-width: 720px) {
  .about__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

.collection {
  background: var(--paper-deep);
  border-left: 3px solid var(--teal-ink);
  padding: 1.4rem 1.6rem;
  border-radius: 0 6px 6px 0;
  margin-top: 2rem;
}
.collection h3 { margin-bottom: 0.3rem; font-family: var(--font-body); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.collection p:last-child { margin-bottom: 0; }
.collection strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }

/* Game band — use 2 of 3 ------------------------------------------------- */
.band {
  background: var(--navy);
  color: #fff;
}
.band h2 { color: #fff; font-family: var(--font-game); font-weight: 600; letter-spacing: -0.02em; }
.band p { color: #d7dee8; }
.band a:not(.btn) { color: var(--aqua); }

.band__grid { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: center; }
@media (min-width: 720px) { .band__grid { grid-template-columns: 1.3fr 1fr; } }

.steps { list-style: none; counter-reset: s; margin: 1.6rem 0 0; padding: 0; max-width: var(--measure); }
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1rem;
  color: #d7dee8;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0.05em;
  width: 1.8rem; height: 1.8rem;
  display: grid; place-items: center;
  border: 1px solid rgba(140, 239, 233, 0.35);
  border-radius: 6px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--aqua);
}

/* Letter tiles — use 3 of 3 ---------------------------------------------- */
/* Hex tiles. The game's own tiles are hexagons, not squares. */
.tiles { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }
.tile {
  position: relative;
  width: 58px; height: 52px;
  display: grid; place-items: center;
  color: var(--aqua);
}
.tile svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile b {
  position: relative;
  font-family: var(--font-game);
  font-size: 1.1rem; font-weight: 600;
  color: #fff;
}

/* The CODE-X wordmark above the tiles. White-on-transparent, so dark grounds only. */
.band__logo { width: 190px; margin: 0 auto 1.4rem; display: block; }

/* Feedback: the closing ask. The copy stays short, but the section owns a
   full band so the request is unmissable rather than a footnote above the
   footer. Paper-toned on purpose: the game layer already has its three uses
   (primary button, dark band, tiles) and a fourth would dilute all of them. */
.feedback {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  text-align: center;
  padding-block: clamp(3.4rem, 9vw, 5.5rem);
}
.feedback__in { max-width: 40rem; margin-inline: auto; }
.feedback h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 0.3rem; }
.feedback p { margin-inline: auto; color: var(--ink-soft); font-size: 1.0625rem; }
.feedback .actions, .feedback .btn { margin-top: 1.6rem; }
.feedback__note {
  font-size: 0.8125rem; color: var(--ink-soft);
  margin: 1rem auto 0; opacity: .85;
}
.btn--big {
  min-height: 58px;
  padding: 1rem 2.4rem;
  font-size: 1.0625rem;
  border-radius: 12px;
}

/* Footer ---------------------------------------------------------------- */
footer {
  background: var(--navy-deep);
  color: var(--slate);
  padding-block: 3rem;
  font-size: 0.875rem;
}
footer a { color: var(--aqua); }
footer .mark { width: 150px; height: auto; margin-bottom: 1.4rem; }
footer p { max-width: 36rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:hover { transform: none; }
}

/* ===== PREVIEW SWITCHER ====================================================
   Review tool, not production. Delete this block and the matching markup in
   index.html / b.html before launch. See README.md.
   ========================================================================= */
/* Clearance so the fixed switcher never covers the end of the page.
   Lives in this block so removing the switcher removes it too. */
body { padding-bottom: 5.5rem; }

.switch {
  position: fixed;
  /* Bottom-RIGHT, not centre: centred it sat straight on top of the centred
     "Give feedback" call to action. */
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.4rem 0.3rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 6px 24px -8px rgba(31, 28, 23, 0.35);
  font-family: var(--font-game);
}
.switch__label {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 0.15rem;
}
.switch__opt {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.switch__opt:hover { color: var(--ink); background: var(--paper-deep); }
.switch__opt.is-on { background: var(--teal-ink); color: #fff; }
