/* ============================================================================
   KOTH — getkoth.app
   Dark iOS product site. Real app UI is the artwork; no abstract decoration.
   Narrative arc, generous air, accent color used as a scalpel.
   Anton (display) · Hanken Grotesk (body) · JetBrains Mono (data)
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0b0c0e;
  --surface: #15171a;
  --surface-2: #1b1e22;
  --line: #24272c;
  --line-soft: #1a1d21;

  --ink: #edeff2;          /* confident near-white headings */
  --ink-2: #a6acb5;        /* body */
  --ink-dim: #6b717a;      /* captions / mono microtype */

  --orange: #ff5a1f;       /* action / CTA / hot — the one dominant accent */
  --gold: #f5b733;         /* crown / king / held — scarce, meaningful */
  --green: #54cf6a;        /* GPS verified — success only */

  --maxw: 1140px;
  --display: "Anton", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.shell { width: min(var(--maxw), calc(100% - 44px)); margin: 0 auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); }
.orange { color: var(--orange); }

.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

h1, h2, h3.big {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
  color: var(--ink);
}

/* ---- buttons / app store badge ----------------------------------------- */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 54px;
  padding: 0 20px 0 18px;
  border-radius: 13px;
  background: #fff;
  color: #0b0c0e;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8);
}
.appstore:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.9); }
.appstore:active { transform: translateY(0); }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore .lbl { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore .lbl small { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.7; }
.appstore .lbl strong { font-size: 1.16rem; font-weight: 800; letter-spacing: -0.01em; font-family: var(--body); }

.txtlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.96rem;
}
.txtlink .arw { color: var(--orange); transition: transform 0.18s var(--ease); }
.txtlink:hover .arw { transform: translateX(3px); }

/* ====================================================================== */
/* MASTHEAD                                                               */
/* ====================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 40px);
  background: rgba(11, 12, 14, 0.7);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.masthead.stuck { border-color: var(--line-soft); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .sigil { width: 32px; height: 32px; }
.brand .word { font-family: var(--display); font-size: 1.4rem; letter-spacing: 0.05em; color: var(--ink); }
.mast-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); }
.mast-nav a:not(.mini) {
  font-size: 0.95rem; font-weight: 600; color: var(--ink-2);
  transition: color 0.16s var(--ease);
}
.mast-nav a:not(.mini):hover { color: var(--ink); }
.mast-nav .mini {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; background: #fff; color: #0b0c0e; font-weight: 800; font-size: 0.9rem;
}
.mast-nav .mini svg { width: 16px; height: 16px; }

/* ====================================================================== */
/* HERO                                                                   */
/* ====================================================================== */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(30px, 5vw, 56px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
}
.hero-copy { max-width: 560px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em;
  color: var(--ink-2); margin-bottom: 22px;
}
.hero .eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.6); animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 90, 31, 0); } }

.hero h1 { font-size: clamp(3rem, 7.2vw, 5.6rem); }
.hero h1 .g { color: var(--gold); }
.hero-sub {
  margin: 24px 0 0; max-width: 30em;
  font-size: 1.18rem; line-height: 1.5; color: var(--ink-2); font-weight: 500;
}
.hero-sub b { color: var(--ink); font-weight: 700; }
.hero-actions { margin-top: 30px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 26px; display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.74rem; color: var(--ink-dim); letter-spacing: 0.02em;
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-dim); }

/* ---- device frame (real screenshots) ----------------------------------- */
.device {
  position: relative;
  width: min(310px, 78vw);
  margin: 0 auto;
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(150deg, #2a2d31, #121316 60%);
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.device::after { /* side-button hint */
  content: ""; position: absolute; right: -2px; top: 130px; width: 3px; height: 64px;
  border-radius: 2px; background: #2a2d31;
}
.device img { width: 100%; border-radius: 34px; display: block; }
.hero .device { transform: rotate(1.4deg); }

/* ====================================================================== */
/* SECTIONS                                                               */
/* ====================================================================== */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

/* reveal on scroll (subtle, gated) */
.rise { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* ---- the loop: editorial steps, no cards/icons ------------------------- */
.loop-head { max-width: 680px; margin-bottom: 52px; }
.loop-head .kicker { margin-bottom: 16px; display: block; }
.loop-head h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.loop-head p { margin-top: 18px; color: var(--ink-2); font-size: 1.1rem; max-width: 40em; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step { padding: 26px 24px 26px 0; border-top: 2px solid var(--line); position: relative; }
.step::before {
  content: ""; position: absolute; top: -2px; left: 0; width: 38px; height: 2px; background: var(--orange);
}
.step .n { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-dim); letter-spacing: 0.14em; }
.step h3 { font-family: var(--body); font-weight: 800; font-size: 1.28rem; color: var(--ink); margin: 14px 0 8px; letter-spacing: 0.005em; }
.step p { color: var(--ink-2); font-size: 0.98rem; }

/* ---- feature row: real screenshot + copy ------------------------------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(30px, 5vw, 84px); }
.feature.flip .feature-art { order: 2; }
.feature-text { max-width: 460px; }
.feature.flip .feature-text { margin-left: auto; }
.feature-text .kicker { display: block; margin-bottom: 16px; }
.feature-text h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.feature-text p { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; }
.feature-text .pts { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.feature-text .pts li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); font-size: 1rem; }
.feature-text .pts .tick { color: var(--green); font-size: 0.8rem; flex: none; }
.feature-text .pts b { color: var(--ink); font-weight: 700; }

/* ====================================================================== */
/* LEADERBOARD (the one live, real-data app card)                         */
/* ====================================================================== */
.arena { display: grid; grid-template-columns: 0.92fr 1.08fr; align-items: center; gap: clamp(30px, 5vw, 72px); }
.arena-text { max-width: 440px; }
.arena-text .kicker { display: block; margin-bottom: 16px; }
.arena-text h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.arena-text h2 .g { color: var(--gold); }
.arena-text p { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; }

.board {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface), #101214);
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft);
}
.board-head .pk { display: flex; flex-direction: column; gap: 3px; }
.board-head .pk b { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.03em; color: var(--ink); text-transform: uppercase; }
.board-head .pk .datum { font-family: var(--mono); font-size: 0.64rem; color: var(--ink-dim); letter-spacing: 0.05em; }
.board-head .live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--orange); text-transform: uppercase; }
.board-head .live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse 2.4s var(--ease) infinite; }

.rows { position: relative; padding: 7px 9px 9px; }
.row {
  display: grid; grid-template-columns: 24px 40px 1fr auto; align-items: center; gap: 13px;
  padding: 12px 11px; border-radius: 12px;
  transition: background 0.2s var(--ease), opacity 0.4s var(--ease), transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.row + .row { box-shadow: 0 -1px 0 var(--line-soft); }
.row .rank { font-family: var(--mono); font-size: 0.84rem; color: var(--ink-dim); text-align: center; }
.row .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row .name { font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.row .meta { font-family: var(--mono); font-size: 0.64rem; color: var(--ink-dim); letter-spacing: 0.03em; }
.row .stat { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-2); text-align: right; }
.row.king { background: linear-gradient(100deg, rgba(245, 183, 51, 0.12), transparent 70%); box-shadow: inset 0 0 0 1px rgba(245, 183, 51, 0.2); }
.row.king .name { color: #ffe6a6; }
.row.dethroned { opacity: 0.4; }

.chip {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 0.82rem; color: #14171b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.c-orange { background: linear-gradient(160deg, #ff7a45, var(--orange)); }
.c-gold { background: linear-gradient(160deg, #ffd169, var(--gold)); }
.c-green { background: linear-gradient(160deg, #80e08f, var(--green)); }
.c-pink { background: linear-gradient(160deg, #f08abf, #e06ea8); }
.c-blue { background: linear-gradient(160deg, #93c0ff, #6ea8ff); }

.tag {
  font-family: var(--mono); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 6px;
  border: 1px solid rgba(245, 183, 51, 0.32); background: rgba(245, 183, 51, 0.12); color: var(--gold);
}
.crown-fly { position: absolute; z-index: 5; width: 24px; height: 22px; left: 0; top: 0; color: var(--gold); pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); transition: transform 0.7s cubic-bezier(0.34, 1.5, 0.64, 1); }
.board-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 18px; border-top: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.18);
}
.board-foot .lbl { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--ink-dim); text-transform: uppercase; }
.board-foot .clock { font-family: var(--mono); font-size: 0.92rem; font-weight: 600; color: var(--gold); }
.board-foot .by { font-family: var(--mono); font-size: 0.64rem; color: var(--ink-dim); }

/* ====================================================================== */
/* PEAKS DIRECTORY (real plumbing)                                        */
/* ====================================================================== */
.peaks-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.peaks-head .kicker { display: block; margin-bottom: 14px; }
.peaks-head h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.peaks-head p { margin-top: 14px; color: var(--ink-2); max-width: 34em; }
.peaks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.peak {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px;
  padding: 17px 18px; background: var(--bg); transition: background 0.16s var(--ease);
}
.peak:hover { background: var(--surface); }
.peak .info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.peak .hold { display: flex; flex-direction: column; gap: 3px; }
.peak .nm { font-weight: 700; color: var(--ink); font-size: 1rem; }
.peak .co { font-family: var(--mono); font-size: 0.62rem; color: var(--ink-dim); margin-top: 3px; }
.peak .hold { text-align: right; font-family: var(--mono); }
.peak .hold .who { font-size: 0.72rem; color: var(--ink-2); }
.peak .hold .who.open { color: var(--orange); }
.peak .hold .dur { font-size: 0.6rem; color: var(--ink-dim); margin-top: 3px; }
.peaks-foot { margin-top: 18px; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-dim); }

/* ====================================================================== */
/* CLOSER + FOOTER                                                        */
/* ====================================================================== */
.closer { text-align: center; padding: clamp(80px, 12vw, 150px) 0; border-top: 1px solid var(--line-soft); }
.closer h2 { font-size: clamp(2.6rem, 7.5vw, 5.6rem); }
.closer h2 .g { color: var(--gold); }
.closer p { margin: 20px auto 0; max-width: 28em; color: var(--ink-2); font-size: 1.16rem; }
.closer .hero-actions { justify-content: center; margin-top: 34px; }

.footer { border-top: 1px solid var(--line-soft); padding: 56px 0 46px; background: #090a0b; }
.footer .top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.footer .word { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.05em; color: var(--ink); }
.footer .blurb { margin-top: 12px; color: var(--ink-dim); font-size: 0.92rem; max-width: 32em; }
.footer .trust { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer .trust span { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 7px; }
.footer .trust span::before { content: "▲"; color: var(--green); font-size: 0.6rem; }
.footer .col-t { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 12px; }
.footer .gaz { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer .gaz a { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-2); }
.footer .gaz a:hover { color: var(--orange); }
.footer .bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.footer .bottom .links { display: flex; gap: 22px; }
.footer .bottom a { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-dim); }
.footer .bottom a:hover { color: var(--ink); }
.footer .bottom .copy { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-dim); }

/* ====================================================================== */
/* LEGAL / SUPPORT / 404                                                  */
/* ====================================================================== */
.legal-page { background: var(--bg); }
.legal { width: min(800px, calc(100% - 44px)); margin: 0 auto; padding: clamp(56px, 8vw, 92px) 0 80px; }
.legal .kicker { display: block; margin-bottom: 14px; }
.legal h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 0.94; color: var(--ink); }
.legal .effective { font-family: var(--mono); color: var(--gold); font-size: 0.82rem; margin-top: 12px; }
.legal h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.4rem; margin: 42px 0 12px; color: var(--ink); }
.legal h3 { font-size: 1.05rem; font-weight: 800; margin: 26px 0 8px; color: var(--ink); }
.legal p, .legal li { color: var(--ink-2); font-size: 1.02rem; line-height: 1.72; }
.legal ul { margin: 0 0 0 2px; }
.legal li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.legal li::before { content: "▲"; position: absolute; left: 0; top: 0.05em; font-size: 0.6rem; color: var(--orange); }
.legal p + p { margin-top: 14px; }
.legal a { color: var(--gold); font-weight: 600; border-bottom: 1px solid rgba(245, 183, 51, 0.3); }
.legal a:hover { border-color: var(--gold); }
.contact-box { display: inline-block; margin: 8px 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-family: var(--mono); }
.contact-box a { border: 0; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; padding: 36px 22px 52px; border-top: 1px solid var(--line-soft); }
.site-footer a, .site-footer span { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-dim); }
.site-footer a:hover { color: var(--ink); }
.legal .appstore { color: #0b0c0e; }

/* ====================================================================== */
/* RESPONSIVE                                                             */
/* ====================================================================== */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { max-width: 620px; }
  .hero .device { transform: none; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .feature, .arena { grid-template-columns: 1fr; gap: 38px; }
  .feature.flip .feature-art, .arena .board { order: -1; }
  .feature.flip .feature-text { margin-left: 0; }
  .peaks { grid-template-columns: 1fr; }
  .footer .top { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .mast-nav .hide-sm { display: none; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .rise { opacity: 1; transform: none; }
}
