/* Tanglehedge landing page, in the game's Hedge & Thread skin.

   Everything here is lifted from the game, not redrawn:
   - the dusk ground, the gilded title, the candy buttons and the parchment
     texture are src/index.css, value for value;
   - linen, felt and marigold are src/theme/palette.ts;
   - Hoot, the icons, the animal patches and the Rune Stones in art/ are
     rendered from the game's own components (scripts/build-landing-art.tsx).
   Fonts are self-hosted copies of the game's Fredoka and Nunito (SIL OFL). */

@font-face {
  font-family: 'Fredoka';
  src: url('fonts/fredoka-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* Ground (index.css) */
  --hedge-950: #062018;
  --hedge-900: #0c3527;
  --hedge-800: #0f4832;
  --hedge-700: #125c3e;
  --hedge-300: #74c9a0;
  --hedge-200: #a8e1c3;
  /* Surface */
  --parchment-50: #fffdf6;
  --parchment-100: #fbf3e0;
  --parchment-200: #f3e5c6;
  --parchment-300: #e8d2a4;
  /* Linen and felt (palette.ts) */
  --linen-50: #fffcf4;
  --linen-100: #fbf6ea;
  --linen-200: #f4ebd6;
  --linen-300: #eadbb8;
  --linen-700: #5a4a36;
  --linen-900: #2a2118;
  --felt-950: #163a22;
  --felt-900: #1e4a2b;
  --felt-700: #2f6b3f;
  /* Accents */
  --gold-200: #ffe98a;
  --gold-300: #ffda4d;
  --gold-400: #ffc721;
  --gold-700: #9e5b07;
  --marigold: #f2b632;
  --thread-red: #b8322a;

  --ease-snap: cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--parchment-100);
  background-color: var(--hedge-950);
  /* The game's dusk: a warm lantern low-left, moonlight high-right, a cool
     deep centre, over a hedge-green base. */
  background-image:
    radial-gradient(68rem 44rem at 12% 108%, rgba(255, 199, 33, 0.14), transparent 62%),
    radial-gradient(56rem 40rem at 88% -8%, rgba(116, 201, 160, 0.2), transparent 60%),
    radial-gradient(74rem 58rem at 50% 42%, rgba(44, 22, 89, 0.42), transparent 72%),
    linear-gradient(170deg, #0c3527 0%, #062018 46%, #07211d 100%);
  background-attachment: fixed;
}
h1, h2, h3, .brand, .btn, .headline, .subtitle, .promise, strong {
  font-family: 'Fredoka', system-ui, sans-serif;
}
a { color: inherit; }
img { display: block; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus {
  left: 16px; top: 16px; z-index: 10;
  background: var(--gold-400); color: var(--hedge-950);
  padding: 10px 16px; border-radius: 12px; font-weight: 700;
}

/* ---- Type -------------------------------------------------------- */

.gilded {
  background-image: linear-gradient(100deg,
    var(--gold-200) 0%, var(--gold-400) 28%, var(--parchment-50) 50%,
    var(--gold-400) 72%, var(--gold-200) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(6, 32, 24, 0.9)) drop-shadow(0 0 22px rgba(255, 199, 33, 0.35));
  animation: sheen 7s ease-in-out infinite alternate;
}
@keyframes sheen { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ---- Candy buttons (index.css .candy-face) ------------------------ */

.btn {
  --rim-h: 5px;
  --rim: rgba(3, 16, 12, 0.45);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 26px;
  border-radius: 18px; border: 2px solid transparent;
  font-size: 1.15rem; font-weight: 600; text-decoration: none;
  box-shadow:
    0 var(--rim-h) 0 0 var(--rim),
    0 calc(var(--rim-h) + 5px) 14px -3px rgba(3, 16, 12, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 8px rgba(0, 0, 0, 0.14);
  transition: transform 110ms var(--ease-snap), box-shadow 110ms var(--ease-snap), filter 110ms ease;
}
.btn::after {
  content: ''; position: absolute; inset: 2px 2px 45% 2px; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active {
  transform: translateY(var(--rim-h));
  box-shadow: 0 0 0 0 var(--rim), 0 1px 3px rgba(3, 16, 12, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 6px rgba(0, 0, 0, 0.22);
}
.btn:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 4px; }
.btn img { flex: none; }
/* Starlight: the one call to action. 10.9:1 */
.btn-gold { background: var(--gold-400); color: var(--hedge-950); border-color: rgba(255, 233, 138, 0.7); --rim: var(--gold-700); }
.btn-gold:hover { background: var(--gold-300); }
/* Hedge: the quiet second choice. */
.btn-hedge { background: var(--hedge-700); color: var(--linen-50); border-color: rgba(116, 201, 160, 0.4); --rim: var(--hedge-900); }
.btn-small { min-height: 46px; padding: 8px 18px; font-size: 1rem; border-radius: 14px; --rim-h: 4px; }

/* ---- Layout ------------------------------------------------------- */

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1040px; margin: 0 auto; padding: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.5rem; font-weight: 700; }
.brand img { border-radius: 10px; }

main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.hero { text-align: center; padding: 28px 0 64px; }

/* Hoot's felt patch, as on the welcome screen: felt, a marigold running
   stitch just inside the rim, and a lift off the ground. */
.patch {
  position: relative; width: 196px; height: 196px; margin: 0 auto 8px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--felt-900);
  box-shadow: 0 0 0 8px var(--felt-950), 0 18px 34px -12px rgba(0, 0, 0, 0.7);
  animation: float 5s ease-in-out infinite;
}
.patch::before {
  content: ''; position: absolute; inset: 10px; border-radius: 50%;
  border: 2px dashed var(--marigold); opacity: 0.85;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.title {
  margin: 12px 0 6px; padding-bottom: 6px;
  font-size: clamp(3rem, 12vw, 5.5rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em;
}
.subtitle {
  margin: 0 0 28px; color: var(--hedge-200);
  font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 600; letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(3, 16, 12, 0.7);
}
.headline {
  margin: 0 auto 14px; max-width: 18ch;
  font-size: clamp(1.9rem, 6vw, 2.9rem); line-height: 1.12; font-weight: 700; color: var(--linen-50);
  text-shadow: 0 3px 0 rgba(6, 32, 24, 0.75), 0 7px 16px rgba(0, 0, 0, 0.45);
}
.lead { margin: 0 auto 30px; max-width: 56ch; font-size: 1.15rem; color: var(--parchment-200); }
.note { margin: 22px 0 0; color: var(--hedge-200); font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 14px 16px; justify-content: center; }

/* ---- Panels ------------------------------------------------------- */

/* Linen: the parchment texture from index.css, with a running stitch sewn
   just inside the edge, the way the game's cards are finished. */
.linen, .felt {
  position: relative; border-radius: 26px; padding: 36px 26px 30px; margin: 0 0 28px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.16),
    0 2px 4px rgba(3, 16, 12, 0.4),
    0 18px 36px -12px rgba(3, 16, 12, 0.7);
}
.linen::before, .felt::before {
  content: ''; position: absolute; inset: 10px; border-radius: 18px; pointer-events: none;
  border: 2px dashed rgba(90, 74, 54, 0.4);
}
.linen {
  color: var(--hedge-950);
  background-color: var(--parchment-100);
  background-image:
    repeating-linear-gradient(104deg, rgba(119, 94, 52, 0.045) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(16deg, rgba(119, 94, 52, 0.035) 0 1px, transparent 1px 6px),
    radial-gradient(120% 100% at 0% 0%, rgba(216, 187, 128, 0.35), transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(216, 187, 128, 0.3), transparent 55%);
}
.felt {
  color: var(--linen-100);
  background-color: var(--felt-900);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(116, 201, 160, 0.08), rgba(6, 32, 24, 0.35));
  background-size: 5px 5px, auto;
}
.felt::before { border-color: rgba(242, 182, 50, 0.6); }

.linen h2, .felt h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 20px; font-size: clamp(1.6rem, 4.5vw, 2rem); font-weight: 700; line-height: 1.2;
}
.linen h2 { color: var(--hedge-800); }
.felt h2 { color: var(--gold-200); }
.linen h3 { margin: 0 0 6px; font-size: 1.2rem; color: var(--hedge-800); }
.linen p, .felt p { margin: 0 0 12px; }

/* Who is at the table */
.seats {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.seats li {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 20px 16px; border-radius: 20px;
  background: var(--linen-50); border: 1px solid var(--linen-300);
}
.seats strong { font-size: 1.2rem; font-weight: 600; color: var(--hedge-800); }
.seats span { color: var(--linen-900); }
.seats .you { background: var(--felt-900); border-color: var(--felt-700); }
.seats .you strong { color: var(--gold-200); }
.seats .you span { color: var(--linen-100); }
.lantern {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: var(--linen-100); box-shadow: 0 0 0 4px var(--felt-950), 0 0 24px rgba(255, 199, 33, 0.45);
}
.aside { border-left: 4px solid var(--thread-red); padding: 4px 0 4px 14px; }

/* Why families pick it */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.cards li {
  padding: 18px 18px 16px; border-radius: 18px;
  background: var(--linen-50); border: 1px solid var(--linen-300); color: var(--linen-900);
}
.cards img { margin-bottom: 8px; }
.cards strong { display: block; margin-bottom: 2px; font-size: 1.15rem; font-weight: 600; color: var(--hedge-800); }

/* How a game goes */
.steps { list-style: none; counter-reset: step; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 16px; background: var(--linen-50); border: 1px solid var(--linen-300);
}
.steps li::before {
  content: counter(step);
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-400); color: var(--hedge-950);
  font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700;
  box-shadow: 0 3px 0 var(--gold-700);
}
.steps img { flex: none; }
.stones { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Safe by design */
.promise { font-size: 1.4rem; font-weight: 600; line-height: 1.35; color: var(--linen-50); }

/* Install */
.install { display: grid; gap: 14px; margin: 0 0 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.install > div { padding: 18px; border-radius: 18px; background: var(--linen-50); border: 1px solid var(--linen-300); }
.install p { margin: 0; color: var(--linen-900); }

.foot { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 16px 48px; color: var(--hedge-200); }
.foot img { margin-bottom: 6px; }
.foot p { margin: 0 0 4px; }
.small { font-size: 0.9rem; opacity: 0.85; }

@media (min-width: 900px) {
  .linen, .felt { padding: 44px 44px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .gilded, .patch { animation: none; }
  .btn { transition: none; }
}

/* On a phone the number, the icon and the words don't fit on one line, so
   the step keeps its number and drops the icon. */
@media (max-width: 480px) {
  .steps img { display: none; }
}
