/* ===========================================================================
   Amos — myamos.world
   Palette lifted straight from the game's own UI (scripts/classroom_board.gd
   and the dialogue panel), so the site and the game look like one thing:

     slate    #1A2B21   the chalkboard ground
     ink      #0B120E   deeper than slate, for the page floor
     chalk    #EDEBDE   body text
     cream    #FAF0D9   headings
     gold     #FFD973   the accent -- the same gold as the quest marker
     green    #9ED9A8   secondary accent, the chalkboard's labels
     frame    #5C4029   the chalkboard's wooden frame
     night    #6B759E   the night tint the courtyard uses
   =========================================================================== */

:root {
  --slate:  #1a2b21;
  --ink:    #0b120e;
  --ink-2:  #101a14;
  --chalk:  #edebde;
  --cream:  #faf0d9;
  --gold:   #ffd973;
  --green:  #9ed9a8;
  --frame:  #5c4029;
  --night:  #6b759e;

  --dim:    rgba(237, 235, 222, 0.62);
  --hair:   rgba(237, 235, 222, 0.14);

  --serif:  "Fraunces", Georgia, "Times New Roman", serif;
  --sans:   "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --page:   1120px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Pixel art must never be smoothed by the browser. */
.sprite, .building, .tram, .jan__portrait, .pairs__art, .foot__street img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

h1, h2, h3 { font-family: var(--serif); color: var(--cream); line-height: 1.12; margin: 0 0 .5em; }
p { margin: 0 0 1.1em; }
strong { color: var(--cream); font-weight: 600; }
em { font-style: italic; }

.sr-only, .skip {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; top: 12px; left: 12px; z-index: 99;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 10px 16px; background: var(--gold); color: var(--ink);
  border-radius: 8px; font-weight: 600;
}

/* ------------------------------- HERO ------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #24382c 0%, var(--slate) 42%, var(--ink) 100%);
  border-bottom: 3px solid var(--frame);
  padding-bottom: clamp(40px, 9vw, 96px);
}

/* A soft lamp-glow behind the headline, the colour of the quest marker. */
.hero__glow {
  position: absolute; inset: -30% 10% auto 10%; height: 70vh;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 217, 115, .13), transparent 70%);
  pointer-events: none;
}

.nav {
  position: relative;
  max-width: var(--page); margin: 0 auto;
  padding: 26px var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* Jan stands next to his own name at the top of the page. */
.brand { display: flex; align-items: center; gap: 12px; }
.brand__jan {
  height: 92px; width: auto; flex: none;
  image-rendering: pixelated; image-rendering: crisp-edges;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .55));
}

.wordmark {
  font-family: var(--serif); font-weight: 800; font-size: 34px;
  color: var(--cream); letter-spacing: .5px;
}
.wordmark--sm { font-size: 19px; }

/* Said plainly and near the name, so nobody reads this page as a shipped
   product. Repeated in the status line under the lede. */
.wip {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(255, 217, 115, .4);
  border-radius: 999px; padding: 4px 10px;
  white-space: nowrap;
}
.nav__domain { color: var(--dim); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }

.hero__inner {
  position: relative;
  max-width: var(--page); margin: 0 auto;
  padding: clamp(36px, 7vw, 76px) var(--gutter) 0;
}

.eyebrow {
  color: var(--green); font-size: 13.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; margin-bottom: 18px;
}

h1 {
  font-size: clamp(33px, 5.2vw, 55px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 22px;
  max-width: 26ch;
}
h1 em { color: var(--gold); font-style: italic; }

.lede {
  max-width: 54ch;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--dim);
}

/* Deliberately NOT a flex container: the content is one sentence with a
   <strong> in the middle, and flex turns each text run into its own column
   the moment it has to wrap. Inline-block + an inline dot wraps like prose. */
.first-course {
  display: inline-block;
  margin: 4px 0 30px;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  font-size: 15px; color: var(--dim);
}
.first-course strong { color: var(--green); }
.dot {
  display: inline-block; vertical-align: middle;
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 9px; position: relative; top: -1px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(158, 217, 168, .16);
}

/* Sits under the status pill: who this is for, in one line, before the
   reader has to decide whether it is for them. */
.audience {
  max-width: 52ch;
  margin: -16px 0 16px;
  font-size: 15.5px;
  color: var(--dim);
  border-left: 2px solid rgba(158, 217, 168, .45);
  padding-left: 14px;
}

/* The second promise, in the gold accent so it reads as a flourish rather
   than another qualifier. */
.culture {
  max-width: 52ch;
  margin: 0 0 30px;
  font-size: 15.5px;
  color: var(--dim);
  border-left: 2px solid rgba(255, 217, 115, .5);
  padding-left: 14px;
}
.culture em, .culture strong { color: var(--gold); }

.cta {
  display: inline-block;
  background: var(--gold); color: #1c1503;
  font-weight: 600; font-size: 16.5px;
  padding: 15px 30px; border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 0 #c9a23f, 0 12px 26px rgba(0, 0, 0, .45);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover { transform: translateY(2px); box-shadow: 0 4px 0 #c9a23f, 0 8px 18px rgba(0, 0, 0, .45); }
.cta:active { transform: translateY(6px); box-shadow: 0 0 0 #c9a23f; }
.cta:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* The cast standing along the bottom of the hero, as if on a street:
   neighbours left, the ones who come to you right, and the two players you
   can actually BE in the middle, lit. */
.hero__cast {
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(16px, 4vw, 44px);
  margin-top: clamp(38px, 7vw, 70px);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--hair);
}
.cast__side, .cast__you { display: flex; align-items: flex-end; }
.cast__side { gap: clamp(14px, 3vw, 34px); }

.cast__you {
  position: relative;
  gap: clamp(8px, 1.6vw, 16px);
  padding: 0 clamp(14px, 3vw, 30px);
}
/* A pool of lamplight under the pair, so the middle reads as "you". */
.cast__you::before {
  content: ""; position: absolute; inset: auto 0 -6px 0; height: 78%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(255, 217, 115, .16), transparent 72%);
  pointer-events: none;
}
.cast__you > * { position: relative; }

.sprite { height: var(--h); width: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.cast__side .sprite { opacity: .9; }
.sprite--you { filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .55)); }

/* --------------------------------- MAPS ---------------------------------- */

.maps__lede { color: var(--dim); margin-top: -12px; margin-bottom: 26px; }

.tabs__bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab {
  font: inherit; font-size: 15px; font-weight: 500;
  color: var(--dim); background: rgba(0, 0, 0, .3);
  border: 1px solid var(--hair); border-radius: 999px;
  padding: 9px 18px; cursor: pointer;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.tab:hover { color: var(--cream); border-color: rgba(237, 235, 222, .3); }
.tab[aria-selected="true"] {
  background: var(--gold); color: #1c1503; border-color: var(--gold); font-weight: 600;
}
.tab:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.panel img {
  width: 100%; height: auto;
  border-radius: 14px; border: 3px solid var(--frame);
  background: var(--slate);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .5);
}
/* Panels are plain blocks until the script hides the inactive ones, so the
   content is all there with JS off. */
.panel[hidden] { display: none; }

/* ------------------------------ SECTIONS --------------------------------- */

section { max-width: var(--page); margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--gutter); }

.section-h {
  font-size: clamp(13px, 1.6vw, 14px);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--green); font-family: var(--sans); font-weight: 600;
  margin-bottom: 26px;
}

/* ------------------------------- VIDEO ----------------------------------- */

.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--frame);
  background: #000;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55);
}
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* -------------------------------- WHAT ----------------------------------- */

.what { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 6vw, 72px); align-items: center; }
.what h2 { font-size: clamp(28px, 4.4vw, 44px); }
.what p { color: var(--dim); max-width: 46ch; }

.what__art { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
.building { width: min(280px, 60%); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .5)); }
.tram { width: clamp(42px, 9%, 62px); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }

/* ------------------------------- PILLARS --------------------------------- */

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card {
  background: linear-gradient(180deg, var(--ink-2), rgba(16, 26, 20, .4));
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 26px 26px 22px;
}
.card__mark { color: var(--gold); font-size: 13px; display: block; margin-bottom: 12px; }
.card h3 { font-size: 20px; margin-bottom: .45em; }
.card p { color: var(--dim); margin: 0; font-size: 16px; }

/* -------------------------------- PAIRS ---------------------------------- */

.pairs {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 5vw, 60px);
  align-items: center;
  background: linear-gradient(180deg, rgba(26, 43, 33, .85), rgba(11, 18, 14, .85));
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  border-radius: 18px;
  max-width: calc(var(--page) - 0px);
  margin-inline: auto;
}
.pairs h2 { font-size: clamp(26px, 4vw, 40px); }
.pairs p { color: var(--dim); max-width: 52ch; }

.pairs__demo {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin: 26px 0;
}
.pill {
  border: 1px solid var(--hair); border-radius: 12px;
  padding: 12px 18px; background: rgba(0, 0, 0, .3); min-width: 172px;
}
.pill__label { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.pill__value { display: block; font-family: var(--serif); font-size: 20px; color: var(--cream); }
.pill--from .pill__value { color: var(--green); }
.pill--to   .pill__value { color: var(--gold); }
.pairs__arrow { color: var(--gold); font-size: 26px; line-height: 1; }

.pairs__now { border-left: 2px solid var(--gold); padding-left: 16px; margin-bottom: 0; }
.pairs__art { width: min(230px, 100%); margin-inline: auto; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .5)); }

/* --------------------------------- JAN ----------------------------------- */

.jan { display: grid; grid-template-columns: auto 1fr; gap: clamp(22px, 4vw, 48px); align-items: center; }
.jan h2 { font-size: clamp(24px, 3.4vw, 34px); }
.jan p { color: var(--dim); max-width: 56ch; margin: 0; }
/* The full standing figure rather than a head crop -- the robe, the ruff and
   the book are most of what says "this is Komensky", and cropping pixel art
   to a square throws them away. Sized by HEIGHT so the box hugs the sprite. */
.jan__portrait {
  height: 226px; width: auto;
  border-radius: 14px;
  border: 2px solid var(--frame);
  background: linear-gradient(180deg, #1d3026 0%, var(--slate) 100%);
  padding: 14px 18px 0;
}

/* -------------------------------- NOTIFY --------------------------------- */

.notify { text-align: center; }
.notify h2 { font-size: clamp(26px, 4vw, 40px); }
.notify > p { color: var(--dim); }

.signup { margin: 26px 0 14px; }
.signup__row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.signup input {
  flex: 1 1 280px; max-width: 360px;
  background: rgba(0, 0, 0, .35); color: var(--chalk);
  border: 1px solid var(--hair); border-radius: 10px;
  padding: 14px 16px; font: inherit; font-size: 16px;
}
.signup input::placeholder { color: rgba(237, 235, 222, .38); }
.signup input:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.signup button {
  background: var(--gold); color: #1c1503; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 10px;
  box-shadow: 0 5px 0 #c9a23f;
  transition: transform .12s ease, box-shadow .12s ease;
}
.signup button:hover { transform: translateY(2px); box-shadow: 0 3px 0 #c9a23f; }
.signup button:active { transform: translateY(5px); box-shadow: 0 0 0 #c9a23f; }
.signup button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* The honeypot. Taken out of the layout rather than `display:none`, because
   some bots skip hidden fields but follow a visible one off-screen. */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---- the optional language pairs ---- */

.wants {
  border: 0; margin: 22px auto 0; padding: 0;
  max-width: 560px; text-align: center;
}
.wants[hidden] { display: none; }
.wants__label {
  margin: 0 0 12px; padding: 0;
  color: var(--dim); font-size: 14.5px; line-height: 1.6;
}
.wants__opt {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border: 1px solid var(--hair); border-radius: 999px;
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); vertical-align: 1px;
}

/* minmax(0, 1fr) rather than the default auto: an auto track is sized from
   its content's MINIMUM, and a no-wrap flex row's minimum is the full width of
   everything in it -- so the row burst out of the page on narrow screens.
   min-width:0 on the row itself is the other half of the same fix. */
.wants__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.want {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; flex-wrap: wrap; min-width: 0;
}
.want input {
  flex: 1 1 150px; max-width: 200px;
  padding: 10px 12px; font-size: 15px;
}
.want__word { color: var(--dim); font-size: 14px; flex: 0 0 auto; }
.signup .want__drop {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0;
  box-shadow: none; transition: none;
  background: transparent; color: var(--dim); cursor: pointer;
  border: 1px solid var(--hair); border-radius: 8px;
  font: inherit; font-size: 18px; line-height: 1;
}
.signup .want__drop:hover { color: var(--cream); border-color: var(--green); }
/* Hidden rather than absent while there is only one row, so every row keeps
   the same width and the column stays centred as rows come and go. */
.want__drop.is-idle { visibility: hidden; }
.signup .want__drop:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.signup .wants__add {
  margin-top: 10px; padding: 8px 14px;
  box-shadow: none; transition: none;
  background: transparent; color: var(--green); cursor: pointer;
  border: 1px dashed var(--hair); border-radius: 8px;
  font: inherit; font-size: 14px;
}
.signup .wants__add:hover { border-color: var(--green); border-style: solid; }
.signup .wants__add:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.signup .wants__add[hidden] { display: none; }

.wants__hint { margin: 10px 0 0; color: var(--dim); font-size: 13px; }

/* ---- the result of pressing the button ---- */

.signup__status {
  margin: 18px auto 0; max-width: 480px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 15px; line-height: 1.5;
}
.signup__status.is-ok  { background: rgba(158, 217, 168, .12); border: 1px solid rgba(158, 217, 168, .45); color: var(--cream); }
.signup__status.is-bad { background: rgba(255, 138, 128, .10); border: 1px solid rgba(255, 138, 128, .45); color: #ffd7d2; }
.signup__status[hidden] { display: none; }
.signup__row[hidden] { display: none; }

.notify__fine { color: var(--dim); font-size: 14px; margin: 0; }

/* -------------------------------- FOOTER --------------------------------- */

.foot {
  border-top: 3px solid var(--frame);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  text-align: center;
  padding: 0 var(--gutter) 38px;
}
.foot__street {
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(20px, 5vw, 54px);
  padding: 34px 0 26px;
  opacity: .75;
}
.foot__street img { height: var(--h); width: auto; }
.foot__line { display: flex; align-items: baseline; justify-content: center; gap: 14px; color: var(--dim); font-size: 14px; margin: 0 0 6px; }
.foot__fine { color: rgba(237, 235, 222, .34); font-size: 13px; margin: 0; }

/* ------------------------------ RESPONSIVE ------------------------------- */

@media (max-width: 860px) {
  .what, .pairs, .jan { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .jan { justify-items: center; text-align: center; }
  .jan p { margin-inline: auto; }
  .pairs__art { max-width: 180px; }
  .what__art { order: -1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  /* Softer corners once it is a paragraph rather than a one-line pill. */
  .first-course { display: block; border-radius: 12px; line-height: 1.55; padding: 12px 16px; }
  .brand { gap: 10px; }
  .wordmark { font-size: 28px; }
  .brand__jan { height: 66px; }
  .wip { font-size: 10px; padding: 3px 8px; letter-spacing: .1em; }
  .nav { flex-wrap: wrap; row-gap: 6px; }
  .hero__cast { gap: 10px; flex-wrap: wrap; row-gap: 4px; }
  .cast__side { gap: 10px; }
  .cast__you { padding: 0 8px; }
  .sprite { height: calc(var(--h) * .62); }
  .tab { font-size: 14px; padding: 8px 14px; }
  .foot__street img { height: calc(var(--h) * .7); }
  .pairs__arrow { transform: rotate(90deg); margin-inline: auto; }
  .pairs__demo { flex-direction: column; align-items: stretch; }

  /* One row must stay one row. Left to wrap, it broke as "Thai using /
     Swedish x", which reads as though the x belongs to the second word.
     The inputs share whatever is left instead. */
  .want { flex-wrap: nowrap; gap: 6px; }
  .want input { flex: 1 1 0; min-width: 0; max-width: none; padding: 10px; font-size: 15px; }
  .want__word { font-size: 12.5px; }
  .signup .want__drop { width: 26px; height: 26px; font-size: 16px; }
  .wants__label { font-size: 14px; }
}
