/* =========================================================================
   Zapac — Coming Soon
   Design system: "Cobalt Current" (monochrome core + cobalt accent, lemon
   spark). Standalone CSS, no build step. Mobile-first, WCAG AA, reduced-motion
   honored. Type: Outfit (display) · Satoshi (body) · JetBrains Mono (data).
   ========================================================================= */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Type */
  --font-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Satoshi', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Neutrals — cool porcelain (light, content pages) */
  --canvas: #ffffff;
  --surface: #f7f8fb;
  --hairline: #e6e9f2;
  --border-strong: #cdd2e1;
  --muted: #5e6475;
  --text: #0b0e1a;

  /* Cobalt — the accent / current */
  --cobalt-50: #eef2ff;
  --cobalt-100: #e0e7ff;
  --cobalt-400: #5b72fb;
  --cobalt-500: #3b5bfa;
  --cobalt-600: #2447f9;
  --cobalt-700: #1b36c9;
  --cobalt-900: #0e1a5e;

  /* Lemon — highlight / "coming soon" spark */
  --lemon-400: #ffd43b;

  /* Feature families (icon accents only) */
  --jade: #18b368;    /* WhatsApp / routing */
  --violet: #7c5cfc;  /* QR                 */
  --cyan: #08b8d4;    /* Analytics          */
  --coral: #ff6b4a;   /* Link-in-bio        */
  --teal: #0d9488;    /* Custom domains     */
  --amber: #f59e0b;   /* White-label        */
  --magenta: #e0479e; /* Attribution        */

  /* Semantics */
  --success: #16a34a;

  /* Dark surfaces (hero + footer) */
  --d-canvas: #070a14;
  --d-surface: #0e1322;
  --d-raised: #141a2e;
  --d-hairline: #1e2540;
  --d-text: #f2f4fa;
  --d-muted: rgba(242, 244, 250, 0.64);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11, 14, 26, 0.05), 0 1px 1px rgba(11, 14, 26, 0.04);
  --shadow-md: 0 6px 16px -6px rgba(11, 14, 26, 0.12), 0 2px 6px -2px rgba(11, 14, 26, 0.08);
  --shadow-lg: 0 24px 60px -20px rgba(11, 14, 26, 0.28);
  --glow-cobalt: 0 0 0 1px rgba(36, 71, 249, 0.18), 0 18px 50px -20px rgba(36, 71, 249, 0.55);

  --maxw: 1120px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--cobalt-600); text-decoration: none; }
a:hover { color: var(--cobalt-700); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: normal;
}

p { margin: 0; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(36, 71, 249, 0.45);
  border-radius: 6px;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--cobalt-600); color: #fff; padding: 8px 14px;
  border-radius: var(--r-sm); font-weight: 600; z-index: 100;
  transition: top 0.16s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---- Wordmark ----------------------------------------------------------- */
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.05em;
}
.wordmark__dot { color: var(--cobalt-600); }
.home .wordmark { color: #fff; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.7rem 1.15rem; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer; min-height: 44px;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.btn--accent { background: var(--cobalt-600); color: #fff; box-shadow: var(--glow-cobalt); }
.btn--accent:hover { background: var(--cobalt-700); color: #fff; transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--d-text);
  border-color: rgba(242, 244, 250, 0.18);
}
.btn--ghost:hover { border-color: rgba(242, 244, 250, 0.4); color: #fff; transform: translateY(-1px); }

/* ---- Eyebrow & badges --------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.home .eyebrow { color: var(--cobalt-400); }

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; border-radius: 9999px;
}
.badge--soon {
  color: #2a2300; background: var(--lemon-400);
  box-shadow: 0 0 0 1px rgba(255, 212, 59, 0.5), 0 8px 26px -10px rgba(255, 212, 59, 0.65);
}
.badge--soon .dot {
  width: 7px; height: 7px; border-radius: 9999px; background: #2a2300;
  animation: pulse 2.4s ease-in-out infinite;
}

/* ---- Site header -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.home .site-header { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--muted);
}
.site-nav a:hover { color: var(--text); }
.home .site-nav a { color: var(--d-muted); }
.home .site-nav a:hover { color: #fff; }
@media (max-width: 560px) {
  .site-nav { gap: 1rem; }
  .site-nav a.hide-sm { display: none; }
}

/* =========================================================================
   HOME — dark "Cobalt Current" hero
   ========================================================================= */
.home {
  background: var(--d-canvas);
  color: var(--d-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  /* Clip only the horizontal axis so the animated mesh can't cause sideways
     scroll. NEVER use `overflow: hidden` here — this is the <body>, and it
     would disable vertical page scrolling. `clip` keeps the page scrollable
     and does not break sticky positioning. */
  overflow-x: clip;
}

/* Atmosphere: cobalt mesh + dot-grid + grain, painted on a fixed backdrop */
.home::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 8%, rgba(36, 71, 249, 0.38), transparent 60%),
    radial-gradient(50% 50% at 88% 18%, rgba(8, 184, 212, 0.18), transparent 62%),
    radial-gradient(70% 60% at 50% 108%, rgba(36, 71, 249, 0.30), transparent 60%);
  animation: drift 22s ease-in-out infinite alternate;
}
.home::after {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(242, 244, 250, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(75% 65% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(75% 65% at 50% 30%, #000 30%, transparent 78%);
}
.home > * { position: relative; z-index: 1; }

.home-main { flex: 1; display: flex; flex-direction: column; }
.hero { flex: 1; display: flex; align-items: center; padding: 4rem 0 4.5rem; min-width: 0; }
/* Share the same content width as the navbar and footer (--maxw via .container)
   so the hero block lines up with them instead of stopping short. */
.hero__inner { width: 100%; min-width: 0; }

.hero__eyebrow { margin-bottom: 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }

.hero h1 {
  font-size: clamp(2.15rem, 8vw, 4.6rem);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.5rem;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero h1 .glow { white-space: normal; }
.hero h1 .glow { color: var(--cobalt-400); }

.hero__sub {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--d-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}
.hero__sub strong { color: var(--d-text); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.hero__note { font-size: 0.85rem; color: var(--d-muted); }

/* Reveal animation (staggered) */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.27s; }
.reveal.d4 { animation-delay: 0.38s; }
.reveal.d5 { animation-delay: 0.50s; }

/* Pillars */
.pillars {
  display: grid; gap: 1rem; margin-top: 3.5rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--d-hairline);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pillar:hover { transform: translateY(-3px); border-color: rgba(36, 71, 249, 0.45); }
.pillar__icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  display: grid; place-items: center; margin-bottom: 1rem;
}
.pillar__icon svg { width: 22px; height: 22px; }
.pillar--wa .pillar__icon { background: color-mix(in srgb, var(--jade) 16%, transparent); color: var(--jade); }
.pillar--qr .pillar__icon { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.pillar--an .pillar__icon { background: color-mix(in srgb, var(--cyan) 16%, transparent); color: var(--cyan); }
.pillar h3 { font-size: 1.12rem; color: #fff; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.92rem; color: var(--d-muted); }

/* Secondary features — the wider toolkit (still on the dark home surface) */
.features { padding: 4.5rem 0 6rem; border-top: 1px solid var(--d-hairline); }
.features__head { max-width: 660px; margin-bottom: 2.5rem; }
.features__head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); color: #fff; margin: 0.7rem 0 0.6rem; line-height: 1.12; }
.features__head p { color: var(--d-muted); font-size: 1.02rem; }
.feature-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  padding: 1.4rem;
  border: 1px solid var(--d-hairline);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.18); }
.feature__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 0.9rem; }
.feature__icon svg { width: 21px; height: 21px; }
.feature h3 { font-size: 1.04rem; color: #fff; margin-bottom: 0.35rem; }
.feature p { font-size: 0.9rem; color: var(--d-muted); }
.f-route .feature__icon { background: color-mix(in srgb, var(--jade) 16%, transparent); color: var(--jade); }
.f-bio .feature__icon { background: color-mix(in srgb, var(--coral) 16%, transparent); color: var(--coral); }
.f-domain .feature__icon { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.f-report .feature__icon { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.f-manage .feature__icon { background: color-mix(in srgb, var(--cobalt-400) 18%, transparent); color: var(--cobalt-400); }
.f-attr .feature__icon { background: color-mix(in srgb, var(--magenta) 16%, transparent); color: var(--magenta); }

/* =========================================================================
   CONTENT PAGES — light, readable (faq / contact / legal)
   ========================================================================= */
.doc-hero { padding: 3.5rem 0 1.5rem; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.6rem 0 0.5rem; text-wrap: balance; }
.doc-hero p { color: var(--muted); }
.doc-hero .meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }

.doc { padding: 3rem 0 4rem; }
.doc__grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 940px) { .doc__grid { grid-template-columns: 220px 1fr; gap: 3.5rem; } }

.toc { position: sticky; top: 88px; align-self: start; display: none; }
@media (min-width: 940px) { .toc { display: block; } }
.toc__title { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.toc a { display: block; padding: 0.4rem 0.7rem; border-radius: var(--r-sm); font-size: 0.9rem; color: var(--muted); }
.toc a:hover { background: var(--surface); color: var(--text); }
.toc a[aria-current='page'] { background: var(--cobalt-50); color: var(--cobalt-700); font-weight: 600; }

.prose { max-width: 70ch; min-width: 0; }
.prose h2 {
  font-size: 1.5rem; margin: 2.6rem 0 0.5rem; scroll-margin-top: 88px;
  padding-top: 0.4rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.12rem; font-family: var(--font-display); font-weight: 600; margin: 1.6rem 0 0.4rem; }
.prose p, .prose li { color: #2a2f3d; font-size: 1rem; line-height: 1.72; }
.prose p { margin: 0.8rem 0; }
.prose ul, .prose ol { margin: 0.8rem 0; padding-left: 1.3rem; }
.prose li { margin: 0.35rem 0; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.prose hr { border: none; border-top: 1px solid var(--hairline); margin: 2.4rem 0; }
.prose .lead { font-size: 1.1rem; color: var(--muted); }
.prose code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: var(--surface); padding: 0.12em 0.4em; border-radius: 5px;
  border: 1px solid var(--hairline);
}

.callout {
  background: var(--cobalt-50);
  border: 1px solid var(--cobalt-100);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 0.95rem;
  color: #21306e;
}
.callout strong { color: var(--cobalt-900); }

/* Sub-processor / data table */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--hairline); border-radius: var(--r-md); }
table.policy { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
table.policy th, table.policy td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.policy th { font-weight: 600; background: var(--surface); color: var(--text); }
table.policy tr:last-child td { border-bottom: none; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 0 1.2rem; margin-bottom: 0.8rem; background: var(--canvas);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-family: var(--font-mono); font-size: 1.3rem; color: var(--cobalt-600);
  transition: transform 0.2s ease; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { color: #2a2f3d; padding-bottom: 1.2rem; margin: 0; line-height: 1.7; }

/* Contact cards */
.contact-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin: 1.5rem 0; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 1.3rem; background: var(--canvas); transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.contact-card:hover { border-color: var(--cobalt-100); box-shadow: var(--shadow-sm); }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.contact-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.6rem; }
.contact-card a { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 500; }

/* =========================================================================
   Footer — dark band on every page
   ========================================================================= */
.site-footer { background: var(--d-canvas); color: var(--d-muted); padding: 3rem 0 2.5rem; border-top: 1px solid var(--d-hairline); }
.home .site-footer { border-top-color: var(--d-hairline); }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.site-footer__brand { max-width: 320px; }
.site-footer__brand .wordmark { color: #fff; }
.site-footer__brand p { margin-top: 0.7rem; font-size: 0.88rem; color: var(--d-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(242,244,250,0.45); margin-bottom: 0.9rem; font-weight: 500; }
.footer-col a { display: block; font-size: 0.9rem; color: var(--d-muted); margin-bottom: 0.55rem; }
.footer-col a:hover { color: #fff; }
.site-footer__bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--d-hairline);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-size: 0.82rem; color: rgba(242,244,250,0.5);
}
.site-footer__bottom a { color: rgba(242,244,250,0.65); }
.site-footer__bottom a:hover { color: #fff; }

/* ---- Keyframes ---------------------------------------------------------- */
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -2%, 0) scale(1.06); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .home::before { animation: none; }
  .badge--soon .dot { animation: none; }
  .btn, .pillar, .feature { transition: none; }
}
