/* ============================================================
   PDF Forge - showcase page (Givata)
   Dark, engineered canvas. One amber signal, bone type, Archivo +
   JetBrains Mono. The product screenshots are light, so they read
   as objects sitting on the surface rather than part of it.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:root {
  --bg:        oklch(0.155 0.010 62);
  --surface:   oklch(0.196 0.012 62);
  --surface-2: oklch(0.238 0.013 62);
  --ink:       oklch(0.955 0.008 84);
  --muted:     oklch(0.780 0.012 78);
  --faint:     oklch(0.640 0.012 76);
  --line:      oklch(0.300 0.012 62);
  --line-2:    oklch(0.380 0.014 62);

  --primary:      oklch(0.800 0.150 74);
  --primary-hi:   oklch(0.870 0.135 78);
  --primary-tint: oklch(0.300 0.055 70);

  --ok:   oklch(0.800 0.135 155);
  --warn: oklch(0.830 0.140 90);
  --bad:  oklch(0.720 0.160 25);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --shell: 1180px;
  --pad: clamp(1.15rem, 4vw, 2.25rem);
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-nav: 100;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.06rem);
  line-height: 1.62;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; font-size: 0.92em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 500;
  background: var(--primary); color: oklch(0.16 0.01 62);
  padding: 0.6rem 1rem; border-radius: var(--r-sm); font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.4rem, 1.5rem + 3.9vw, 4.1rem); }
h1 em { font-style: normal; color: var(--primary); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem); }
h4 { font-size: 1.06rem; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 1.1rem;
}
.lede { color: var(--muted); font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.05rem; border-radius: 999px;
  font-weight: 600; font-size: 0.94rem; letter-spacing: -0.01em;
  border: 1px solid transparent; transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn--primary { background: var(--primary); color: oklch(0.17 0.02 62); }
.btn--primary:hover { background: var(--primary-hi); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.nav--scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; letter-spacing: -0.02em; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.nav__links { display: flex; gap: 1.5rem; margin-left: auto; font-size: 0.93rem; color: var(--muted); }
.nav__links a:hover { color: var(--primary); }
.nav__cta { display: flex; gap: 0.6rem; }
.nav__menu { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__menu span { width: 16px; height: 1.5px; background: var(--ink); display: block; }

@media (max-width: 900px) {
  .nav__links {
    position: absolute; inset: 66px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1rem; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-left: auto; }
  .nav__cta .btn--ghost { display: none; }
  .nav__menu { display: flex; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { max-width: 66ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section__head h2 { margin-bottom: 1rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.hero__glow {
  position: absolute; inset: -25% -10% auto -10%; height: 70%;
  background: radial-gradient(60% 60% at 30% 20%, var(--primary-tint), transparent 70%);
  opacity: 0.55; pointer-events: none;
}
.hero__inner { position: relative; }
.hero h1 { margin-bottom: 1.4rem; max-width: 17ch; }
.hero__lede { margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.6rem; }
.hero__note { color: var(--faint); font-size: 0.92rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.stat { background: var(--bg); padding: 1.3rem 1.4rem; }
.stat b { display: block; font-family: var(--mono); font-size: 1.5rem; color: var(--primary); letter-spacing: -0.02em; }
.stat span { display: block; color: var(--faint); font-size: 0.86rem; margin-top: 0.3rem; }

/* ---------- Video ---------- */
.videoframe {
  border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden;
  background: oklch(0.12 0.008 62);
  box-shadow: 0 40px 90px -40px oklch(0 0 0 / 0.8);
}
.videoframe video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.videoframe__cap { color: var(--faint); font-size: 0.9rem; margin-top: 0.9rem; text-align: center; }
.videoframe--pending {
  aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center;
  padding: 2rem; color: var(--faint);
}
.videoframe--pending .mono { color: var(--primary); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* Grid children default to min-content width, so a wide <pre> inside one pushes
   the whole track past the viewport instead of scrolling inside its own box. */
.split > * { min-width: 0; }
.split--flip .split__body { order: 2; }
.split__body h3 { margin-bottom: 1rem; }
.split__body > p { color: var(--muted); margin-bottom: 1.2rem; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__body { order: 0; }
}

.feat-list { display: grid; gap: 0.7rem; }
.feat-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--muted); font-size: 0.97rem; }
.feat-list svg { flex: none; margin-top: 0.34rem; color: var(--primary); }

/* Copy on the left, the checklist on the right, and the screenshot full width
   underneath - a 1440px UI shrunk into a half column is unreadable. */
.duo { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; margin-bottom: clamp(2rem, 4vw, 2.8rem); }
.duo > * { min-width: 0; }
.duo h3 { margin-bottom: 1rem; }
.duo p { color: var(--muted); margin-bottom: 1rem; }
@media (max-width: 880px) { .duo { grid-template-columns: 1fr; } }

/* ---------- Shots ---------- */
.shot {
  border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 30px 70px -35px oklch(0 0 0 / 0.85);
}
.shot img { width: 100%; height: auto; }
.shot--tall img { max-height: 620px; object-fit: cover; object-position: top center; }
.shot--doc img { max-height: 900px; object-fit: contain; background: #fff; }
.shot__cap { color: var(--faint); font-size: 0.85rem; margin-top: 0.7rem; }

/* ---------- Gate grid ---------- */
.gate { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 2rem; }
.gate__card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.2rem; }
.gate__code { font-family: var(--mono); font-size: 0.8rem; color: var(--primary); letter-spacing: 0.02em; margin-bottom: 0.5rem; }
.gate__card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Terminal ---------- */
.code {
  border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden;
  background: oklch(0.125 0.008 62);
}
.code__bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 0.76rem; }
.code__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.code__bar span:last-child { margin-left: 0.5rem; }
.code pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--mono); font-size: 0.79rem; line-height: 1.75; color: var(--muted); }
.code .c { color: var(--faint); }
.code .k { color: var(--primary); }
.code .s { color: oklch(0.82 0.09 160); }
.code .e { color: var(--bad); }
.code .w { color: var(--warn); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.fcard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; }
.fcard h4 { margin-bottom: 0.5rem; }
.fcard p { color: var(--muted); font-size: 0.93rem; }
.section--tint .fcard { background: var(--surface-2); border-color: var(--line-2); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.chip { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.3rem 0.75rem; }

/* ---------- Before / after ---------- */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ba__col { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; background: var(--bg); }
.ba__col--after { border-color: var(--primary-tint); background: var(--surface-2); }
.ba__k { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.9rem; }
.ba__col--after .ba__k { color: var(--primary); }
.ba__col li { color: var(--muted); font-size: 0.95rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.ba__col li:last-child { border-bottom: 0; }
@media (max-width: 720px) { .ba { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-band { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.cta-panel {
  border: 1px solid var(--line-2); border-radius: var(--r-xl);
  background: linear-gradient(140deg, var(--surface-2), var(--surface));
  padding: clamp(2.2rem, 5vw, 3.6rem); text-align: center;
}
.cta-panel h2 { margin-bottom: 0.9rem; }
.cta-panel p { color: var(--muted); margin-bottom: 1.8rem; max-width: 52ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer__tag { color: var(--faint); font-size: 0.9rem; }
.footer__links { display: flex; gap: 1.2rem; margin-left: auto; font-size: 0.9rem; color: var(--muted); }
.footer__links a:hover { color: var(--primary); }
.footer__legal { width: 100%; color: var(--faint); font-size: 0.85rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer__legal a { color: var(--primary); }

/* ---------- Reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Givata home link (back to givata.com root) */
.nav__lead { display: inline-flex; align-items: center; gap: 0.7rem; min-width: 0; }
.nav__home { display: inline-flex; align-items: center; gap: 0.4em; color: var(--muted); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; transition: color 0.2s var(--ease); }
.nav__home:hover { color: var(--ink); }
.nav__home img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.nav__sep { width: 1px; height: 20px; background: var(--line-2); flex-shrink: 0; }
@media (max-width: 560px) { .nav__home span { display: none; } .nav__lead { gap: 0.5rem; } }
