/* SoulQ web — design system.
   Tokens derived from the app (lib/theme/app_colors.dart):
   teal #047283, mint #D4EBE8, gold #FFC14A, app dark UI #1C1B29. */

:root {
  --teal: #047283;
  --teal-deep: #034e5a;
  --teal-ink: #0e2a2e;
  --gold: #ffc14a;
  --mint: #d4ebe8;
  --paper: #f6fbfa;
  --surface: #ffffff;
  --text: #17383c;
  --muted: #5b7477;
  --line: #dcE9e7;
  --app-dark: #1c1b29;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --w-page: 68rem;
  --w-prose: 44rem;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--teal-ink);
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.9rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 251, 250, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--teal-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: auto;
}

.brand img {
  width: 2rem;
  height: 2rem;
  padding: 0.28rem;
  background: var(--teal);
  border-radius: 9px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover { color: var(--teal-deep); }

.lang-switch {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  white-space: nowrap;
}

.lang-switch:hover { border-color: var(--teal); }

@media (max-width: 640px) {
  .site-nav .hide-sm { display: none; }
}

/* ---------- Hero (landing) ---------- */

.hero {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.1rem);
  font-weight: 700;
  margin: 0 0 1.1rem;
}

.hero h1 .q { color: var(--teal); }
.hero h1 .dot { color: var(--gold); }

.hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 30rem;
  margin: 0 0 1.8rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 1.25rem;
  border-radius: 11px;
  background: var(--teal-ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}

.store-badge small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.store-badge.soon {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: default;
}

.trust-line {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.trust-line b { color: var(--teal-deep); font-weight: 600; }

/* Phone card — the app's check-in moment */

.phone {
  justify-self: center;
  width: min(21.5rem, 100%);
  background: var(--app-dark);
  border-radius: 34px;
  padding: 1.9rem 1.4rem 1.7rem;
  box-shadow:
    0 24px 60px -18px rgba(3, 78, 90, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.phone .greeting {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.15rem;
}

.phone .question {
  color: #4dbcce;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.4rem;
}

.moods {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mood {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.mood .circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--teal);
  display: grid;
  place-items: center;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.mood svg { width: 34px; height: 34px; }

.mood .label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

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

.mood[aria-pressed="true"] .circle {
  background: var(--teal);
  color: #fff;
}

.mood[aria-pressed="true"] .label { color: #e2e8f0; }

.phone .followup {
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
  margin: 1.5rem 0 0.8rem;
  min-height: 1.5em;
}

.phone .followup b { color: #4dbcce; }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mint);
  border: 1px solid rgba(212, 235, 232, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 3rem;
    text-align: center;
  }
  .hero .lead { margin-inline: auto; }
  .store-badges { justify-content: center; }
}

/* ---------- Sections (landing) ---------- */

.section {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section > h2 {
  font-size: 1.75rem;
  margin: 0 0 0.4rem;
}

.section > .section-lead {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 2.2rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}

.feature .icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: var(--mint);
  color: var(--teal);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.feature .icon svg { width: 1.35rem; height: 1.35rem; }

.feature h3 {
  font-size: 1.06rem;
  margin: 0 0 0.35rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Privacy band */

.privacy-band {
  background: var(--teal-deep);
  color: #eaf6f4;
  border-radius: calc(var(--radius) + 6px);
  padding: 2.8rem 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.privacy-band h2 {
  color: #fff;
  font-size: 1.7rem;
  margin: 0 0 0.7rem;
}

.privacy-band p { margin: 0 0 1.3rem; color: #bfe0dc; }

.privacy-band a.button {
  display: inline-block;
  background: var(--gold);
  color: var(--teal-ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.65rem 1.3rem;
}

.privacy-band ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.privacy-band li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-weight: 500;
}

.privacy-band li::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-1px);
}

@media (max-width: 780px) {
  .privacy-band { grid-template-columns: 1fr; padding: 2.2rem 1.6rem; }
}

/* ---------- Document pages (legal, support) ---------- */

.doc-hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.doc-hero .inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 3.2rem 1.5rem 2.4rem;
}

.doc-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 0.8rem;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
}

.doc-meta b { color: var(--text); font-weight: 600; }

.doc-layout {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 4.6rem;
  font-size: 0.88rem;
}

.toc .toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.7rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc li a {
  display: block;
  padding: 0.32rem 0 0.32rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
}

.toc li a:hover {
  color: var(--teal-deep);
  border-left: 2px solid var(--teal);
  margin-left: -2px;
}

.doc {
  max-width: var(--w-prose);
}

.doc > p:first-child { margin-top: 0; }

.doc h2 {
  font-size: 1.32rem;
  margin: 2.6rem 0 0.7rem;
  padding-top: 0.4rem;
  scroll-margin-top: 5rem;
}

.doc h3 {
  font-size: 1.05rem;
  margin: 1.8rem 0 0.4rem;
}

.doc ul, .doc ol { padding-left: 1.35rem; }
.doc li { margin: 0.35rem 0; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.2rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.doc th, .doc td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  vertical-align: top;
}

.doc thead th {
  background: var(--mint);
  color: var(--teal-ink);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.doc tbody tr + tr td, .doc tbody tr th { border-top: 1px solid var(--line); }
.doc tbody tr:nth-child(even) { background: var(--paper); }

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.6rem 0;
}

.notice p { margin: 0; }

.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  transform: translateY(0.2rem);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 1.6rem 0 2.2rem;
}

.contact-card .mail {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.contact-card p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.93rem; }

/* FAQ */

.faq { display: grid; gap: 0.65rem; margin: 1.4rem 0; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 1.15rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.9rem 0;
  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: "+";
  flex: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--teal);
}

.faq details[open] summary::after { content: "–"; }

.faq details p { margin: 0 0 1rem; color: var(--muted); }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 2rem;
}

.site-footer .inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 2.8rem 1.5rem 2.2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

.site-footer .about p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 22rem;
}

.site-footer h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.3rem 0 0.9rem;
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer nav a:hover { color: var(--teal); text-decoration: underline; }

.site-footer .bottom {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 1.1rem 1.5rem 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

@media (max-width: 780px) {
  .site-footer .inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 0.6s ease-out both;
  }
  .hero > *:nth-child(2) { animation-delay: 0.12s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mood .circle { transition: none; }
}
