/* AletheiaCast Beta Launch — broadcast-grade dark theme */
:root {
  --bg: #0b0f17;
  --surface: #111827;
  --surface-2: #162033;
  --line: #1f2a3d;
  --line-strong: #2b3a54;
  --text: #e8edf5;
  --muted: #9aa7bd;
  --cyan: #22d3ee;
  --cyan-dim: #0e7490;
  --gold: #f5b83d;
  --orange: #ff8a3d;
  --violet: #a78bfa;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 14px;
  --header-h: 64px;
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 1rem; line-height: 1.6; overflow-x: clip; min-width: 320px;
}
img, picture { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #67e8f9; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--gold); color: #111; padding: 12px 16px; border-radius: 8px; z-index: 200; font-weight: 700; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow { display: inline-block; color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.grad-text { background: linear-gradient(90deg, var(--cyan), var(--violet) 50%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  text-align: center; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; line-height: 1.25;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #1a1205; box-shadow: 0 6px 24px rgba(245, 184, 61, .25); }
.btn-primary:hover { color: #1a1205; box-shadow: 0 8px 30px rgba(245, 184, 61, .4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn-sm { min-height: 44px; padding: 8px 18px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(11, 15, 23, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; min-height: 44px; }
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.header-cta { display: none; }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 48px; height: 48px; background: transparent; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer-backdrop { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0, 0, 0, .6); z-index: 90; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.drawer { position: fixed; top: var(--header-h); right: 0; bottom: 0; width: min(320px, 86vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 95; padding: 16px; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.drawer a:not(.btn) { display: flex; align-items: center; min-height: 52px; padding: 0 14px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem; border-radius: 10px; }
.drawer a:not(.btn):hover { background: var(--surface-2); }
.drawer .btn { margin-top: 12px; }
body.nav-open { overflow: hidden; }
body.nav-open .drawer { transform: none; visibility: visible; }
body.nav-open .drawer-backdrop { opacity: 1; visibility: visible; }

/* Hero */
.hero { position: relative; padding: 48px 0 64px; overflow: hidden; background:
  radial-gradient(ellipse 70% 50% at 15% 0%, rgba(34, 211, 238, .14), transparent 60%),
  radial-gradient(ellipse 60% 50% at 90% 10%, rgba(255, 138, 61, .12), transparent 60%); }
.hero-grid { display: grid; gap: 40px; }
.badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 14px; border: 1px solid rgba(245, 184, 61, .45); background: rgba(245, 184, 61, .08); color: var(--gold); border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; }
.tagline { display: flex; align-items: center; gap: 12px; color: var(--cyan); font-weight: 600; font-style: italic; margin-bottom: 14px; }
.tagline img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 32px rgba(34, 211, 238, .25); }
.hero p.lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin: 28px 0; }
.countdown-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 520px; }
.countdown-card h2 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-weight: 700; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.countdown .unit { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 2px; }
.countdown .num { display: block; font-size: clamp(1.4rem, 7vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.1; }
.countdown .lbl { display: block; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.countdown-open { display: none; font-weight: 800; color: var(--ok); font-size: 1.2rem; }
.countdown-card.is-open .countdown { display: none; }
.countdown-card.is-open .countdown-open { display: block; }
.countdown-note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.product-frame { position: relative; border-radius: 16px; padding: 6px; background: linear-gradient(135deg, rgba(34, 211, 238, .5), rgba(167, 139, 250, .4), rgba(255, 138, 61, .5)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 80px rgba(34, 211, 238, .12); }
.product-frame img { border-radius: 11px; width: 100%; background: #000; }

/* Features */
.feature-grid { display: grid; gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; transition: border-color .2s, transform .2s; }
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature .idx { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(34, 211, 238, .1); color: var(--cyan); font-weight: 800; margin-bottom: 14px; border: 1px solid rgba(34, 211, 238, .3); }
.feature p { color: var(--muted); margin: 0; }

/* Showcase */
.showcase { background: var(--surface); border-block: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tab { flex: 0 0 auto; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line-strong); font: inherit; font-weight: 700; cursor: pointer; scroll-snap-align: start; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: linear-gradient(135deg, var(--cyan), #0ea5c4); color: #04202a; border-color: transparent; }
.panel-view { display: block; position: relative; width: 100%; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #000; cursor: zoom-in; }
.panel-view img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; background: rgba(11, 15, 23, .85); color: var(--text); font-size: .78rem; font-weight: 700; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong); pointer-events: none; }
.caption { margin-top: 16px; }
.caption h3 { margin-bottom: 4px; }
.caption p { color: var(--muted); margin: 0; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 20px; }
.thumb { padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #000; cursor: pointer; opacity: .6; min-height: 44px; }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.thumb[aria-current="true"], .thumb:hover { opacity: 1; border-color: var(--cyan); }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(5, 8, 13, .96); color: var(--text); }
.lightbox::backdrop { background: rgba(5, 8, 13, .96); }
.lightbox[open] { display: flex; flex-direction: column; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; gap: 12px; }
.lb-count { color: var(--muted); font-size: .9rem; font-weight: 600; }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lb-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; touch-action: pan-y; }
.lb-stage img { flex: 1; min-width: 0; max-height: 100%; width: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-cap { padding: 14px 18px 22px; text-align: center; }
.lb-cap strong { display: block; }
.lb-cap span { color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq-list { display: grid; gap: 12px; max-width: 860px; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.faq[open] { border-color: var(--line-strong); }
details.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; min-height: 56px; font-weight: 700; position: relative; display: flex; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--cyan); font-weight: 400; }
details.faq[open] summary::after { content: "\2212"; }
details.faq .faq-body { padding: 0 20px 18px; color: var(--muted); }
details.faq .faq-body p { margin: 0; }

/* Pricing */
.pricing { background: var(--surface); border-block: 1px solid var(--line); }
.plan-grid { display: grid; gap: 14px; margin-bottom: 28px; }
.plan { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.plan.best { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245, 184, 61, .3), 0 10px 40px rgba(245, 184, 61, .08); }
.plan .tag { position: absolute; top: -12px; left: 18px; background: var(--gold); color: #1a1205; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan h3 { color: var(--muted); font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; }
.plan .price { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.plan .rate { color: var(--cyan); font-weight: 700; margin: 6px 0 12px; }
.plan p { color: var(--muted); font-size: .94rem; margin: 0; }
.offer-grid { display: grid; gap: 14px; }
.offer { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 20px; background: linear-gradient(160deg, rgba(34, 211, 238, .06), transparent 60%), var(--bg); }
.offer h3 { color: var(--gold); font-size: 1rem; }
.offer p { color: var(--muted); margin: 0; }
.offer p strong { color: var(--text); }

/* Form */
.apply-grid { display: grid; gap: 32px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form-sub { color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field > label:not(.check), .field legend { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; padding: 0; }
.req { color: var(--gold); }
.opt { color: var(--muted); font-weight: 500; font-size: .85rem; }
.hint { color: var(--muted); font-size: .84rem; margin: 4px 0 0; }
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%; min-height: 48px; padding: 10px 14px; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 10px; font: inherit; font-size: 1rem; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus { outline: 3px solid rgba(34, 211, 238, .5); border-color: var(--cyan); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.check-grid { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; font-weight: 500; }
.check:hover { border-color: var(--cyan); }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--cyan); margin: 0; }
.check.consent { align-items: flex-start; padding: 14px; line-height: 1.5; font-size: .94rem; }
.check.consent input { margin-top: 2px; }
.field-error { color: var(--danger); font-size: .86rem; margin: 6px 0 0; min-height: 0; font-weight: 600; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 10px; font-weight: 600; display: none; }
.form-status.show { display: block; }
.form-status.success { background: rgba(74, 222, 128, .1); border: 1px solid rgba(74, 222, 128, .5); color: #b6f5cb; }
.form-status.error { background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .5); color: #ffc2c2; }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(26, 18, 5, .3); border-top-color: #1a1205; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.apply-side ul { color: var(--muted); padding-left: 1.2em; }
.apply-side li { margin-bottom: 8px; }
.btn-block { width: 100%; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 32px; background: #080b11; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand img { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); margin: 0; }
.footer-badge { color: var(--muted); font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--cyan); }
.copyright { margin: 28px 0 0; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 20px; }

/* Legal pages */
.legal { padding: 48px 0 72px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; color: var(--text); }
.legal p, .legal li { color: #c4cee0; }
.legal li { margin-bottom: 8px; }
.legal .meta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); }
.legal .meta p { margin: 0 0 6px; color: var(--muted); }
.legal .meta p:last-child { margin: 0; }
.legal a { overflow-wrap: anywhere; }

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

/* Tablet+ */
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .check-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-card { padding: 32px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; }
}
@media (min-width: 960px) {
  .nav-toggle, .drawer, .drawer-backdrop { display: none; }
  .nav-links { display: flex; }
  .header-cta { display: inline-flex; }
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .product-frame { transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); transition: transform .4s; }
  .product-frame:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: repeat(4, 1fr); }
  .apply-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .apply-side { position: sticky; top: calc(var(--header-h) + 24px); }
  .section { padding: 96px 0; }
}
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .brand span { font-size: 1.02rem; }
  .countdown .lbl { font-size: .58rem; letter-spacing: .04em; }
  .form-card { padding: 18px; }
}
