/* localdevstudio.com: the app's own design system, applied to the site.
   Black, white, gray. White is the only emphasis: one filled action per
   surface, everything else outlined or dimmed. Real screenshots do the
   talking; motion stays, color doesn't. */

:root {
  --void:      #0A0A0B;
  --surface:   #111113;
  --surface-2: #18181B;
  --surface-3: #212125;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.15);
  --white:     #FFFFFF;
  --gray:      #A8A8B0;   /* 8.7:1 on void */
  --gray-dim:  #78787F;   /* 4.6:1 on void — secondary only */
  --gray-mute: #55555C;   /* decorative only */

  --paper:      #FFFFFF;
  --paper-ink:  #0A0A0C;
  --paper-2:    #5A5A63;   /* 6.4:1 on white */
  --paper-line: #E7E7EA;

  --display: "Instrument Sans", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --wide: 1240px;
  --text: 640px;
  --e: cubic-bezier(.22,.9,.28,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--gray);
  background: var(--void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--white); color: #000; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--white);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: clamp(2.9rem, 8vw, 6.2rem); font-weight: 700; }
h2 { font-size: clamp(2.1rem, 5vw, 3.7rem); }
h3 { font-size: 1.32rem; letter-spacing: -0.02em; }
h4 { font-size: 1.02rem; letter-spacing: -0.015em; }

.mono { font-family: var(--mono); font-size: 0.92em; }
.white-t { color: var(--white); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gray-dim);
  margin-bottom: 1.6rem;
}
.tick { width: 6px; height: 6px; border-radius: 50%; background: var(--white); flex: none; }

/* ───────── scroll progress rail ───────── */
.scroll-rail { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90; pointer-events: none; }
.scroll-rail span {
  display: block; height: 100%; width: 100%; background: var(--white);
  transform-origin: 0 50%; transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .scroll-rail span { animation: rail linear both; animation-timeline: scroll(root block); }
}
@keyframes rail { to { transform: scaleX(1); } }

/* ───────── buttons — the app's two kinds: one white fill, outlined pills ───────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  letter-spacing: -0.01em;
  padding: .95rem 1.7rem; border-radius: 999px; cursor: pointer;
  transition: background-color .25s var(--e), color .25s var(--e),
              border-color .25s var(--e), transform .35s var(--e);
  will-change: transform;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn-fill { background: var(--white); color: #0A0A0B; }
.btn-fill:hover { background: #DEDEE4; }
.btn-line { border: 1px solid var(--line-2); color: var(--white); }
.btn-line:hover { border-color: var(--white); background: rgba(255,255,255,.05); }
.btn-small { padding: .58rem 1.2rem; font-size: .9rem; }
.btn-block { width: 100%; margin-top: auto; }

kbd {
  font-family: var(--mono); font-size: .68rem; color: var(--gray);
  border: 1px solid var(--line-2); border-radius: 5px; padding: .1rem .4rem;
}

/* ───────── nav, styled like the app's titlebar ───────── */
.nav-wrap {
  position: sticky; top: 0; z-index: 80;
  background: rgba(10,10,11,.88);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--wide); margin: 0 auto;
  padding: .8rem 1.6rem; display: flex; align-items: center; gap: 2.2rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--white); }
.brand .mark { width: 30px; height: 30px; color: var(--white); transition: transform .5s var(--e); }
.brand:hover .mark { transform: translateY(2px); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.03em; }
.brand-name em { font-style: normal; font-weight: 500; color: var(--gray-dim); }

/* tabs like Extractor | Studio: quiet text, white underline when current */
.nav-tabs { display: flex; gap: 1.9rem; }
.nav-tabs a {
  position: relative; font-size: .95rem; color: var(--gray);
  padding: .35rem 0; transition: color .2s var(--e);
}
.nav-tabs a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--white); border-radius: 2px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s var(--e);
}
.nav-tabs a:hover { color: var(--white); }
.nav-tabs a:hover::after, .nav-tabs a.on::after { transform: scaleX(1); }
.nav-tabs a.on { color: var(--white); }

/* the app's Search · Ctrl K pill */
.kbd-pill {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-size: .88rem; color: var(--gray-dim);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .6rem .45rem .9rem; cursor: pointer;
  transition: color .2s var(--e), border-color .2s var(--e);
}
.kbd-pill svg { width: 15px; height: 15px; }
.kbd-pill:hover { color: var(--gray); border-color: var(--line-2); }
@media (max-width: 900px) { .kbd-pill { display: none; } .nav > .btn { margin-left: auto; } }
@media (max-width: 780px) { .nav-tabs { display: none; } }
@media (max-width: 430px) {
  /* keep "Local Dev Studio" on one line beside the download button */
  .nav { padding: .8rem 1.1rem; }
  .brand-name { font-size: .98rem; white-space: nowrap; }
  .brand .mark { width: 26px; height: 26px; }
}

/* ───────── hero ───────── */
.hero { position: relative; padding: clamp(4rem, 10vh, 7rem) 1.6rem 0; overflow: hidden; }
.spotlight {
  position: absolute; inset: -20% -10% auto; height: 720px;
  background: radial-gradient(520px 420px at var(--mx, 50%) var(--my, 30%),
              rgba(255,255,255,.05), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: var(--wide); margin: 0 auto; text-align: center; }

/* like the app's "● Ready" status */
.status {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em;
  color: var(--gray-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .95rem; margin-bottom: 2rem;
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--white); }

.hero-h1 .line { display: block; }
.hero-h1 .word { display: inline-block; }
.drain { position: relative; }
.drain::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .09em;
  background: var(--white); border-radius: 2px;
  transform-origin: 100% 50%;
}
.js .drain::after { animation: drain 4.5s var(--e) 1.4s infinite; }
@keyframes drain {
  0%   { transform: scaleX(1); transform-origin: 100% 50%; }
  22%  { transform: scaleX(0); transform-origin: 100% 50%; }
  23%  { transform: scaleX(0); transform-origin: 0 50%; }
  48%  { transform: scaleX(1); transform-origin: 0 50%; }
  100% { transform: scaleX(1); transform-origin: 0 50%; }
}
.lede {
  max-width: var(--text); margin: 2rem auto 0;
  font-size: clamp(1.06rem, 1.8vw, 1.22rem); color: var(--gray);
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 2.6rem; }
.micro { margin-top: 1.5rem; font-size: .86rem; color: var(--gray-dim); }
.micro.center { text-align: center; }

/* ───────── screenshots in window frames ─────────
   Every shot is captured at 2x device pixels (the toast at 3x) so nothing
   ever upscales, even on a 3x phone. width/height attrs + height:auto keep
   the boxes stable before the pixels arrive. */
.shot-frame {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(0,0,0,.9);
}
.shot-frame img { width: 100%; }
.stage { max-width: 1080px; margin: clamp(3.5rem, 8vh, 6rem) auto 0; }
.stage figcaption { margin-top: 1.1rem; font-family: var(--mono); font-size: .74rem; }

/* the hero window settles upright as it scrolls into view */
@supports (animation-timeline: view()) {
  .js .hero-shot {
    animation: heroSettle var(--e) both;
    animation-timeline: view();
    animation-range: entry 0% cover 38%;
    transform-origin: 50% 12%;
  }
  @keyframes heroSettle {
    from { transform: perspective(1300px) rotateX(7deg) scale(.965); }
    to   { transform: none; }
  }
}

/* ───────── marquee ───────── */
.marquee {
  margin-top: clamp(4rem, 10vh, 7rem);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.1rem 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; gap: 2.2rem; width: max-content;
  font-family: var(--mono); font-size: .82rem; color: var(--gray-dim);
  white-space: nowrap;
}
.js .marquee-track { animation: slide 46s linear infinite; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee .sep { color: var(--gray-mute); }

/* ───────── section shells ───────── */
.sec-head { max-width: var(--wide); margin: 0 auto; padding: 0 1.6rem; }
.sec-head.center { text-align: center; }
.sec-lede { max-width: var(--text); margin-top: 1.4rem; font-size: 1.08rem; }
.sec-head.center .sec-lede { margin-inline: auto; }

/* ───────── how: three moves, each with the real UI ───────── */
.how { padding: clamp(6rem, 15vh, 11rem) 0 0; }
.steps {
  list-style: none; max-width: var(--wide); margin: clamp(3rem, 7vh, 5rem) auto 0;
  padding: 0 1.6rem; display: flex; flex-direction: column; gap: clamp(2.6rem, 6vh, 4rem);
}
.step {
  position: relative; padding-top: 2rem;
  display: grid; grid-template-columns: minmax(260px, .8fr) 1.4fr;
  gap: clamp(1.8rem, 4vw, 3.5rem); align-items: center;
}
.step::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line-2); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .9s var(--e);
}
.step.in::before { transform: scaleX(1); }
.step-n { font-family: var(--mono); font-size: .78rem; color: var(--white); letter-spacing: .1em; }
.step h3 { margin: .8rem 0 .7rem; font-size: 1.5rem; }
.step p { font-size: .99rem; }
.step-shot { border-radius: 12px; box-shadow: 0 26px 70px -30px rgba(0,0,0,.8); }
.step-shot.pad {
  padding: 2.4rem 1.6rem; display: flex; justify-content: center; background: var(--void);
}
/* the toast is a 3x capture: pin it to its real ~274px size, never larger */
.step-shot img.natural { width: min(274px, 100%); }
@media (max-width: 880px) {
  .step { grid-template-columns: 1fr; align-items: start; }
  .steps { max-width: 640px; }
}

/* ───────── studio (inverted slab) ───────── */
.studio {
  margin-top: clamp(6rem, 15vh, 11rem);
  background: var(--paper); color: var(--paper-2);
  padding: clamp(5rem, 12vh, 8rem) 0 clamp(5rem, 12vh, 8rem);
  border-radius: 28px 28px 0 0;
}
.studio h2, .studio h3, .studio h4 { color: var(--paper-ink); }
.studio .eyebrow { color: #83838C; }
.studio .tick { background: var(--paper-ink); }

.show {
  max-width: var(--wide); margin: clamp(3rem, 7vh, 5rem) auto 0; padding: 0 1.6rem;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.show-copy { display: flex; flex-direction: column; gap: 1px; }
.beat {
  padding: 1.7rem 0 1.7rem 1.5rem; border-left: 2px solid var(--paper-line);
  opacity: .42; transition: opacity .5s var(--e), border-color .5s var(--e);
}
.beat.on { opacity: 1; border-color: var(--paper-ink); }
.beat h3 { margin-bottom: .5rem; }
/* ShowCase is still in beta; the label matches the one on the app's tab. */
.beta {
  display: inline-block; vertical-align: .3em; margin-left: .45rem;
  font-family: var(--mono); font-size: .66rem; font-weight: 500; line-height: 1;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-2); border: 1px solid #CFCFD5; border-radius: 999px;
  padding: .3rem .55rem;
}
.beat p { font-size: .99rem; }

.show-stick { position: sticky; top: 96px; }
/* One app window that changes state as you read: the three shots share the
   exact same framing and dimensions, stacked in one grid cell and
   crossfaded — the panel never changes height, so nothing ever jumps. */
.panel {
  display: grid;
  background: var(--void); border: 1px solid #D9D9DE; border-radius: 14px;
  padding: .9rem; overflow: hidden;
  box-shadow: 0 30px 80px -34px rgba(10,10,12,.5);
}
.panel .state {
  grid-area: 1 / 1; width: 100%; border-radius: 7px;
  opacity: 0; transform: scale(.988);
  transition: opacity .5s var(--e), transform .5s var(--e);
}
.panel[data-state="0"] .s0,
.panel[data-state="1"] .s1,
.panel[data-state="2"] .s2,
.panel[data-state="3"] .s3 { opacity: 1; transform: none; }
.panel-cap {
  margin-top: .9rem; text-align: center;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: #83838C;
}

@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; }
  .show-stick { position: static; order: -1; }
  .beat { opacity: 1; border-left-color: var(--paper-ink); }
}
/* On small screens motion.js tucks each shot under the beat it belongs to —
   a dead sticky panel above three paragraphs helps nobody on a phone. */
.show.inlined .show-stick { display: none; }
.beat-shot { margin-top: 1.2rem; }
.beat-shot img {
  width: 100%; border-radius: 10px; border: 1px solid #D9D9DE;
  background: var(--void); padding: .45rem;
  box-shadow: 0 18px 44px -20px rgba(10,10,12,.4);
}

.feat-grid {
  max-width: var(--wide); margin: clamp(4rem, 9vh, 6rem) auto 0; padding: 0 1.6rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--paper-line);
}
.feat { padding: 2rem 1.6rem 2rem 0; border-bottom: 1px solid var(--paper-line); }
.feat h4 { margin-bottom: .45rem; }
.feat p { font-size: .94rem; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feat-grid { grid-template-columns: 1fr; } }

/* ───────── review ───────── */
.review { padding: clamp(6rem, 15vh, 11rem) 0; }
.review-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 1.6rem;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(3rem, 6vw, 5rem); align-items: center;
}
/* Sized so "Point. Comment. Rate." holds its own line in this column
   instead of dropping "Rate." on a line by itself. */
.review h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.review-copy p { margin-top: 1.3rem; max-width: 34rem; }
.ticks { list-style: none; margin-top: 2rem; display: grid; gap: .8rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--white); font-size: .99rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: .9em; height: .5em; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white);
  transform: rotate(-45deg);
}
.review-visual { display: flex; flex-direction: column; align-items: center; }
.anno {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.1rem 1.3rem;
}
.anno-sel { font-family: var(--mono); font-size: .82rem; color: var(--white); }
.anno-tags { display: flex; gap: .45rem; margin-top: .6rem; }
.tag { font-family: var(--mono); font-style: normal; font-size: .66rem; padding: .18rem .55rem; border-radius: 999px; }
.tag.sev { background: rgba(255,255,255,.1); color: var(--white); }
.tag.rate { border: 1px solid var(--line-2); color: var(--gray); }
.anno-note { margin-top: .8rem; font-size: .95rem; }
.feed { width: 22px; height: 52px; color: var(--white); opacity: .45; }
.js .feed { animation: feed 3s var(--e) infinite; }
@keyframes feed { 0%,100% { opacity: .25; transform: translateY(-2px); } 50% { opacity: .8; transform: translateY(2px); } }
.doc { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.doc-name { display: block; font-family: var(--mono); font-size: .72rem; color: var(--gray-dim); padding: .6rem 1.2rem; border-bottom: 1px solid var(--line); }
.doc-body { font-family: var(--mono); font-size: .78rem; line-height: 1.85; color: #C6C6CC; padding: 1rem 1.2rem 1.2rem; overflow-x: auto; }
@media (max-width: 920px) { .review-inner { grid-template-columns: 1fr; } }

/* ───────── download ───────── */
.download { padding: 0 0 clamp(6rem, 14vh, 9rem); }
.dl-grid {
  max-width: 900px; margin: clamp(3rem, 6vh, 4rem) auto 0; padding: 0 1.6rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.dl {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2rem 1.9rem;
  transition: border-color .3s var(--e), transform .4s var(--e);
}
.dl:hover { border-color: var(--line-2); transform: translateY(-3px); }
.dl-file { color: var(--white); font-size: .84rem; }
.dl-copy { font-size: .96rem; margin-bottom: 1.2rem; }
@media (max-width: 720px) { .dl-grid { grid-template-columns: 1fr; } }

/* ───────── footer ───────── */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--wide); margin: 0 auto; padding: clamp(3.5rem, 8vh, 5rem) 1.6rem 2.2rem;
  display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; align-items: flex-start;
}
.footer-tag { font-size: .94rem; }
.footer-links { display: flex; flex-direction: column; gap: .55rem; }
.footer-links a { font-size: .94rem; color: var(--gray); transition: color .2s var(--e); }
.footer-links a:hover { color: var(--white); }
.footer-legal {
  max-width: var(--wide); margin: 0 auto; padding: 1.4rem 1.6rem 2.4rem;
  border-top: 1px solid var(--line); font-size: .8rem; color: var(--gray-dim);
}

/* ───────── command palette, the app's Ctrl+K on the site ───────── */
.pal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5,5,6,.6); backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: min(14vh, 160px) 1rem 1rem;
}
.pal {
  width: 100%; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  overflow: hidden; box-shadow: 0 40px 120px -20px rgba(0,0,0,.9);
  animation: palIn .22s var(--e) both;
}
@keyframes palIn { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
.pal-search {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line);
}
.pal-search svg { width: 18px; height: 18px; color: var(--gray-dim); flex: none; }
.pal-search input {
  flex: 1; background: none; border: 0; outline: none;
  font-family: var(--body); font-size: 1.02rem; color: var(--white);
}
.pal-search input::placeholder { color: var(--gray-dim); }
.pal-list { list-style: none; max-height: 320px; overflow-y: auto; padding: .5rem; }
.pal-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .68rem .8rem; border-radius: 9px; cursor: pointer;
  color: var(--gray); font-size: .95rem;
}
.pal-item svg { width: 16px; height: 16px; flex: none; color: var(--gray-dim); }
.pal-item .hint { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--gray-dim); }
.pal-item.sel { background: rgba(255,255,255,.07); color: var(--white); }
.pal-item.sel svg { color: var(--white); }
.pal-empty { padding: 1.4rem; text-align: center; font-size: .9rem; color: var(--gray-dim); }
.pal-foot {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem 1.2rem; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--gray-dim);
}
.pal-foot kbd { margin-right: .1rem; }
body.pal-open { overflow: hidden; }

/* ───────── reveal ───────── */
.js .rise, .js .reveal { opacity: 0; transform: translateY(18px); }
.js .rise { animation: rise .9s var(--e) both; animation-delay: var(--d, 0ms); }
.js .reveal { transition: opacity .8s var(--e), transform .8s var(--e); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ───────── reduced motion: everything still, nothing hidden ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise, .js .reveal { opacity: 1 !important; transform: none !important; }
  .step::before { transform: scaleX(1) !important; }
  .drain::after { transform: scaleX(1) !important; }
  .spotlight { display: none; }
  .js .hero-shot { animation: none !important; transform: none !important; }
}
