/* GENA Labs landing page. Values mirror the "GenaLabs Home" design file. */

:root {
  --bg: #F4F5FA;
  --ink: #0F172A;
  --navy: #100F2E;
  --body: #556074;
  --muted: #64748B;
  --line: #E6E9F2;
  --blue: #0A66F0;
  --blue-hover: #0050C8;
  --violet: #5B4BD6;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Bai Jamjuree', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: #CFE1FF; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.i { flex: none; fill: currentColor; }

.page { position: relative; overflow-x: clip; min-height: 100vh; }

.wrap { position: relative; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Background blobs */
.blobs { position: absolute; inset: 0 0 auto 0; height: 1100px; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; }
.blob-1 { width: min(720px, 110vw); height: min(720px, 110vw); right: -180px; top: -260px; background: #3B8BFF; opacity: clamp(.14, calc(.38 * (100vw - 300px) / 900px), .38); filter: blur(110px); }
.blob-2 { width: min(560px, 80vw); height: min(560px, 80vw); right: 22%; top: 80px; background: #6A5AE0; opacity: clamp(.1, calc(.3 * (100vw - 300px) / 900px), .3); filter: blur(120px); }
.blob-3 { width: min(380px, 70vw); height: min(380px, 70vw); left: -120px; top: 120px; background: #36C9C6; opacity: clamp(.1, calc(.2 * (100vw - 300px) / 900px), .2); filter: blur(110px); }
.blob-4 { width: min(300px, 60vw); height: min(300px, 60vw); right: 8%; top: 520px; background: #FF8A5B; opacity: clamp(.08, calc(.18 * (100vw - 300px) / 900px), .18); filter: blur(110px); }

/* Brand */
.brand-bar { z-index: 5; display: flex; align-items: center; padding-top: clamp(20px, 3vw, 32px); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand img { height: clamp(34px, 3.6vw, 44px); width: auto; }
.brand-labs { font-size: clamp(21px, 2.2vw, 26px); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--navy); line-height: 1; margin-left: -2px; padding-top: 2px; }
.brand-sm { gap: 8px; }
.brand-sm img { height: 34px; }
.brand-sm .brand-labs { font-size: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 15px; transition: filter .2s, transform .2s, background .2s; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-lg { gap: 10px; height: 54px; padding: 0 26px; border-radius: 999px; font-size: 16.5px; }
.btn-primary { background: linear-gradient(180deg, #2A86FF, #0A66F0); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -8px rgba(10,102,240,.7); }
.btn-lg.btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,40,120,.25), 0 14px 28px -10px rgba(10,102,240,.65); }
.btn-primary:hover { filter: brightness(1.08); color: #FFFFFF; }
.btn-lg.btn-primary:hover { transform: translateY(-1px); }
.btn-glass { background: rgba(255,255,255,.32); -webkit-backdrop-filter: blur(12px) saturate(180%); backdrop-filter: blur(12px) saturate(180%); border: 1px solid rgba(255,255,255,.85); color: var(--ink); box-shadow: inset 0 1px 1px rgba(255,255,255,.95), inset 0 -1px 1px rgba(16,15,46,.08), inset 0 0 14px rgba(255,255,255,.55), 0 10px 24px -12px rgba(16,15,46,.3); }
.btn-glass:hover { background: rgba(255,255,255,.6); transform: translateY(-1px); color: var(--ink); }
.btn-soft { background: rgba(255,255,255,.5); border: 1px solid #D9DEEA; color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 6px 14px -8px rgba(16,15,46,.25); }
.btn-soft:hover { background: #FFFFFF; color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(64px, 9vw, 112px);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.6); border: 1px solid #CFE1FF; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--blue); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
h1 { font-size: clamp(42px, 6.4vw, 74px); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
.hl { color: #0A5FE0; }
.lede { max-width: 34em; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: #475266; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

/* Glow border: a 1px gradient frame that follows the pointer (main.js sets --gx/--gy/--gp). */
.glow {
  --hue: 212;
  --spread: 48;
  --sat: 100%;
  --lum: 60%;
  position: relative;
  padding: 1px;
  border-radius: 24px;
  background:
    radial-gradient(340px circle at var(--gx, -600px) var(--gy, -600px), hsl(calc(var(--hue) + var(--gp, 0) * var(--spread)) var(--sat) var(--lum)), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.35));
  box-shadow: 0 30px 60px -28px rgba(16,15,46,.35);
}
.glass { height: 100%; border-radius: 23px; -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); display: flex; flex-direction: column; gap: 18px; }

/* Rotating card stack */
.stack { display: grid; padding-top: 24px; }
.stack-card {
  grid-area: 1 / 1;
  transform-origin: 50% 0;
  transition: transform .8s var(--ease), opacity .8s var(--ease), filter .8s;
  transform: translateY(-24px) scale(.93);
  opacity: .7;
  filter: blur(1px);
  z-index: 1;
  pointer-events: none;
}
.stack-card.is-active { transform: translateY(0) scale(1); opacity: 1; filter: none; z-index: 2; pointer-events: auto; }
.stack-card .glass { padding: clamp(20px, 2.6vw, 28px); background: linear-gradient(180deg, rgba(255,255,255,.93), rgba(248,250,255,.9)); }
.stack-inner { flex: 1; display: flex; flex-direction: column; gap: 18px; transition: opacity .5s; opacity: 0; }
.stack-card.is-active .stack-inner { opacity: 1; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head-l { display: flex; align-items: center; gap: 10px; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.badge { font-size: 11px; font-weight: 600; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; }
.badge-green { color: #15803D; background: #DCFCE7; }
.badge-violet { color: #4B3FC0; background: #EEEBFF; }
.tool-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.tool-link span { font-weight: 400; color: var(--muted); }
.tool-link:hover { color: var(--blue); }

.field { padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.85); border: 1px solid var(--line); font-size: 17px; line-height: 1.7; color: #1E293B; min-height: calc(1.7em + 34px); }
.field.search { display: flex; align-items: center; gap: 12px; }
.field.search .i { fill: var(--muted); }
.field.search [data-type] { min-height: 1.7em; }
.mark { border-bottom: 2px solid #3B8BFF; background: rgba(59,139,255,.08); transition: background .4s, border-color .4s; }
.mark-neg { border-bottom-color: #94A3B8; background: rgba(148,163,184,.12); }
.js .mark:not(.is-lit) { border-bottom-color: transparent; background: transparent; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -.15em; background: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.75); border: 1px solid #EEF0F6; transition: opacity .45s, transform .5s var(--ease); }
.row > div { min-width: 0; }
.row small { display: block; font-size: 12px; color: var(--muted); }
.row strong { display: block; font-weight: 600; }
.js .row:not(.is-in) { opacity: 0; transform: translateY(8px); }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip-blue { color: var(--blue); background: #E8F1FF; }
.chip-grey { color: #475569; background: #EEF1F6; }
.chip-green { color: #15803D; background: #DCFCE7; }
.chip-violet { color: #4B3FC0; background: #EEEBFF; }
.code { font-family: var(--mono); font-size: 12px; color: #334155; border: 1px solid #E2E8F0; padding: 3px 8px; border-radius: 999px; background: #FFFFFF; white-space: nowrap; }
.meta { margin-top: auto; font-family: var(--mono); font-size: 12.5px; color: var(--muted); transition: opacity .45s; }
.js .meta:not(.is-in) { opacity: 0; }

/* Sections */
.section { display: flex; flex-direction: column; gap: 36px; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); scroll-margin-top: 8px; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; color: var(--blue); }
h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.section-sub { max-width: 36em; font-size: 17px; color: var(--body); }

/* Tool cards */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; }
.tool {
  background:
    radial-gradient(380px circle at var(--gx, -600px) var(--gy, -600px), hsl(calc(var(--hue) + var(--gp, 0) * var(--spread)) var(--sat) var(--lum)), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.95), rgba(226,232,244,.9));
  box-shadow: 0 24px 50px -30px rgba(16,15,46,.3);
  transition: transform .3s;
  --tint: rgba(59,139,255,.08);
}
.tool:hover { transform: translateY(-3px); }
.tool-violet { --hue: 232; --spread: 40; --sat: 90%; --lum: 64%; --tint: rgba(106,90,224,.09); }
.tool .glass { padding: clamp(24px, 3vw, 32px); background: radial-gradient(420px circle at var(--gx, -600px) var(--gy, -600px), var(--tint), transparent 70%), rgba(255,255,255,.78); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.tool-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-name { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.tool-name span { font-weight: 400; color: var(--muted); }
.tag { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; }
.tag-grey { color: #475569; background: #EEF1F6; }
.tag-violet { color: #4B3FC0; background: #EEEBFF; }
.tool h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.hl-blue { color: #1677FF; }
.hl-violet { color: var(--violet); }
.tool p { font-size: 16.5px; color: var(--body); }
.checks { list-style: none; margin: 0; padding: 4px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: center; color: #334155; }
.checks .i { fill: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 0 8px; }
.stat { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.8); border: 1px solid #EEF0F6; }
.stat b { display: block; font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; color: var(--violet); }
.stat span { display: block; font-size: 14px; line-height: 1.4; color: var(--body); }
.tool-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.url { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.step { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 22px; background: rgba(255,255,255,.55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #FFFFFF, 0 16px 36px -26px rgba(16,15,46,.3); }
.step-num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--blue); }
.step h3 { font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.step p { font-size: 16px; color: var(--body); }
.step-accent { background: linear-gradient(160deg, rgba(232,241,255,.85), rgba(238,235,255,.75)); border-color: #CFE1FF; box-shadow: inset 0 1px 0 #FFFFFF, 0 16px 36px -26px rgba(10,102,240,.4); }
.step-accent p { color: #3E4A63; }

/* GENA 3.0 band */
.gena-wrap { position: relative; max-width: 1200px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(12px, 3vw, 40px) clamp(56px, 8vw, 96px); scroll-margin-top: 8px; }
.gena { position: relative; overflow: hidden; border-radius: clamp(24px, 3vw, 32px); background: var(--navy); color: #EEF0FA; padding: clamp(32px, 6vw, 72px) clamp(24px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(36px, 5vw, 64px); align-items: center; box-shadow: 0 40px 80px -40px rgba(16,15,46,.6); }
.gena-glow { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; }
.gena-glow-1 { width: 520px; height: 520px; right: -140px; top: -200px; background: #3B8BFF; opacity: .35; }
.gena-glow-2 { width: 420px; height: 420px; left: -120px; bottom: -220px; background: #6A5AE0; opacity: .4; }
.gena-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.gena-copy img { width: min(100%, 260px); height: auto; margin-left: -6px; }
.gena-copy h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.08; color: #FFFFFF; }
.gena-copy p { max-width: 32em; font-size: 17px; line-height: 1.6; color: #B9BEDA; }
.gena-copy .btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 30px -10px rgba(42,134,255,.7); }
.gena-copy .btn-primary:hover { filter: brightness(1.1); }
.gena-panel { position: relative; padding: clamp(22px, 3vw, 32px); border-radius: 24px; background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.kicker-light { font-size: 12px; letter-spacing: .1em; color: #8FB8FF; margin-bottom: 16px; }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.features li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); transition: opacity .5s, transform .6s var(--ease); }
.features li:last-child { padding-bottom: 0; border-bottom: 0; }
.features .i { fill: #5EA2FF; }
.js .features li:not(.is-in) { opacity: 0; transform: translateX(-10px); }

/* Footer */
.footer { padding-bottom: 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 28px; border-top: 1px solid #E2E6EF; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer-copy { padding-top: 20px; font-size: 13px; color: #94A3B8; }

/* 404 */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; padding-top: 48px; padding-bottom: 48px; }
.notfound .code-big { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--blue); letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
