/*
  Discova shared site styles.
  Color tokens are drawn from src/constants/theme.ts (light = lightColors,
  dark = darkColors). Purple is the lead brand color in both modes on the
  website; blue is used as a supporting accent (it's the app's own dark-mode
  primary and shows up as the secondary "food" hue in light mode), so both
  are present but purple stays dominant throughout.
*/

:root {
  color-scheme: light dark;

  --bg: #f0f2f2;
  --surface: #ffffff;
  --surface-2: #f8f9f9;
  --primary: #834ddc; /* theme.ts lightColors.primary */
  --primary-strong: #5b2fb6; /* theme.ts lightColors.primaryDark */
  --accent: #4a9eff; /* supporting blue, used sparingly */
  --text: #1a1a1a;
  --text-secondary: #5a5a5a;
  --border: #d8dcdc;
  --success: #27ae60;
  --warning: #d68910;
  --error: #c0392b;
  --shadow: rgba(30, 20, 60, 0.08);
  --shadow-strong: rgba(30, 20, 60, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141619;
    --surface: #1f2328;
    --surface-2: #282c33;
    --primary: #834ddc; /* theme.ts darkColors.accentOrange (symptom purple), used as the lead brand color here */
    --primary-strong: #5b2fb6; /* same deep purple as light mode, keeps white button text legible */
    --accent: #4a9eff; /* theme.ts darkColors.primary, kept as a supporting blue accent */
    --text: #f0f2f4;
    --text-secondary: #a8adb5;
    --border: #3a4049;
    --success: #2ecc71;
    --warning: #f1c40f;
    --error: #e74c3c;
    --shadow: rgba(0, 0, 0, 0.35);
    --shadow-strong: rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-logo .mark {
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.nav-cta {
  display: inline-flex;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 18px;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
}

.mobile-menu a:hover {
  background: var(--surface-2);
}

.mobile-menu.is-open {
  display: flex;
}

@media (max-width: 760px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  box-shadow: 0 8px 24px -8px var(--shadow-strong);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px -6px var(--shadow-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  text-align: center;
}

.hero-blobs {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  z-index: 0;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.55;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 16s ease-in-out infinite;
}

.blob-a {
  width: 420px;
  height: 420px;
  left: 6%;
  top: 4%;
  background: var(--primary);
  animation-delay: 0s;
}

.blob-b {
  width: 360px;
  height: 360px;
  right: 8%;
  top: 12%;
  background: var(--accent);
  animation-delay: -6s;
}

.blob-c {
  width: 260px;
  height: 260px;
  left: 40%;
  top: 24%;
  background: var(--primary-strong);
  animation-delay: -11s;
  opacity: 0.35;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.08);
  }
  66% {
    transform: translate(-24px, 18px) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text);
}

.hero h1 .grad {
  color: var(--primary);
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 0 0 36px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.platform-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ---------- Sections ---------- */

section {
  padding: 72px 0;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head .kicker {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--text);
}

.section-head p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1.05rem;
}

/* ---------- Cards / feature grid ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: 0 16px 32px -14px var(--shadow);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Steps ---------- */

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 760px) {
  .steps-row {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  padding: 28px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ---------- Disclaimer callout ---------- */

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px 26px;
}

.callout h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.callout p {
  margin: 0;
  color: var(--text-secondary);
}

/* ---------- CTA band ---------- */

.cta-band {
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
}

.cta-band p {
  margin: 0 0 28px;
  opacity: 0.92;
}

.cta-band .btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: #fff;
  color: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

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

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-col p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0 0 10px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ---------- Legal doc pages (privacy / terms / support / delete-*) ---------- */

.doc-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.doc-main h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.doc-main .meta {
  color: var(--text-secondary);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

.doc-main h2 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
}

.doc-main p,
.doc-main li {
  color: var(--text);
}

.doc-main ul,
.doc-main ol {
  padding-left: 1.2rem;
}

.doc-main ol li,
.doc-main ul li {
  margin: 0 0 8px;
}

.steps {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 8px;
  margin: 0 0 16px;
}

.steps h2 {
  margin-top: 0;
}

.contact {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 8px;
}

.contact a {
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- About page ---------- */

.about-hero {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 56px 0 16px;
}

@media (max-width: 700px) {
  .about-hero {
    flex-direction: column;
    text-align: center;
  }
}

.about-photo {
  flex: none;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: 0 12px 28px -10px var(--shadow-strong);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-hero .role {
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 12px;
}

.about-hero .location {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 0 64px;
}

.about-body p {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 20px;
}

.about-quote {
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 28px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
