/* ==========================================================================
   Sotasci — shared stylesheet
   Pure CSS, no build step. Mobile-first.
   Dark-first design (tokens live on bare :root); a full light theme is
   defined in a prefers-color-scheme: light override below.
   Visual language: deep near-black background, drifting blurred colour
   blobs, and glass (backdrop-filter) surfaces for header/cards/forms.
   ========================================================================== */

:root {
  /* ---- Brand palette ---- */
  --indigo: #6366f1;
  --indigo-2: #8b5cf6;
  --ember: #ff8a3d;
  --ember-2: #ff5f6d;
  --mint: #2dd4bf;
  --mint-2: #22c1a4;

  /* ---- Base surface (dark, default) ---- */
  --color-bg: #06070b;
  --color-bg-alt: #0a0c12;
  --color-surface: #12141c;
  --color-text: #f4f5f8;
  --color-text-muted: #a7acb9;
  --color-border: rgba(255, 255, 255, 0.10);

  --color-primary: var(--indigo);
  --color-primary-dark: #4f52d6;
  --color-primary-contrast: #ffffff;
  --color-accent: var(--ember);
  --color-focus: #9fb4ff;
  --color-link: #b7c0ff;
  --color-link-visited: #b7c0ff;

  --color-success-bg: rgba(45, 212, 191, 0.14);
  --color-success-text: #7fead9;
  --color-error-bg: rgba(255, 95, 109, 0.14);
  --color-error-text: #ffb4bb;

  /* ---- Glass tokens ---- */
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(18, 20, 28, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: 20px;
  --shadow-glass: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-card: var(--shadow-glass);

  --header-bg: rgba(9, 10, 15, 0.38);
  --header-bg-scrolled: rgba(9, 10, 15, 0.72);
  --header-shadow-scrolled: 0 10px 30px rgba(0, 0, 0, 0.35);

  --grad-primary: linear-gradient(135deg, var(--indigo), var(--indigo-2));
  --grad-ember: linear-gradient(135deg, var(--ember), var(--ember-2));
  --grad-mint: linear-gradient(135deg, var(--mint), var(--mint-2));
  --grad-text: linear-gradient(120deg, var(--mint) 0%, var(--indigo-2) 55%, var(--ember) 100%);

  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --ease: 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Light theme override ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f4f5fa;
    --color-bg-alt: #eceef5;
    --color-surface: #ffffff;
    --color-text: #14151c;
    --color-text-muted: #53586a;
    --color-border: rgba(20, 20, 40, 0.10);

    --color-primary: var(--indigo);
    --color-primary-dark: #4f52d6;
    --color-primary-contrast: #ffffff;
    --color-accent: #b25e12;
    --color-focus: #3538c9;
    --color-link: #4548c9;
    --color-link-visited: #4548c9;

    --color-success-bg: #dff7f2;
    --color-success-text: #0d6d5c;
    --color-error-bg: #fde3e5;
    --color-error-text: #9c2530;

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(20, 20, 40, 0.10);
    --shadow-glass: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 20px 45px rgba(30, 32, 60, 0.12);
    --shadow-card: var(--shadow-glass);

    --header-bg: rgba(255, 255, 255, 0.55);
    --header-bg-scrolled: rgba(255, 255, 255, 0.82);
    --header-shadow-scrolled: 0 10px 30px rgba(30, 32, 60, 0.10);
  }

  .bg-blobs::before {
    opacity: 0.35;
  }

  .bg-blobs::after {
    opacity: 0.3;
  }
}

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

html {
  color-scheme: dark light;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Background blobs ----------
   Two pseudo-elements on <html>, each carrying one or more radial-gradient
   layers, fixed to the viewport behind all content. Kept off `body` so
   they never affect layout/stacking of real content. */
html::before,
html::after {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -1;
  pointer-events: none;
  filter: blur(70px);
  will-change: transform;
  animation: blob-drift-a 26s ease-in-out infinite alternate;
}

html::before {
  background:
    radial-gradient(38vw 38vw at 15% 18%, rgba(255, 138, 61, 0.30), transparent 70%),
    radial-gradient(42vw 42vw at 85% 12%, rgba(99, 102, 241, 0.30), transparent 70%);
}

html::after {
  background: radial-gradient(46vw 46vw at 60% 92%, rgba(45, 212, 191, 0.26), transparent 70%);
  animation-name: blob-drift-b;
  animation-duration: 32s;
}

@keyframes blob-drift-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(2vw, 3vh) scale(1.06); }
}

@keyframes blob-drift-b {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-3vw, -2vh) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html::before,
  html::after {
    animation: none;
  }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--color-link);
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--color-link-visited);
}

ul, ol {
  padding-left: 1.25em;
}

/* ---------- Focus styles ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1em;
  top: -3em;
  background: var(--indigo);
  color: #ffffff;
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1em;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Glass surface base ----------
   Shared look for header, cards, principle tiles, forms, callouts, the
   founder card, and the footer strip. Radius/padding are set per-element
   further down so each keeps its own shape. */
.site-header,
.card,
.principle,
.feature-list li,
.contact-form,
.site-footer,
.founder-card,
.callout,
.faq details,
.product-hero .wrap,
.form-status {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

/* Fallback for browsers without backdrop-filter: use a more opaque solid
   tint so text stays legible without the blur. */
@supports not (backdrop-filter: blur(1px)) {
  .site-header,
  .card,
  .principle,
  .feature-list li,
  .contact-form,
  .site-footer,
  .founder-card,
  .callout,
  .faq details,
  .product-hero .wrap,
  .form-status {
    background: var(--color-surface);
  }
}

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg);
  border-left: none;
  border-right: none;
  border-top: none;
  border-radius: 0;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--ease), box-shadow var(--ease);
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  box-shadow: var(--header-shadow-scrolled);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--color-bg);
  }

  .site-header.is-scrolled {
    background: var(--color-bg);
  }
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  height: 32px;
  width: auto;
  border-radius: 8px;
  /* Logo is navy; lift it on the dark background. Reset in light theme. */
  filter: brightness(2.4) saturate(0.75);
}

@media (prefers-color-scheme: light) {
  .brand img {
    filter: none;
  }
}

.brand:hover {
  text-decoration: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--color-text);
  padding: 0.5em 0.9em;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}

.nav-toggle:hover {
  transform: translateY(-1px);
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: inline;
}

.site-nav {
  display: none;
  width: 100%;
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}

.site-nav a {
  display: block;
  padding: 0.6em 0.5em;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background var(--ease), color var(--ease);
}

.site-nav li:last-child a {
  border-bottom: none;
}

.site-nav a:hover {
  background: var(--glass-bg);
}

.site-nav a[aria-current="page"] {
  color: var(--indigo-2);
}

@media (min-width: 760px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    width: auto;
  }

  .site-nav ul {
    flex-direction: row;
    margin: 0;
    gap: 0.25rem;
    padding: 0.35rem;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-nav a {
    padding: 0.5em 0.9em;
    border-bottom: none;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: var(--glass-bg);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.2;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--color-text);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

@media (prefers-color-scheme: light) {
  .btn-secondary:hover {
    background: rgba(20, 20, 40, 0.06);
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 4rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  max-width: 20ch;
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 60ch;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 0.9rem;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--ease), box-shadow var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
  .card:hover {
    box-shadow: 0 26px 50px rgba(30, 32, 60, 0.16);
  }
}

.card .icon {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.card h3 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.card p {
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

/* Gradient-tinted rounded square that holds a product's inline icon */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.icon-tile-ember {
  background: var(--grad-ember);
}

.icon-tile-mint {
  background: var(--grad-mint);
}

.status-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35em 0.85em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  border: 1px solid var(--glass-border);
}

@media (prefers-color-scheme: light) {
  .status-pill {
    background: rgba(20, 20, 40, 0.05);
  }
}

/* ---------- Principles ---------- */
.principles-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .principles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.principle {
  padding: 1.75rem;
  border-radius: var(--radius);
  transition: transform var(--ease), box-shadow var(--ease);
}

.principle:hover {
  transform: translateY(-3px);
}

.principle .icon {
  width: 34px;
  height: 34px;
  color: var(--indigo-2);
  margin-bottom: 0.9rem;
}

/* ---------- Feature list ---------- */
.feature-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 700px) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-list li {
  display: flex;
  gap: 0.9rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
}

.feature-list .icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: var(--indigo-2);
  margin-top: 0.15em;
}

.feature-list strong {
  display: block;
  margin-bottom: 0.2em;
}

/* ---------- Product hero banner ---------- */
.product-hero {
  padding: 3.5rem 0 0;
}

.product-hero .wrap {
  padding: 2.5rem 1.75rem;
  border-radius: var(--radius-lg);
  margin: 1.5rem auto 0;
}

.product-hero .icon-badge {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.35);
}

.product-hero .icon-badge.icon-badge-ember {
  background: var(--grad-ember);
  box-shadow: 0 10px 26px rgba(255, 138, 61, 0.35);
}

.product-hero .icon-badge.icon-badge-mint {
  background: var(--grad-mint);
  box-shadow: 0 10px 26px rgba(45, 212, 191, 0.35);
}

.product-hero .icon-badge svg {
  width: 36px;
  height: 36px;
}

.platform-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.platform-tags li {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
}

@media (prefers-color-scheme: light) {
  .platform-tags li {
    background: rgba(20, 20, 40, 0.05);
  }
}

/* ---------- Callout / privacy box ---------- */
.callout {
  border-left: 3px solid var(--indigo-2);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}

/* ---------- Table (support/privacy) ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- FAQ ---------- */
.faq details {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.faq details p:last-child {
  margin-bottom: 0;
}

.faq details[open] summary {
  margin-bottom: 0.6rem;
}

/* ---------- Founder card (index.html "about" section) ---------- */
.founder-card {
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}

.founder-card h2 {
  margin-bottom: 0.6em;
}

.founder-card p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 640px;
  border-radius: var(--radius);
  padding: 2rem;
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4em;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font: inherit;
  transition: border-color var(--ease), background var(--ease);
}

@media (prefers-color-scheme: light) {
  .form-row input,
  .form-row textarea {
    background: rgba(255, 255, 255, 0.7);
  }
}

.form-row input:focus-visible,
.form-row textarea:focus-visible {
  border-color: var(--color-focus);
}

.form-row .hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.3em;
}

/* Honeypot field: hidden from sighted users and, via tabindex, from keyboard/AT users too */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
  background: var(--color-success-bg);
  color: var(--color-success-text);
  font-weight: 600;
}

.form-status[hidden] {
  display: none;
}

.form-status.is-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

/* ---------- Footer ---------- */
.site-footer {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin: 3rem auto 2rem;
  padding: 1.75rem 2rem;
  max-width: var(--max-width);
  width: calc(100% - 2.5rem);
}

.site-footer .wrap {
  max-width: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: 6rem 0;
}

.error-page .code {
  font-size: 5.5rem;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0;
}

/* ---------- Utility ---------- */
.text-muted {
  color: var(--color-text-muted);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
