/* ==========================================================================
   Kea Summit — shared stylesheet
   One source of truth for the whole site. Same brand palette as before;
   the layout is rebuilt around a single card system and a consistent
   vertical rhythm so every page reads the same way.
   ========================================================================== */

:root{
  /* Brand palette (unchanged) */
  --navy:#2D4059;
  --navy-deep:#1f2e3f;
  --olive:#8A9A5B;
  --olive-light:#9aab68;
  --olive-deep:#556B2F;
  --charcoal:#222222;
  --mist:#D9D9D9;
  --paper:#f4f5f2;

  /* Derived surfaces */
  --surface:rgba(255,255,255,.04);
  --surface-2:rgba(255,255,255,.07);
  --surface-hover:rgba(138,154,91,.14);
  --border:rgba(255,255,255,.10);
  --border-strong:rgba(138,154,91,.45);
  --text:var(--paper);
  --text-muted:rgba(244,245,242,.64);
  --text-faint:rgba(244,245,242,.40);

  /* Scale */
  --r-sm:10px;
  --r-md:14px;
  --r-lg:20px;
  --r-pill:999px;
  --maxw:1100px;
  --gutter:24px;
  --shadow-sm:0 6px 18px -10px rgba(0,0,0,.6);
  --shadow-lg:0 24px 50px -24px rgba(0,0,0,.7);
  --ease:cubic-bezier(.2,.7,.2,1);
}

*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}

body{
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color:var(--text);
  line-height:1.6;
  min-height:100vh;
  min-height:100dvh;
  /* Static brand gradient — calm, no animation */
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(138,154,91,.16), transparent 62%),
    radial-gradient(900px 560px at 2% 2%, rgba(45,64,89,.55), transparent 58%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-attachment:fixed;
  background-color:var(--navy-deep);
  display:flex;
  flex-direction:column;
}

a{color:inherit}
img{display:block;max-width:100%}
button{font-family:inherit}
:focus-visible{outline:2px solid var(--olive);outline-offset:2px}

.wrap{width:100%;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}
.wrap-narrow{max-width:720px}
main{flex:1}

/* ---------- Typography helpers ---------- */
.eyebrow{
  font-size:.7rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;
  color:var(--olive);
}
h1,h2,h3{letter-spacing:-.02em;line-height:1.25}

/* ==========================================================================
   Header
   Brand sits on the left, navigation on the right — the conventional
   reading order, which keeps the bar quiet.
   ========================================================================== */
.site-header{
  position:sticky;top:0;z-index:60;
  background:rgba(31,46,63,.78);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}
.site-header .wrap{display:flex;align-items:center;gap:16px;height:66px}

.brand{
  display:inline-flex;align-items:center;gap:11px;
  text-decoration:none;font-weight:800;font-size:1.02rem;letter-spacing:-.02em;
  color:var(--text);
}
.brand img{width:32px;height:32px;border-radius:50%;flex:0 0 auto}

.site-nav{margin-left:auto;display:flex;align-items:center;gap:2px}
.site-nav a{
  text-decoration:none;font-size:.88rem;font-weight:600;color:var(--mist);
  padding:9px 13px;border-radius:var(--r-sm);
  transition:background .15s var(--ease), color .15s var(--ease);
}
.site-nav a:hover,.site-nav a:focus-visible{background:var(--surface-hover);color:var(--text)}

.nav-toggle{
  display:none;margin-left:auto;
  width:42px;height:42px;border-radius:var(--r-sm);
  background:var(--surface);border:1px solid var(--border);color:var(--text);
  cursor:pointer;font-size:1.1rem;line-height:1;
}
.nav-toggle:hover{background:var(--surface-hover)}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:12px 22px;border-radius:var(--r-sm);
  font-size:.94rem;font-weight:700;text-decoration:none;
  border:1px solid transparent;cursor:pointer;white-space:nowrap;
  transition:background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.btn:hover{transform:translateY(-2px)}
.btn svg{width:17px;height:17px;flex:0 0 auto}
.btn-primary{background:var(--olive);color:var(--navy-deep)}
.btn-primary:hover{background:var(--olive-light)}
.btn-ghost{background:var(--surface);border-color:var(--border);color:var(--text)}
.btn-ghost:hover{background:var(--surface-hover);border-color:var(--border-strong)}
.btn-sm{padding:10px 16px;font-size:.85rem}

/* ==========================================================================
   Hero — logo and two calls to action, nothing else
   ========================================================================== */
.hero{padding:72px 0 44px;text-align:center}
.hero-logo{
  width:112px;height:112px;border-radius:50%;margin:0 auto;
  box-shadow:var(--shadow-lg);
  animation:rise .6s var(--ease) both;
}
.hero-actions{
  margin-top:30px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;
  animation:rise .6s var(--ease) .1s both;
}

/* ==========================================================================
   Sections
   A hairline rule and generous spacing replace the old nested boxes.
   ========================================================================== */
.section{padding:52px 0;scroll-margin-top:78px}
.section + .section{border-top:1px solid var(--border)}

.section-head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:18px;flex-wrap:wrap;margin-bottom:28px;
}
.section-head h2{font-size:clamp(1.35rem,3.2vw,1.75rem);font-weight:800;margin-top:6px}
.section-head p{color:var(--text-muted);font-size:.92rem;margin-top:6px;max-width:56ch}
.section-head .link-more{
  font-size:.86rem;font-weight:700;color:var(--olive);text-decoration:none;white-space:nowrap;
}
.section-head .link-more:hover{text-decoration:underline}

/* ==========================================================================
   Quick links (the "Explore" row)
   Compact one-liners rather than full-size cards, so they guide without
   competing with the real content below.
   ========================================================================== */
.quick-grid{
  display:grid;gap:12px;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
}
.quick{
  display:flex;flex-direction:column;gap:8px;
  padding:16px 16px 15px;border-radius:var(--r-md);
  background:var(--surface);border:1px solid var(--border);
  text-decoration:none;color:var(--text);
  transition:background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.quick:hover,.quick:focus-visible{
  background:var(--surface-hover);border-color:var(--border-strong);transform:translateY(-3px);
}
.quick-top{display:flex;align-items:center;gap:10px}
.quick-top svg{width:19px;height:19px;color:var(--olive);flex:0 0 auto}
.quick-top h3{font-size:.98rem;font-weight:700}
.quick p{color:var(--text-muted);font-size:.82rem;line-height:1.5}

.pill{
  font-size:.58rem;font-weight:800;text-transform:uppercase;letter-spacing:.12em;
  padding:3px 8px;border-radius:var(--r-pill);flex:0 0 auto;
}
.pill-live{background:var(--olive);color:var(--navy-deep)}
.pill-soon{background:rgba(217,217,217,.14);color:var(--mist);border:1px solid var(--border)}

/* ==========================================================================
   Item cards (games, apps, tools) — one shared card for all three
   Icon, name, then actions. Nothing overlaid on the artwork.
   ========================================================================== */
.card-grid{
  display:grid;gap:18px;
  grid-template-columns:repeat(auto-fill,minmax(215px,1fr));
}
.item{
  display:flex;flex-direction:column;
  border-radius:var(--r-md);overflow:hidden;
  background:var(--surface);border:1px solid var(--border);
  transition:border-color .16s var(--ease), transform .16s var(--ease), background .16s var(--ease);
}
.item:hover{border-color:var(--border-strong);transform:translateY(-3px);background:var(--surface-2)}
.item-thumb{aspect-ratio:1/1;background:var(--navy-deep);overflow:hidden}
.item-thumb img{width:100%;height:100%;object-fit:cover}
.item-body{padding:14px 15px 4px}
.item-body h3{font-size:1.02rem;font-weight:700}
.item-body .meta{
  display:block;margin-top:4px;
  font-size:.75rem;font-weight:600;color:var(--text-muted);
}
.item-actions{margin-top:auto;padding:12px 15px 15px;display:flex;gap:8px}
.item-actions .act{
  flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:9px 8px;border-radius:var(--r-sm);
  font-size:.82rem;font-weight:700;text-decoration:none;
  border:1px solid transparent;cursor:pointer;
  transition:background .15s var(--ease), border-color .15s var(--ease);
}
.item-actions .act svg{width:14px;height:14px;flex:0 0 auto}
.act-primary{background:var(--olive);color:var(--navy-deep)}
.act-primary:hover{background:var(--olive-light)}
.act-ghost{background:transparent;border-color:var(--border);color:var(--text)}
.act-ghost:hover{background:var(--surface-hover);border-color:var(--border-strong)}

.note{
  margin-top:18px;font-size:.82rem;color:var(--text-muted);
}

/* ==========================================================================
   Coming soon — AI Tools and Shop, grouped into one calm section
   ========================================================================== */
.soon-grid{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
.soon-card{
  display:flex;flex-direction:column;
  padding:24px;border-radius:var(--r-md);
  background:linear-gradient(165deg, rgba(138,154,91,.13), rgba(85,107,47,.05));
  border:1px solid var(--border-strong);
}
.soon-card h3{font-size:1.12rem;font-weight:800;display:flex;align-items:center;gap:10px}
.soon-card p{color:var(--text-muted);font-size:.9rem;margin-top:8px}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 20px}
.chip{
  font-size:.76rem;font-weight:600;padding:5px 11px;border-radius:var(--r-pill);
  background:var(--surface);border:1px solid var(--border);color:var(--mist);
}
.soon-card .btn{margin-top:auto;align-self:flex-start}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  margin-top:auto;border-top:1px solid var(--border);
  padding:44px 0 52px;scroll-margin-top:78px;
}
.foot-grid{display:grid;gap:32px;grid-template-columns:minmax(240px,1.4fr) repeat(2,minmax(140px,1fr))}
.foot-brand p{color:var(--text-muted);font-size:.86rem;margin:12px 0 16px;max-width:38ch}
.foot-col h4{
  font-size:.72rem;text-transform:uppercase;letter-spacing:.14em;
  color:var(--olive);font-weight:800;margin-bottom:12px;
}
.foot-col a{
  display:block;text-decoration:none;color:var(--mist);font-size:.89rem;
  padding:5px 0;transition:color .15s var(--ease);
}
.foot-col a:hover{color:var(--text)}
.social{display:flex;gap:10px}
.social a{
  width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-sm);
  background:var(--surface);border:1px solid var(--border);color:var(--mist);
  transition:background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.social a:hover{background:var(--surface-hover);border-color:var(--border-strong);color:var(--text)}
.social svg{width:18px;height:18px}
.btn-copy{
  background:none;border:none;color:var(--olive);cursor:pointer;
  font-size:.85rem;font-weight:700;padding:5px 0;text-align:left;
}
.foot-bottom{
  margin-top:36px;padding-top:20px;border-top:1px solid var(--border);
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;
  font-size:.78rem;color:var(--text-faint);
}

/* ==========================================================================
   Game detail pages
   ========================================================================== */
.game-page{padding:44px 0 56px}
.game-hero{display:flex;align-items:center;gap:20px;margin-bottom:28px}
.game-hero img{
  width:88px;height:88px;border-radius:22%;flex:0 0 auto;box-shadow:var(--shadow-sm);
}
.game-hero h1{font-size:clamp(1.6rem,5vw,2.1rem);font-weight:800}
.game-hero .eyebrow{display:block;margin-bottom:4px}
.game-blurb{color:var(--text-muted);font-size:.96rem;max-width:62ch;margin-bottom:28px}

/* Screenshot carousel */
.shots{margin-bottom:32px}
.viewport{
  position:relative;width:100%;max-width:400px;margin:0 auto;
  aspect-ratio:2/3;border-radius:var(--r-lg);overflow:hidden;
  background:var(--navy-deep);border:1px solid var(--border);
}
.slide{
  position:absolute;inset:0;opacity:0;
  transition:opacity .5s var(--ease);pointer-events:none;
}
.slide.active{opacity:1;pointer-events:auto}
.slide img{width:100%;height:100%;object-fit:cover}
.slide .cap{
  position:absolute;left:0;right:0;bottom:0;
  padding:32px 16px 14px;font-size:.82rem;font-weight:600;
  background:linear-gradient(0deg, rgba(31,46,63,.94), transparent);
}
.shot-nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:38px;height:38px;display:grid;place-items:center;
  border:none;border-radius:50%;
  background:rgba(31,46,63,.65);color:var(--text);cursor:pointer;z-index:3;
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  transition:background .16s var(--ease), color .16s var(--ease);
}
.shot-nav:hover,.shot-nav:focus-visible{background:var(--olive);color:var(--navy-deep)}
.shot-nav.prev{left:10px}
.shot-nav.next{right:10px}
.shot-nav svg{width:19px;height:19px}

.shot-controls{max-width:400px;margin:14px auto 0}
.dots{display:flex;justify-content:center;gap:8px}
.dot{
  width:8px;height:8px;border-radius:50%;border:none;padding:0;
  background:rgba(255,255,255,.22);cursor:pointer;
  transition:background .16s var(--ease), transform .16s var(--ease);
}
.dot.active{background:var(--olive);transform:scale(1.3)}
.progress{margin-top:12px;height:3px;border-radius:var(--r-pill);background:rgba(255,255,255,.1);overflow:hidden}
.progress .bar{height:100%;width:0;background:var(--olive);border-radius:var(--r-pill)}
.progress .bar.run{animation:fill var(--interval,4500ms) linear forwards}
@keyframes fill{from{width:0}to{width:100%}}

.demo-cta{display:flex;justify-content:center;margin-top:20px}

/* Inline playable demo */
#demo-frame{
  position:absolute;inset:0;width:100%;height:100%;border:0;
  display:none;background:var(--navy-deep);z-index:4;
}
.viewport.demo-active #demo-frame{display:block}
.viewport.demo-active .slide,
.viewport.demo-active .shot-nav{display:none}
.demo-close{
  position:absolute;top:10px;right:10px;z-index:5;
  width:34px;height:34px;display:none;place-items:center;
  border:none;border-radius:50%;
  background:rgba(31,46,63,.85);color:var(--text);
  font-size:1.2rem;line-height:1;cursor:pointer;
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  transition:background .16s var(--ease), color .16s var(--ease);
}
.viewport.demo-active .demo-close{display:grid}
.demo-close:hover,.demo-close:focus-visible{background:var(--olive);color:var(--navy-deep)}

/* Tester block */
.tester{
  padding:24px;border-radius:var(--r-md);
  background:linear-gradient(165deg, rgba(138,154,91,.13), rgba(85,107,47,.05));
  border:1px solid var(--border-strong);
}
.tester h2{font-size:1.05rem;font-weight:800;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tester .badge{
  font-size:.6rem;font-weight:800;text-transform:uppercase;letter-spacing:.13em;
  color:var(--navy-deep);background:var(--olive);padding:3px 9px;border-radius:var(--r-pill);
}
.tester .intro{margin-top:8px;font-size:.88rem;color:var(--text-muted)}
.steps{margin-top:18px;display:grid;gap:9px}
.step{
  display:flex;align-items:center;gap:12px;
  padding:13px 15px;border-radius:var(--r-sm);
  background:rgba(0,0,0,.16);border:1px solid var(--border);
  text-decoration:none;color:var(--text);
  transition:background .15s var(--ease), border-color .15s var(--ease);
}
.step:hover,.step:focus-visible{background:var(--surface-hover);border-color:var(--border-strong)}
.step .n{
  flex:0 0 auto;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;
  background:var(--olive);color:var(--navy-deep);font-size:.74rem;font-weight:800;
}
.step-text{flex:1;line-height:1.35}
.step-action{display:block;font-size:.92rem;font-weight:700}
.step-hint{display:block;font-size:.76rem;color:var(--text-muted);margin-top:2px}
.step .arrow{opacity:.45;flex:0 0 auto}

.soon-row{
  margin-top:18px;display:flex;align-items:center;gap:13px;
  padding:15px 16px;border-radius:var(--r-sm);
  background:rgba(0,0,0,.16);border:1px dashed var(--border-strong);
}
.soon-row .pill{align-self:flex-start}
.soon-text{flex:1}
.soon-action{display:block;font-size:.92rem;font-weight:700}
.soon-hint{display:block;font-size:.76rem;color:var(--text-muted);margin-top:2px}

.support-cta{display:flex;justify-content:center;margin-top:28px}
.support-link{
  display:inline-flex;align-items:center;gap:9px;
  padding:11px 20px;border-radius:var(--r-pill);
  background:var(--surface);border:1px solid var(--border);
  color:var(--text);font-size:.86rem;font-weight:600;text-decoration:none;
  transition:background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.support-link:hover,.support-link:focus-visible{
  background:var(--surface-hover);border-color:var(--border-strong);transform:translateY(-2px);
}
.support-link svg{width:16px;height:16px;color:var(--olive)}

/* ==========================================================================
   Motion + responsive
   ========================================================================== */
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}

@media (min-width:760px){
  /* Desktop: the demo plays full screen, keeping the portrait canvas */
  body:has(.viewport.demo-active){overflow:hidden}
  .viewport.demo-active{
    position:fixed;inset:0;z-index:1000;
    width:100vw;height:100vh;height:100dvh;
    max-width:none;aspect-ratio:auto;border-radius:0;border:0;
    background:#0b1118;
  }
  .viewport.demo-active .demo-close{position:fixed;top:16px;right:16px;width:40px;height:40px}
}

@media (max-width:820px){
  .foot-grid{grid-template-columns:1fr 1fr}
  .foot-brand{grid-column:1 / -1}
}

@media (max-width:720px){
  :root{--gutter:18px}
  .nav-toggle{display:block}
  .site-nav{
    position:absolute;top:66px;left:0;right:0;
    flex-direction:column;align-items:stretch;gap:2px;
    padding:12px 18px 18px;margin-left:0;
    background:var(--navy-deep);border-bottom:1px solid var(--border);
    display:none;
  }
  .site-nav.open{display:flex}
  .site-nav a{padding:12px 14px}
  .hero{padding:52px 0 34px}
  .section{padding:42px 0}
  .card-grid{grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:14px}
  /* Two buttons won't sit side by side in a half-width card — stack them */
  .item-actions{flex-direction:column}
  .item-actions .act{flex:0 0 auto}
  .game-hero{flex-direction:column;align-items:flex-start;gap:16px}
  .foot-grid{grid-template-columns:1fr}
}

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