/* Creytix Mail site — design tokens extracted from the Creytix platform front-end.
 * Dark-first (platform default). Light mode via [data-surface="light"].
 * WCAG AA targeted in both modes. No linear gradients. No emojis. */

:root,
[data-surface="dark"] {
  --cx-shell: #0d1117;
  --cx-shell-deep: #0a0e14;
  --cx-shell-top: #0d1219;
  --cx-ink: #e8eef5;
  --cx-muted: #a6b3c2;
  --cx-faint: #7a8797;
  --cx-accent: #14b8a6;
  --cx-accent-hover: #0f9486;
  --cx-accent-ink: #062a26;
  --cx-highlight: #7fd7cd;
  --cx-border: #2a3645;
  --cx-card: #131a22;
  --cx-card-elev: #1d2835;
  --cx-copper: #b5793f;
  --cx-copper-glow: #e2b988;
  --cx-ai: #7c83ff;
  --cx-ai-glow: #5cc8ff;
  --cx-success: #22c55e;
  --cx-warning: #f59e0b;
  --cx-error: #ef4444;
  --cx-nav-bg: rgba(13, 17, 23, 0.82);
  --cx-shadow: 0 18px 48px -12px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --cx-ring: rgba(20, 184, 166, 0.35);
  color-scheme: dark;
}

[data-surface="light"] {
  --cx-shell: #f4f1ea;
  --cx-shell-deep: #e9e4d6;
  --cx-shell-top: #faf8f3;
  --cx-ink: #10161d;
  --cx-muted: #4d5a6a;
  --cx-faint: #6d7885;
  --cx-accent: #0d8a7d;
  --cx-accent-hover: #0b6f65;
  --cx-accent-ink: #ffffff;
  --cx-highlight: #0d8a7d;
  --cx-border: #d9d2c1;
  --cx-card: #ffffff;
  --cx-card-elev: #ffffff;
  --cx-copper: #96602e;
  --cx-copper-glow: #b5793f;
  --cx-ai: #545cd6;
  --cx-ai-glow: #2f7fb8;
  --cx-success: #15803d;
  --cx-warning: #b45309;
  --cx-error: #dc2626;
  --cx-nav-bg: rgba(244, 241, 234, 0.85);
  --cx-shadow: 0 18px 48px -18px rgba(16, 22, 29, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --cx-ring: rgba(13, 138, 125, 0.3);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cx-shell);
  color: var(--cx-ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

.font-display, h1, h2, h3 {
  font-family: "Syne", "Inter", system-ui, sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 46rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cx-nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cx-border);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--cx-ink); font-weight: 700; }
.brand-mark {
  width: 2rem; height: 2rem; border-radius: 0.6rem;
  background: var(--cx-accent); color: var(--cx-accent-ink);
  display: grid; place-items: center; font-family: "Syne", sans-serif; font-weight: 800; font-size: 1.1rem;
}
.brand small { font-weight: 500; color: var(--cx-faint); font-size: 0.8rem; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { color: var(--cx-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--cx-ink); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.35rem; border-radius: 0.7rem;
  font-weight: 650; font-size: 0.98rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--cx-accent); color: var(--cx-accent-ink); }
.btn-primary:hover { background: var(--cx-accent-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--cx-ink); border-color: var(--cx-border); }
.btn-ghost:hover { border-color: var(--cx-accent); color: var(--cx-accent); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

.theme-toggle {
  background: transparent; border: 1px solid var(--cx-border); color: var(--cx-muted);
  width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; cursor: pointer;
  display: grid; place-items: center; font-size: 1.05rem;
}
.theme-toggle:hover { color: var(--cx-accent); border-color: var(--cx-accent); }
.theme-toggle:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--cx-accent); outline-offset: 2px;
}

/* ---------- hero ---------- */
.hero { padding: 5.5rem 0 4rem; position: relative; overflow: clip; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cx-accent); margin-bottom: 1.25rem;
}
.eyebrow .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--cx-accent); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; max-width: 16ch; }
.hero h1 .accent { color: var(--cx-accent); }
.lede { font-size: 1.25rem; color: var(--cx-muted); max-width: 38rem; margin: 0 0 2rem; }
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.waitlist-note { color: var(--cx-faint); font-size: 0.92rem; }

.hero-visual { margin-top: 3.5rem; }
.dash-mock {
  border: 1px solid var(--cx-border); border-radius: 1.1rem; background: var(--cx-card);
  box-shadow: var(--cx-shadow); overflow: hidden; max-width: 60rem; margin: 0 auto;
}
.dash-mock-bar { display: flex; gap: 0.45rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--cx-border); }
.dash-mock-bar i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--cx-border); display: block; }
.dash-mock-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--cx-border); }
.dash-cell { background: var(--cx-card); padding: 1.4rem 1.2rem; min-height: 9rem; }
.dash-cell h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cx-faint); margin: 0 0 0.7rem; font-family: "Inter", sans-serif; font-weight: 700; }
.dash-cell .big { font-family: "Syne", sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--cx-ink); }
.dash-cell p { margin: 0.4rem 0 0; font-size: 0.88rem; color: var(--cx-muted); }
.dash-cell .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--cx-accent); color: var(--cx-accent-ink); margin-top: 0.6rem; }
.caption { text-align: center; color: var(--cx-faint); font-size: 0.85rem; margin-top: 1rem; }

/* ---------- sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--cx-shell-deep); border-top: 1px solid var(--cx-border); border-bottom: 1px solid var(--cx-border); }
.kicker { color: var(--cx-accent); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.8rem; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; max-width: 22ch; }
.section .sub { color: var(--cx-muted); max-width: 42rem; font-size: 1.12rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.card {
  background: var(--cx-card); border: 1px solid var(--cx-border); border-radius: 1rem;
  padding: 1.6rem 1.5rem; box-shadow: var(--cx-shadow);
}
.card h3 { font-size: 1.25rem; font-weight: 750; margin-bottom: 0.5rem; }
.card p { color: var(--cx-muted); font-size: 0.98rem; margin: 0; }
.card .icon {
  width: 2.6rem; height: 2.6rem; border-radius: 0.75rem; display: grid; place-items: center;
  background: var(--cx-accent); color: var(--cx-accent-ink); font-weight: 800; font-size: 1.15rem;
  margin-bottom: 1rem; font-family: "Syne", sans-serif;
}
.card .meta { margin-top: 0.9rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cx-faint); }

/* spam banner */
.spam-banner {
  border: 1px solid var(--cx-border); border-radius: 1.2rem; padding: 2.75rem;
  background: var(--cx-card); box-shadow: var(--cx-shadow);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center;
}
.spam-banner h2 { margin-bottom: 0.7rem; }
.spam-banner p { color: var(--cx-muted); }
.ladder { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.ladder li { display: flex; gap: 0.8rem; align-items: baseline; font-size: 0.95rem; color: var(--cx-muted); }
.ladder b { color: var(--cx-ink); font-weight: 650; }
.ladder .n {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--cx-error); color: #fff; font-size: 0.8rem; font-weight: 800;
  display: grid; place-items: center; transform: translateY(0.25rem);
}

/* pricing */
.tier { display: flex; flex-direction: column; }
.tier .price { font-family: "Syne", sans-serif; font-size: 2.4rem; font-weight: 800; margin: 0.4rem 0 1rem; }
.tier .price span { font-size: 1rem; font-family: "Inter", sans-serif; font-weight: 500; color: var(--cx-faint); }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.55rem; color: var(--cx-muted); font-size: 0.96rem; }
.tier ul li::before { content: "— "; color: var(--cx-accent); font-weight: 700; }
.tier.featured { border-color: var(--cx-accent); }
.tier .flag { align-self: flex-start; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; background: var(--cx-accent); color: var(--cx-accent-ink); padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.8rem; }

/* faq */
.faq { margin-top: 2rem; display: grid; gap: 0.8rem; }
.faq details { background: var(--cx-card); border: 1px solid var(--cx-border); border-radius: 0.9rem; padding: 1.15rem 1.4rem; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cx-accent); font-size: 1.4rem; font-weight: 700; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--cx-muted); margin: 0.8rem 0 0.2rem; font-size: 0.98rem; }

/* final cta */
.final-cta { text-align: center; padding: 5rem 0; }
.final-cta h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
.final-cta p { color: var(--cx-muted); max-width: 34rem; margin: 0 auto 2rem; }

/* footer */
.site-footer { border-top: 1px solid var(--cx-border); padding: 3rem 0 2rem; background: var(--cx-shell-deep); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-grid h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--cx-faint); margin: 0 0 0.9rem; font-family: "Inter", sans-serif; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid a { color: var(--cx-muted); text-decoration: none; font-size: 0.93rem; }
.footer-grid a:hover { color: var(--cx-accent); }
.footer-bottom { border-top: 1px solid var(--cx-border); padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--cx-faint); font-size: 0.85rem; }

/* video */
.video-wrap { max-width: 56rem; margin: 3rem auto 0; }
.video-wrap video { width: 100%; border-radius: 1.1rem; border: 1px solid var(--cx-border); box-shadow: var(--cx-shadow); background: #000; }

/* prose (security page) */
.prose h2 { margin-top: 2.75rem; }
.prose p, .prose li { color: var(--cx-muted); }
.prose strong { color: var(--cx-ink); }
.prose ul { padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.policy-box { background: var(--cx-card); border: 1px solid var(--cx-border); border-left: 4px solid var(--cx-accent); border-radius: 0.6rem; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.policy-box p { margin: 0.4rem 0; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .spam-banner { grid-template-columns: 1fr; padding: 1.75rem; }
  .nav-links { display: none; }
  .dash-mock-body { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 3.5rem 0 2.5rem; }
}
