/* ============================================================
   VitaStock landing. Product-led dark, medical trust blue.
   Buildless. Cloudflare Pages.
   ============================================================ */

:root {
  --bg: #070a12;
  --bg-2: #0a0f1c;
  --surface: #0e1525;
  --surface-2: #121b30;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #eaf0fb;
  --muted: #93a1bc;
  --muted-2: #6b7894;
  --blue: #3b82f6;
  --blue-bright: #60a5fa;
  --cyan: #38bdf8;
  --glow: rgba(56,128,246,.55);
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --f: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 16px;
}

/* ---- Light theme overrides ---- */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --line: rgba(15,23,42,.10);
  --line-2: rgba(15,23,42,.16);
  --text: #0f1b2d;
  --muted: #51607a;
  --muted-2: #8593aa;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --cyan: #0ea5e9;
  --glow: rgba(37,99,235,.22);
}
:root[data-theme="light"] .hero__title { background: linear-gradient(180deg, #0f1b2d, #45597a); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .stat strong { background: linear-gradient(180deg, var(--blue), var(--blue-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .btn--ghost { background: rgba(15,23,42,.04); }
:root[data-theme="light"] .btn--ghost:hover { background: rgba(15,23,42,.08); }
:root[data-theme="light"] .pill { background: rgba(15,23,42,.03); }
:root[data-theme="light"] .browser__bar i { background: rgba(15,23,42,.16); }
:root[data-theme="light"] .browser { box-shadow: 0 24px 60px -28px rgba(15,23,42,.4); }
:root[data-theme="light"] .browser:hover { box-shadow: 0 34px 80px -28px rgba(15,23,42,.5), 0 0 40px -12px var(--glow); }
:root[data-theme="light"] .theme-toggle { border-color: var(--line-2); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.08; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-bright); margin-bottom: 18px; }
.eyebrow--center { display: block; text-align: center; }

/* ---- reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal[data-d="1"] { transition-delay: .09s; }
.reveal[data-d="2"] { transition-delay: .18s; }
.reveal[data-d="3"] { transition-delay: .27s; }
.reveal.in { opacity: 1; transform: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 12px 20px; border-radius: 11px; border: 1px solid transparent; transition: all .2s ease;
}
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 24px rgba(59,130,246,.35); }
.btn--primary:hover { background: var(--blue-bright); transform: translateY(-2px); box-shadow: 0 10px 32px rgba(59,130,246,.5); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-2px); }

.pill {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 7px 15px;
  border-radius: 999px; margin-bottom: 26px;
}

/* ---- browser frame ---- */
.browser {
  margin: 0; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 14px; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .3s;
}
.browser:hover { transform: translateY(-4px); border-color: rgba(96,165,250,.4); box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), 0 0 40px -10px var(--glow); }
.browser:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.14); }
.browser__url { margin-left: 12px; font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; height: auto; display: block; }

/* ============================ NAV ============================ */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.nav.is-stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(59,130,246,.4); }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav__links a:hover { color: var(--text); }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.theme-toggle:hover { color: var(--text); background: rgba(127,127,127,.08); }
.nav__links ~ .theme-toggle { margin-left: 0; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* ============================ HERO ============================ */
.hero { position: relative; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 80px); text-align: center; overflow: hidden; }
.hero__glow {
  position: absolute; top: -240px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 720px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(59,130,246,.30), rgba(56,189,248,.12) 40%, transparent 70%);
  filter: blur(20px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 40%, transparent 75%);
}
.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero__title { font-size: clamp(34px, 6vw, 66px); font-weight: 800; letter-spacing: -.035em; background: linear-gradient(180deg, #fff, #b9c6e0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 60ch; margin-top: 24px; }
.hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.browser--hero { margin-top: clamp(44px, 6vw, 76px); width: 100%; max-width: 1080px; }

/* ============================ FEATURES ============================ */
.feat { padding-block: clamp(60px, 9vw, 120px); display: grid; gap: clamp(64px, 9vw, 128px); }
.feat__row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feat__row--rev .feat__copy { order: 2; }
.feat__copy h2 { font-size: clamp(28px, 3.6vw, 42px); }
.feat__copy p { color: var(--muted); margin-top: 18px; font-size: 18px; max-width: 46ch; }
.ticks { margin-top: 26px; display: grid; gap: 13px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text); font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: rgba(59,130,246,.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ============================ IA ============================ */
.ia { padding-block: clamp(40px, 7vw, 90px); position: relative; }
.ia__inner { display: flex; flex-direction: column; align-items: center; }
.ia__head { text-align: center; max-width: 60ch; }
.ia__head h2 { font-size: clamp(28px, 4vw, 46px); }
.ia__head p { color: var(--muted); margin-top: 18px; font-size: 18px; }
.ia .browser { margin-top: clamp(36px, 5vw, 64px); width: 100%; max-width: 1000px; }

/* ============================ GALLERY ============================ */
.gallery { padding-block: clamp(60px, 9vw, 120px); }
.gallery__head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.gallery__head h2 { font-size: clamp(28px, 4vw, 46px); }
.gallery__head p { color: var(--muted); margin-top: 14px; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.browser--sm img { aspect-ratio: 1760 / 1100; object-fit: cover; object-position: top left; }
.browser--sm figcaption { padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--muted); border-top: 1px solid var(--line); }

/* ============================ STATS ============================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 32px); padding-block: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(44px, 7vw, 80px); font-weight: 800; letter-spacing: -.04em; background: linear-gradient(180deg, var(--blue-bright), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; }

/* ============================ CTA ============================ */
.cta { position: relative; padding-block: clamp(64px, 9vw, 120px); overflow: hidden; }
.cta__glow { position: absolute; bottom: -300px; left: 50%; transform: translateX(-50%); width: 1000px; height: 600px; background: radial-gradient(ellipse at center, rgba(59,130,246,.22), transparent 70%); filter: blur(30px); pointer-events: none; }
.cta__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.cta__copy h2 { font-size: clamp(30px, 4.4vw, 50px); }
.cta__copy p { color: var(--muted); margin-top: 18px; font-size: 18px; max-width: 40ch; }

.form { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; box-shadow: 0 30px 80px -40px rgba(0,0,0,.8); }
.field { display: grid; gap: 7px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2393a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field select:invalid { color: var(--muted-2); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.form .btn { grid-column: 1 / -1; margin-top: 8px; }
.form__done { grid-column: 1 / -1; text-align: center; padding: 22px 6px; }
.form__done h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.form__done p { color: var(--muted); }
.form__err { grid-column: 1 / -1; color: #f87171; font-size: 14px; margin-top: 2px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ============================ FOOTER ============================ */
.footer { border-top: 1px solid var(--line); padding-block: clamp(40px, 5vw, 64px); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer__tag { color: var(--muted); font-size: 15px; }
.footer__legal { color: var(--muted-2); font-size: 13px; }

/* ============================ LIGHTBOX ============================ */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 56px); background: rgba(3,5,10,.86); backdrop-filter: blur(8px); cursor: zoom-out; }
.lightbox.open { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox__img { max-width: 100%; max-height: 100%; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px rgba(0,0,0,.9); }
.lightbox__close { position: absolute; top: 20px; right: 26px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.06); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: background .2s; }
.lightbox__close:hover { background: rgba(255,255,255,.16); }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 880px) {
  .feat__row, .cta__inner { grid-template-columns: 1fr; }
  .feat__row--rev .feat__copy { order: 0; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .gallery__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(29px, 8vw, 40px); }
  .hero__title br { display: none; }
}

/* ============================ MOTION SAFETY ============================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .browser:hover { transform: none; }
  html { scroll-behavior: auto; }
}
