/* ═══════════════════════════════════════════════════════════════
   ONE X DONE — Shared Design System
   Source: Claude Design handoff (project/index.html, app.jsx)
   Used across every HTML page for consistent visual language.
   ═══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --ink: #060606;
  --panel: #0D0D0D;
  --panel-2: #111;
  --hair: rgba(255,255,255,0.08);
  --hair-soft: rgba(255,255,255,0.04);
  --fg: #fff;
  --fg-65: rgba(255,255,255,0.65);
  --fg-40: rgba(255,255,255,0.40);
  --fg-22: rgba(255,255,255,0.22);
  --accent: #00D1FF;
}

/* ── BASE ────────────────────────────────────────────────────── */
html, body {
  background: var(--ink);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* prevent horizontal scroll on resize */
}
::selection { background: var(--accent); color: #000; }

/* ── RESIZE-SAFE TEXT ────────────────────────────────────────── */
/* Prevent words from being clipped when the window is resized.
   overflow-wrap keeps long words inside their container.
   hyphens: none keeps Oswald display headings unbroken.
   Grid/flex children need min-width:0 so they can shrink. */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
p, li, span {
  overflow-wrap: break-word;
}
/* Grid and flex children that hold text must be able to shrink */
[class*="col-span-"],
[class*="grid-cols-"] > *,
.flex > * {
  min-width: 0;
}

/* ── TYPOGRAPHY EXTENSIONS ───────────────────────────────────── */
.font-display { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: -0.01em; overflow-wrap: break-word; word-break: break-word; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.t-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-40);
}
.t-index {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-22);
  text-transform: uppercase;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
/* Allow the glow div to bleed above the footer without clipping.
   z-index: 1 puts footer above the CTA section stacking context. */
footer { overflow: visible; position: relative; z-index: 1; }

/* The glow div uses inline top:-420px / height:900px which doesn't
   reach the top of the CTA section (~840px tall). Override so it
   extends 750px above the footer and covers the full CTA area. */
footer > [aria-hidden="true"] {
  top: -750px !important;
  height: 1300px !important;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 10%, #000 25%, #000 55%, transparent 88%) !important;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 10%, #000 25%, #000 55%, transparent 88%) !important;
}

/* ── HAIRLINES ───────────────────────────────────────────────── */
.hair { border-color: var(--hair); }
.hair-t { border-top: 1px solid var(--hair); }
.hair-b { border-bottom: 1px solid var(--hair); }
.hair-l { border-left: 1px solid var(--hair); }
.hair-r { border-right: 1px solid var(--hair); }

/* Vertical column rules (4-col grid hairlines) */
.col-rules {
  background-image: linear-gradient(to right, var(--hair-soft) 1px, transparent 1px);
  background-size: 25% 100%;
}

/* ── ACCENT BAR ──────────────────────────────────────────────── */
.accent-bar {
  position: relative;
  height: 1px;
  background: var(--hair);
  overflow: hidden;
}
.accent-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 40%;
  background: var(--accent);
  transform: translateX(-110%);
  transition: transform 1.1s cubic-bezier(.7,0,.3,1);
}
.accent-bar.on::after { transform: translateX(0); }

/* ── DOT ─────────────────────────────────────────────────────── */
.dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 9999px;
  display: inline-block;
}

/* ── TICKER ──────────────────────────────────────────────────── */
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  white-space: nowrap;
}

/* ── HERO VIGNETTE ───────────────────────────────────────────── */
.hero-vignette {
  background:
    linear-gradient(180deg, rgba(6,6,6,0.25) 0%, rgba(6,6,6,0.55) 45%, rgba(6,6,6,1) 100%),
    radial-gradient(ellipse at 50% 20%, rgba(0,209,255,0.08), transparent 60%);
}

/* ── PREMIUM CARD SYSTEM ─────────────────────────────────────── */
.pcard {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.012) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .7s cubic-bezier(.2,.7,.2,1),
    border-color .5s cubic-bezier(.2,.7,.2,1),
    box-shadow .7s cubic-bezier(.2,.7,.2,1),
    background .5s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.pcard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
  transition: opacity .5s cubic-bezier(.2,.7,.2,1);
}
.pcard::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s cubic-bezier(.2,.7,.2,1);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(0,209,255,0.14), rgba(0,209,255,0.04) 25%, transparent 55%);
  z-index: 0;
}
.pcard:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 24px 60px -20px rgba(0,0,0,0.75),
    0 0 50px -10px rgba(0,209,255,0.08);
}
.pcard:hover::after { opacity: 1; }
.pcard:hover::before { opacity: 1; }
.pcard > * { position: relative; z-index: 2; }

.pcard .pcard-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,209,255,0.5), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  z-index: 2;
}
.pcard:hover .pcard-accent { transform: scaleX(1); }

.pcard-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  transition: color .4s ease;
}
.pcard:hover .pcard-num { color: var(--accent); }

.pcard-ic {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.65);
  transition: all .5s cubic-bezier(.2,.7,.2,1);
}
.pcard:hover .pcard-ic {
  border-color: rgba(0,209,255,0.45);
  color: var(--accent);
  background: rgba(0,209,255,0.04);
  transform: translateY(-2px);
}

/* ── AREA CARD (lighter PCard variant) ───────────────────────── */
.area { transition: border-color .3s ease, background .3s ease; }
.area:hover { border-color: rgba(0,209,255,0.25); background: rgba(0,209,255,0.02); }

/* ── STAGE ROW ───────────────────────────────────────────────── */
.stage-row { position: relative; transition: background .35s ease; }
.stage-row:hover { background: rgba(255,255,255,0.02); }
.stage-row:hover .stage-hit { color: var(--accent); }
.stage-hit { transition: color .35s ease; }

/* ── TICK BAR (process indicator) ────────────────────────────── */
.tick-bar { height: 10px; display: flex; align-items: center; }
.tick-bar .tick { width: 1px; height: 10px; background: var(--fg-22); }
.tick-bar .tick.on { background: var(--accent); }

/* ── SEGMENTED CONTROL ───────────────────────────────────────── */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  color: var(--fg-65);
  background: transparent;
  transition: all .25s ease;
}
.seg button[data-on="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,209,255,0.06);
}
.seg button:hover { color: #fff; }

/* ── FIELD INPUT (form fields, hairline underline) ───────────── */
.field {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 13px 16px;
  color: #fff;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color .3s ease, background .3s ease;
}
.field:focus { outline: none; border-color: var(--accent); background: rgba(0,209,255,0.04); }
.field::placeholder { color: var(--fg-22); }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-row { transition: background .3s ease; }
.faq-row[data-open="true"] { background: rgba(0,209,255,0.03); }
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1);
}
.faq-body > div { overflow: hidden; }
.faq-row[data-open="true"] .faq-body { grid-template-rows: 1fr; }
.faq-plus { transition: transform .4s cubic-bezier(.2,.7,.2,1), color .3s; }
.faq-row[data-open="true"] .faq-plus { transform: rotate(45deg); color: var(--accent); }

/* ── NOISE OVERLAY ───────────────────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 2;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ── HERO PAN-DOWN (ken-burns) ───────────────────────────────── */
@keyframes heroPanDown {
  0%   { object-position: center 0%; }
  100% { object-position: center 100%; }
}
.hero-pan-down {
  object-position: center 0%;
  animation: heroPanDown 18s cubic-bezier(.45,.05,.55,.95) infinite alternate;
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
::-webkit-scrollbar-track { background: var(--ink); }

/* ── BASE PAGE RESET ─────────────────────────────────────────── */
.ds-page {
  background: var(--ink);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
.ds-page *, .ds-page *::before, .ds-page *::after { box-sizing: border-box; }

/* ── BUTTONS (One X Done spec) ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: 'Inter', sans-serif;
  text-transform: none;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.btn svg { transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1); }
.btn-primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn-primary:hover {
  background: #fff; color: #070707;
  box-shadow: 0 12px 40px rgba(0, 209, 255, 0.25);
  transform: translateY(-2px);
}
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-ghost:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: .15s; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── NAV ─────────────────────────────────────────────────────── */
#site-nav {
  transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
#site-nav.is-scrolled {
  background: rgba(6, 6, 6, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hair);
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-dropdown {
  background: rgba(6, 6, 6, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  min-width: 260px;
  overflow: hidden;
}
/* Cyan top rule that bleeds from the nav */
.nav-dropdown::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,209,255,0.35) 40%, rgba(0,209,255,0.35) 60%, transparent);
}

/* Dropdown links */
.nav-dropdown a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
  overflow: hidden;
}
.nav-dropdown a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,209,255,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-dropdown a:hover { background: rgba(255,255,255,0.03) !important; }
.nav-dropdown a:hover::after { opacity: 1; }
.nav-dropdown a:hover .nd-label { color: #fff; }
.nav-dropdown a:hover .nd-arrow {
  color: var(--accent);
  opacity: 1;
  transform: translate(1px, -1px);
}

.nd-label {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s ease;
}
.nd-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  margin-top: 2px;
  letter-spacing: 0.01em;
}
.nd-arrow {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

/* ── MOBILE MENU ─────────────────────────────────────────────── */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#mobile-menu.is-open { transform: translateX(0); }

/* ── BEFORE / AFTER SLIDER ───────────────────────────────────── */
.before-after-slider {
  border-radius: 18px;
  overflow: hidden;
}

/* ── QUOTE MODAL ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}
@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
}
.modal-overlay.is-open { display: flex; }
.modal-inner {
  background: #060606;
  border: 1px solid var(--hair);
  border-radius: 0;
  width: 100%;
  max-width: 900px;
  max-height: 100vh;
  overflow-y: auto;
}
@media (min-width: 768px) {
  .modal-inner {
    max-height: 90vh;
    border-radius: 24px;
  }
}

/* ── MOTION PREFERENCES ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .hero-pan-down { animation: none !important; }
  .accent-bar::after { transition: none !important; }
  [data-tr-word] > span,
  [data-tr-block] {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

/* ── MASKED WORD REVEAL (scroll-driven) ──────────────────────── */
[data-tr-word] {
  display: inline-block;
  clip-path: inset(0 -0.3em -0.1em -0.3em);
  vertical-align: top;
  line-height: inherit;
}
[data-tr-word] > span {
  display: inline-block;
  will-change: transform, opacity;
}
[data-tr-block] { will-change: transform, opacity, filter; }
[data-tr-word]:not([data-tr-ready]) > span {
  transform: translateY(110%);
  opacity: 0;
}
[data-tr-block]:not([data-tr-ready]) {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
}
