/* Tangletown Typing: Green Lake teal, autumn amber, the game's navy keyboard tray. */
@font-face {
  font-family: "Fredoka";
  src: url(fonts/Fredoka-Variable.ttf) format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --night: #14213d;
  --lake: #2a9d8f;
  --lake-deep: #1d6f78;
  --sky: #8ecae6;
  --amber: #f4a259;
  --porch: #ffc857;
  --next: #ffd60a;
  --typed: #3bb273;
  --bg: #fff8e7;
  --card: #ffffff;
  --ink: #2d2a32;
  --muted: #6b6470;
  --soft: #e6f4f1;
  --line: #eee2c6;
  --link: #1d6f78;
  --kicker: #b5523b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a2f;
    --card: #182540;
    --ink: #f3ecdc;
    --muted: #aeb3c6;
    --soft: #15333d;
    --line: #283662;
    --link: #8ee3d6;
    --kicker: #f4a259;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3, .brand, .kicker, .key { font-family: "Fredoka", ui-rounded, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.bar { background: var(--night); color: #fff8e7; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; color: #fff8e7; text-decoration: none; font-weight: 600; font-size: 22px; }
.brand img { width: 36px; height: 36px; }
.bar nav { display: flex; gap: 18px; font-size: 15px; }
.bar nav a { color: #fff8e7; opacity: .85; text-decoration: none; font-weight: 600; }
.bar nav a:hover { opacity: 1; text-decoration: underline; }

/* Hero: sky over the lake */
.hero {
  padding: 48px 0 56px; overflow: hidden;
  background: linear-gradient(180deg, #8ecae6 0%, #bfe3ee 45%, #2a9d8f 45.2%, #1d6f78 100%);
  color: var(--night);
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; align-items: center; }
.hero-copy { background: rgba(255, 248, 231, .94); border-radius: 26px; padding: 28px 28px 24px; box-shadow: 0 14px 40px rgba(20,33,61,.18); }
.hero h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.05; margin: 0 0 14px; font-weight: 600; }
.typed { color: var(--typed); }
.next { box-shadow: inset 0 -0.2em 0 var(--next); border-radius: 2px; }
.hero p { font-size: 19px; margin: 0 0 22px; color: #2d2a32; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; min-height: 56px;
  border-radius: 12px; padding: 9px 16px; text-decoration: none; font-weight: 700;
}
.badge small { display: block; font-size: 11px; font-weight: 500; opacity: .8; line-height: 1.1; }
.badge span { line-height: 1.15; }
.note { font-size: 14px; color: #4a4e5a; flex-basis: 100%; }
.device { background: var(--night); border-radius: 22px; padding: 10px; box-shadow: 0 22px 60px rgba(20,33,61,.45); }
.device img { border-radius: 14px; width: 100%; }

/* Home row */
.homerow { display: flex; justify-content: center; gap: 8px; margin: 40px 0 0; flex-wrap: wrap; }
.key {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: 12px; font-size: 24px;
  font-weight: 600; color: #2d2a32; box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.key.gap { width: 24px; box-shadow: none; }
.k1 { background: #c9b6f2; } .k2 { background: #9ecbff; } .k3 { background: #a6e3b0; } .k4 { background: #ffc896; }
.k5 { background: #ffb3a7; }
.key.bump { outline: 3px solid var(--next); }

/* Pills */
.pills { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pills li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.pills strong { display: block; font-size: 18px; }
.pills .e { font-size: 26px; display: block; margin-bottom: 4px; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; padding: 64px 0; border-bottom: 1px solid var(--line); }
.feature.flip > figure { order: -1; }
.feature h2 { font-size: 36px; line-height: 1.12; margin: 0 0 12px; font-weight: 600; }
.kicker { color: var(--kicker); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 15px; margin: 0 0 6px; }

/* Trailer: a night band under the hero */
.watch { margin: 16px 0 0; font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 600; font-size: 18px; }
.watch a { color: #1d6f78; text-decoration: none; }
.watch a:hover { text-decoration: underline; }
.trailer { background: linear-gradient(180deg, #2b3a67 0%, var(--night) 100%); color: #fff8e7; padding: 44px 0 52px; text-align: center; }
.trailer .kicker { color: var(--porch); margin: 0 0 6px; }
.trailer h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 22px; font-weight: 600; }
.trailer video { width: 100%; max-width: 960px; height: auto; aspect-ratio: 16 / 9; margin: 0 auto; display: block; border-radius: 20px; background: #000; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.trailer-note { margin: 14px auto 0; font-size: 15px; opacity: .75; }
.feature ul { padding-left: 20px; margin: 12px 0 0; }
.feature li { margin-bottom: 8px; }
.feature figure { margin: 0; display: grid; gap: 14px; }
.shot { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(20,33,61,.18); width: 100%; }
.shot.small { width: 70%; justify-self: end; margin-top: -22%; position: relative; border: 4px solid var(--bg); }
.trio { grid-template-columns: repeat(3, 1fr); }

/* Zones */
.zones { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: zone; }
.zones li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px dashed var(--line); }
.zones li::before {
  counter-increment: zone; content: counter(zone); flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--lake); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.zones code { font-size: 15px; background: var(--soft); padding: 1px 6px; border-radius: 6px; }

/* Grown-ups */
.grownups { padding: 64px 0 24px; }
.grownups h2 { font-size: 36px; margin: 0 0 8px; font-weight: 600; text-align: center; }
.grownups > p { text-align: center; max-width: 40em; margin: 0 auto 28px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 10px; }
.card h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.card p { margin: 0 0 12px; }

.closing { background: var(--soft); border-radius: 28px; padding: 40px 28px; text-align: center; margin: 40px 0 64px; }
.closing h2 { font-size: 32px; margin: 0 0 8px; font-weight: 600; }
.closing p { margin: 0 auto 8px; max-width: 38em; }
.meta { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

/* Document pages */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 20px 64px; }
.doc h1 { font-size: 42px; margin: 0 0 4px; font-weight: 600; }
.doc section { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 14px; margin: 24px 0; }
.doc h2 { font-size: 25px; margin: 0 0 6px; font-weight: 600; }
.doc h3 { font-size: 18px; margin: 20px 0 4px; font-weight: 600; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 4px; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-top: 22px; padding-bottom: 32px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .bar nav { gap: 12px; font-size: 14px; }
  .bar nav .wide { display: none; }
  .hero { padding: 24px 0 36px; background: linear-gradient(180deg, #8ecae6 0%, #bfe3ee 60%, #2a9d8f 60.2%, #1d6f78 100%); }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { padding: 22px 20px 18px; }
  .device { border-radius: 14px; padding: 6px; }
  .device img { border-radius: 9px; }
  .homerow { gap: 5px; }
  .key { width: 34px; height: 40px; font-size: 18px; border-radius: 9px; }
  .key.gap { width: 6px; }
  .brand { font-size: 19px; }
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 44px 0; }
  .feature.flip > figure { order: 0; }
  .feature h2, .grownups h2 { font-size: 29px; }
  .trio { grid-template-columns: 1fr; }
  .doc section { padding: 20px 18px 8px; }
}
