:root{
  --bg:        #ffffff;
  --bg-soft:   #f5f7f8;
  --ink:       #0d0e10;
  --ink-soft:  #6b7077;
  --line:      #e9ecef;
  --green:     #16d6a0;
  --green-deep:#0fbf8d;
  --green-tint:#e7faf3;
  --maxw: 1180px;
  --radius: 26px;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html{ overflow-x:clip; }
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;          /* clip horizontal overflow WITHOUT creating a scroll container */
}

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:600; font-size:15px; text-decoration:none;
  border-radius:100px; padding:11px 22px;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space:nowrap;
}
.btn--green{
  background:var(--green); color:#053b2c;
  box-shadow:0 8px 22px -10px rgba(22,214,160,.8);
}
.btn--green:hover{ background:var(--green-deep); transform:translateY(-2px); }
.btn--ghost{
  background:#fff; color:var(--ink);
  border:1.5px solid var(--line);
}
.btn--ghost:hover{ border-color:var(--ink); transform:translateY(-2px); }
.btn--lg{ padding:15px 30px; font-size:16px; }

/* ============ NAV ============ */
.nav{
  position:fixed; top:18px; left:0; right:0; z-index:50;
  display:flex; justify-content:center; padding:0 20px;
}
.nav__bar{
  width:100%; max-width:var(--maxw);
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(180%) blur(14px);
  border:1px solid var(--line);
  border-radius:100px;
  padding:12px 14px 12px 28px;
  box-shadow:0 12px 40px -22px rgba(0,0,0,.4);
}
.nav__logo{ font-weight:800; font-size:20px; letter-spacing:-.02em; }
.nav__links{ display:flex; gap:30px; }
.nav__links a{ color:var(--ink-soft); text-decoration:none; font-size:15px; font-weight:500; }
.nav__links a:hover{ color:var(--ink); }
.nav__cta{ font-size:14px; padding:10px 22px; }

/* ============ HERO (pinned scroll-scrub) ============ */
.scroll-hero{
  position:relative;
  height:420vh;                 /* scroll distance that drives the animation */
  /* matches the render's soft studio vignette so the canvas blends seamlessly */
  background:radial-gradient(130% 120% at 50% 42%, #e9ebed 0%, #dde0e3 46%, #c6c9cd 100%);
}
.scroll-hero__sticky{
  position:sticky; top:0;
  height:100vh; width:100%;
  overflow:hidden;
  background:transparent;
}
.hero-grid{
  position:relative; z-index:2;
  height:100%;
  max-width:1320px; margin:0 auto;
  padding:0 48px;
  display:flex; align-items:center;
  pointer-events:none;            /* clicks pass through to nothing; buttons re-enable below */
}
.hero-text{ max-width:440px; }
.hero-text .btn{ pointer-events:auto; }
.eyebrow{
  text-transform:uppercase; letter-spacing:.34em;
  font-size:13px; color:var(--ink-soft); font-weight:600; margin-bottom:22px;
}
.hero-text h1{
  font-size:clamp(56px,7vw,104px);
  line-height:.94; font-weight:800; letter-spacing:-.04em;
}
.lede{
  margin-top:26px; font-size:18px; line-height:1.55;
  color:var(--ink-soft); max-width:430px;
}
.hero-actions{ margin-top:36px; display:flex; gap:14px; flex-wrap:wrap; }

.hero-stage{
  position:absolute; z-index:1;
  right:0; top:50%; transform:translateY(-50%);
  height:86vh;
  width:calc(86vh * 1.7927);   /* match the render's 16:9 ratio → no letterbox */
  max-width:74vw;
}
.hero-canvas{
  position:absolute; inset:0;
  width:100%; height:100%; display:block;
  /* feather the render's empty grey margins into the matching grey hero,
     so neither a box edge nor a letterbox seam is visible */
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%, #000 9%, #000 91%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 7%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to right,  transparent 0%, #000 9%, #000 91%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 7%, #000 96%, transparent 100%);
          mask-composite: intersect;
}

/* loader */
.hero-loader{
  position:absolute; left:50%; bottom:40px; transform:translateX(-50%);
  width:160px; height:3px; border-radius:3px;
  background:rgba(0,0,0,.08); overflow:hidden; transition:opacity .4s ease;
}
.hero-loader.is-done{ opacity:0; pointer-events:none; }
#hero-loader-bar{ display:block; height:100%; width:0%; background:var(--green); transition:width .15s ease; }

/* progress */
.scroll-progress{
  position:absolute; bottom:0; left:0; right:0; height:3px; background:var(--line);
}
#scroll-progress-bar{ display:block; height:100%; width:0%; background:var(--green); }

/* ============ FEATURES / BENTO ============ */
.features{ max-width:var(--maxw); margin:0 auto; padding:140px 24px 80px; }
.features__head h2{
  font-size:clamp(36px,4.6vw,60px); font-weight:800;
  letter-spacing:-.03em; line-height:1; margin-bottom:20px;
}
.features__head p{
  font-size:17px; color:var(--ink-soft); line-height:1.55; max-width:520px;
}

.bento{
  margin-top:56px;
  display:grid; grid-template-columns:1.45fr 1fr; gap:24px;
}
.bento-card{
  background:var(--bg-soft);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:34px;
  overflow:hidden;
}
.bento-card h3{ font-size:24px; font-weight:700; letter-spacing:-.02em; margin-bottom:10px; }
.bento-card p{ font-size:15.5px; line-height:1.55; color:var(--ink-soft); max-width:440px; }

/* glow feature */
.glow-stage{
  position:relative; height:230px; margin:-10px -10px 26px;
  border-radius:20px; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(120px 120px at 50% 46%, var(--green-tint), transparent 70%);
}
.glow-orb{
  position:absolute; width:230px; height:230px; border-radius:50%;
  background:radial-gradient(circle, rgba(22,214,160,.35), transparent 62%);
  filter:blur(8px);
}
.glow-icon{ position:relative; width:56px; height:56px; color:var(--ink); }
.glow-line{
  position:absolute; bottom:64px; width:120px; height:3px; border-radius:3px;
  background:linear-gradient(90deg,transparent,var(--green),transparent);
  box-shadow:0 0 18px 2px rgba(22,214,160,.6);
}

/* keycaps feature */
.keys-stage{
  height:230px; margin:-10px -10px 26px;
  border-radius:20px; background:#fff;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line);
}
.keys-stage img{ max-width:100%; max-height:100%; object-fit:contain; }

/* compatibility row */
.compat{
  margin-top:24px;
  background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius);
  padding:38px 24px;
  display:grid; grid-template-columns:repeat(4,1fr); gap:16px;
}
.compat__item{
  display:flex; flex-direction:column; align-items:center; gap:14px;
  color:var(--ink-soft);
}
.compat__item svg{ width:40px; height:40px; }
.compat__item span{
  font-size:12px; letter-spacing:.18em; text-transform:uppercase; font-weight:600;
}

/* ============ GENERIC SECTIONS ============ */
.section{ padding:90px 24px; max-width:var(--maxw); margin:0 auto; }
.section__title{
  font-size:clamp(32px,4vw,52px); font-weight:800;
  letter-spacing:-.03em; margin-bottom:56px; text-align:center;
}
.cards{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:18px;
}
.card{
  background:var(--bg-soft); border:1px solid var(--line);
  border-radius:20px; padding:30px 24px; transition:transform .25s ease, box-shadow .25s ease;
}
.card:hover{ transform:translateY(-4px); box-shadow:0 24px 50px -34px rgba(0,0,0,.4); }
.card__num{ font-size:13px; font-weight:700; color:var(--green-deep); letter-spacing:.1em; }
.card h3{ font-size:21px; margin:10px 0 10px; letter-spacing:-.01em; }
.card p{ font-size:14.5px; line-height:1.5; color:var(--ink-soft); }

.section--tech{ text-align:center; }
.tech__grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:40px; }
.stat{ display:flex; flex-direction:column; gap:8px; }
.stat__big{ font-size:clamp(46px,6vw,82px); font-weight:800; letter-spacing:-.03em; }
.stat__big::after{ content:""; }
.stat__label{ font-size:15px; color:var(--ink-soft); }

.section--cta{ text-align:center; padding:150px 24px; }
.section--cta h2{
  font-size:clamp(32px,4.5vw,60px); font-weight:800;
  letter-spacing:-.03em; line-height:1.05; margin-bottom:34px;
}

/* ============ FOOTER ============ */
.footer{
  border-top:1px solid var(--line);
  padding:40px 24px; text-align:center; color:var(--ink-soft); font-size:13px;
  display:flex; flex-direction:column; align-items:center; gap:12px;
}
.footer .nav__logo{ color:var(--ink); }

/* ============ REVEAL ON SCROLL ============ */
.reveal{ opacity:0; transform:translateY(30px); transition:opacity .7s ease, transform .7s ease; }
.reveal.is-in{ opacity:1; transform:none; }

/* ============ RESPONSIVE ============ */
@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; padding:0 28px; align-content:center; gap:10px; }
  .hero-text{ text-align:center; margin:0 auto; }
  .hero-actions{ justify-content:center; }
  .hero-stage{ height:46vh; }
  .hero-canvas{ position:relative; }
  .scroll-hero{ height:380vh; }
  .bento{ grid-template-columns:1fr; }
  .nav__links{ display:none; }
}
@media (max-width:560px){
  .compat{ grid-template-columns:repeat(2,1fr); gap:28px; }
}
