/* Asymptopia Ltd — shared stylesheet
   No framework, no build step. One file, hand-written.
   Light-first, Stripe/Lemon Squeezy–inspired: soft cards, layered shadows,
   pill buttons, a subtle gradient wash behind hero sections. Dark mode is a
   fully-styled variant via prefers-color-scheme + a data-theme override hook. */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light dark;

  /* Light (default) palette: white/near-white surfaces, near-black ink text,
     jewel-teal primary accent, warm coral/amber secondary. No purple. */
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f5f5fb;
  --border: rgba(26, 26, 46, 0.08);
  --text: #14171a;
  --text-dim: #585c63;
  --accent: #0f766e;        /* teal-700, AA-safe on white (~4.5:1) */
  --accent-strong: #0b5c56; /* darker teal, hover */
  --warm: #c2410c;          /* coral/burnt-orange, AA-safe on white (~4.5:1) */
  --warm-strong: #9a3412;   /* darker coral, hover */
  --danger: #b3261e;
  --focus-ring: #0f766e;
  --shadow-sm: 0 1px 2px rgba(26, 26, 46, 0.06);
  --shadow: 0 8px 24px rgba(26, 26, 46, 0.09), 0 2px 6px rgba(26, 26, 46, 0.05);
  --shadow-lg: 0 20px 48px rgba(26, 26, 46, 0.16), 0 6px 16px rgba(26, 26, 46, 0.06);
  --code-bg: rgba(26, 26, 46, 0.05);
  --gradient-hero: linear-gradient(120deg, #0d9488 0%, #10b981 50%, #f97316 100%);
  --gradient-opacity: 0.13;
  --btn-primary-bg: linear-gradient(135deg, #0f766e, #0b5c56);
  --btn-primary-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e1a;
    --bg-alt: #0e1426;
    --surface: #131a30;
    --surface-2: #1a2340;
    --border: rgba(232, 236, 245, 0.12);
    --text: #e8ecf5;
    --text-dim: #a7afc9;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --warm: #fb923c;
    --warm-strong: #fdba74;
    --danger: #f57272;
    --focus-ring: #2dd4bf;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.25);
    --code-bg: rgba(255, 255, 255, 0.06);
    --gradient-hero: linear-gradient(120deg, #14b8a6 0%, #34d399 50%, #fb923c 100%);
    --gradient-opacity: 0.28;
    --btn-primary-bg: linear-gradient(135deg, #2dd4bf, #14b8a6);
    --btn-primary-text: #0a0e1a;
  }
}

/* Manual override hook — a theme toggle script (if ever added) can set
   data-theme on <html> to force either scheme regardless of OS setting. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f5f5fb;
  --border: rgba(26, 26, 46, 0.08);
  --text: #14171a;
  --text-dim: #585c63;
  --accent: #0f766e;
  --accent-strong: #0b5c56;
  --warm: #c2410c;
  --warm-strong: #9a3412;
  --danger: #b3261e;
  --focus-ring: #0f766e;
  --shadow-sm: 0 1px 2px rgba(26, 26, 46, 0.06);
  --shadow: 0 8px 24px rgba(26, 26, 46, 0.09), 0 2px 6px rgba(26, 26, 46, 0.05);
  --shadow-lg: 0 20px 48px rgba(26, 26, 46, 0.16), 0 6px 16px rgba(26, 26, 46, 0.06);
  --code-bg: rgba(26, 26, 46, 0.05);
  --gradient-hero: linear-gradient(120deg, #0d9488 0%, #10b981 50%, #f97316 100%);
  --gradient-opacity: 0.13;
  --btn-primary-bg: linear-gradient(135deg, #0f766e, #0b5c56);
  --btn-primary-text: #ffffff;
}

:root[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-alt: #0e1426;
  --surface: #131a30;
  --surface-2: #1a2340;
  --border: rgba(232, 236, 245, 0.12);
  --text: #e8ecf5;
  --text-dim: #a7afc9;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --warm: #fb923c;
  --warm-strong: #fdba74;
  --danger: #f57272;
  --focus-ring: #2dd4bf;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.25);
  --code-bg: rgba(255, 255, 255, 0.06);
  --gradient-hero: linear-gradient(120deg, #14b8a6 0%, #34d399 50%, #fb923c 100%);
  --gradient-opacity: 0.28;
  --btn-primary-bg: linear-gradient(135deg, #2dd4bf, #14b8a6);
  --btn-primary-text: #0a0e1a;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 750; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
code, pre, kbd, .mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}
code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}
pre {
  background: var(--code-bg);
  padding: 1em 1.2em;
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
}
pre code { background: none; padding: 0; }

a { color: var(--accent-strong); text-decoration-thickness: 1.5px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap--narrow { max-width: 760px; }

main { flex: 1 0 auto; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand-name { white-space: nowrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2.2rem 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-legal p { margin: 0; }
.footer-disclosure { font-size: 0.85rem; opacity: 0.85; margin-top: 0.15rem !important; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: var(--shadow); filter: brightness(1.04); }

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-sm); }

.btn--warm {
  background: var(--warm);
  color: #ffffff;
}

.btn--lg { padding: 0.95em 1.9em; font-size: 1.08rem; }

/* Disabled / "coming soon" buttons — must read as clearly inactive,
   regardless of what other .btn-- modifier classes are also present. */
.btn--disabled,
.btn[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
.btn--disabled:hover,
.btn[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
  filter: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3.8rem;
  text-align: center;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .logo-mark { width: 84px; height: 84px; margin: 0 auto 1.6rem; }
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0 0 0.7rem;
}
.hero .tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero .tagline .mono { color: var(--accent-strong); }

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 3.4rem 0 2.6rem;
  border-bottom: 1px solid var(--border);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .eyebrow {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 0.3em 0.7em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.page-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin-bottom: 0.6rem; }
.page-hero .lede { font-size: 1.15rem; color: var(--text-dim); max-width: 700px; }
.page-hero .hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* Shared aurora-gradient wash behind hero sections — subtle, blurred,
   Stripe/Lemon-Squeezy style. Sits behind content via z-index stacking. */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 140%;
  background: var(--gradient-hero);
  opacity: var(--gradient-opacity);
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- Product cards (landing) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 4rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.card .card-icon { font-size: 1.8rem; }
.card h2 { font-size: 1.35rem; margin: 0; }
.card p { color: var(--text-dim); margin: 0; }
.card .card-cta { margin-top: 0.4rem; font-weight: 700; color: var(--accent-strong); }

/* ---------- Sections ---------- */
section { padding: 2.6rem 0; }
section h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1.2rem;
}
section + section { border-top: 1px solid var(--border); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.feature h3 {
  font-size: 1.02rem;
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.feature p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  text-align: center;
}
.stat .stat-num {
  font-family: ui-monospace, monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-strong);
  display: block;
}
.stat .stat-label { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- Table (capability matrix) ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7em 1em; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: none; }

/* ---------- Pricing / checkout ---------- */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.1rem;
  box-shadow: var(--shadow);
  max-width: 480px;
}
.pricing-card .price {
  font-size: 2rem;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  color: var(--accent-strong);
}
.pricing-card ul { padding-left: 1.2em; color: var(--text-dim); }
.pricing-card .btn { width: 100%; margin-top: 1rem; }

/* ---------- Callout / notice boxes ---------- */
.notice {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 14px 14px 0;
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}
.notice--warm { border-left-color: var(--warm); }

/* ---------- Screenshot gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}
.gallery figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.7rem;
  box-shadow: var(--shadow-sm);
}
.gallery img { border-radius: 10px; width: 100%; }
.gallery figcaption {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 0.6rem;
}

/* ---------- App header (icon + title) ---------- */
.app-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.app-header img.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- Legal / policy pages ---------- */
.policy h2 { margin-top: 2rem; font-size: 1.25rem; }
.policy h2:first-of-type { margin-top: 0; }
.policy .updated {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-family: ui-monospace, monospace;
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; }
  .hero { padding: 3.5rem 0 2.4rem; }
}
