/*
 * Self-Centered — public website styles.
 *
 * Tokens mirror apps/mobile/src/design/tokens/colors.ts (Living Current).
 * Change the look here, in :root, not in the rules below.
 * Chartreuse is scarce: completion and significance only (D-086).
 * No directional aqua/mint gradients (DESIGN_DIRECTION §7.1) — diffuse tints only.
 *
 * Colour hierarchy — every rule below uses a ROLE, never a raw brand value:
 *   Ground      --ground (Cloud) + atmosphere of aqua and mint, diffuse only
 *   Surface     --surface (one frosted white glass for every card)
 *   Brand ink   --ink-brand (Periwinkle): headings, wordmark, eyebrows, links,
 *               primary actions, numerals, markers
 *   Body ink    --ink (Charcoal) and --ink-muted for supporting text
 *   Support     --tint-brand (a whisper of Periwinkle) for chips; --tint-you
 *               (Aqua) only for the person's own words in the example chat
 *   Signal      --signal (Chartreuse): the "on" status light and a completed
 *               confirmation — nothing decorative
 */

@font-face {
  font-family: 'Sora';
  src: url('fonts/Sora_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Sora';
  src: url('fonts/Sora_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/Manrope_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Brand palette */
  --chartreuse: #c8f322;
  --periwinkle: #2b2a78;
  --aqua: #bfeff5;
  --mint: #d9f6e3;

  /* Environment (app tokens) */
  --cloud: #fbfdff;
  --mist: #eaf1f6;
  --white: #ffffff;
  --charcoal: #1f2528;
  --text-secondary: #596366;
  --edge: #798081;

  /* Roles (see the hierarchy above) */
  --ground: var(--cloud);
  --surface: rgba(255, 255, 255, 0.66);
  --surface-solid: var(--white);
  --line: rgba(43, 42, 120, 0.08);
  --ink-brand: var(--periwinkle);
  --ink: var(--charcoal);
  --ink-muted: var(--text-secondary);
  --tint-brand: rgba(43, 42, 120, 0.06);
  --tint-you: var(--aqua);
  --signal: var(--chartreuse);

  /* Glass */
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.9);
  --shadow-soft: 0 1px 2px rgba(31, 37, 40, 0.04), 0 12px 40px rgba(43, 42, 120, 0.07);
  --shadow-action: 0 10px 30px rgba(43, 42, 120, 0.22);
  --blur: saturate(160%) blur(18px);

  /* Type */
  --font-display: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --size-hero: clamp(2.5rem, 8vw, 5rem);
  --size-hero-sub: clamp(1.6rem, 4.6vw, 2.75rem);
  --size-h2: clamp(1.75rem, 4.6vw, 2.75rem);
  --size-h3: 1.2rem;
  --size-lead: clamp(1.08rem, 2.2vw, 1.3rem);
  --size-body: 1.0625rem;
  --size-small: 0.9375rem;
  --size-label: 0.8125rem;

  /* Space and shape */
  --gutter: clamp(16px, 5vw, 40px);
  --section: clamp(88px, 14vw, 168px);
  --max: 1120px;
  --measure: 36rem;
  --radius-card: 28px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 700ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--ink-brand);
  text-underline-offset: 3px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink-brand);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  /* Parked far enough above the page that its shadow can't show. Not
     visibility:hidden — that would also stop it receiving keyboard focus. */
  top: -120px;
  z-index: 100;
  background: var(--white);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Atmosphere: soft, non-directional tints behind everything */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.atmosphere span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}
.atmosphere .a1 {
  width: 60vmax;
  height: 60vmax;
  background: var(--aqua);
  top: -28vmax;
  right: -18vmax;
}
.atmosphere .a2 {
  width: 46vmax;
  height: 46vmax;
  background: var(--mint);
  top: 30vh;
  left: -24vmax;
}
.atmosphere .a3 {
  width: 34vmax;
  height: 34vmax;
  background: var(--aqua);
  opacity: 0.35;
  bottom: -14vmax;
  right: 6vw;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 253, 255, 0.6);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--ink-brand);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: var(--size-small);
  font-weight: 600;
}
.site-nav a:hover {
  color: var(--ink-brand);
}
@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
}

/* Status pill — the chartreuse dot is the site's "on" light */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-soft);
  font-size: var(--size-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-brand);
}
.status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(43, 42, 120, 0.12);
}

/* Hero */
.hero {
  padding: clamp(72px, 14vw, 152px) 0 0;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  color: var(--ink-brand);
  margin: 28px auto 28px;
}
.hero .h1-main {
  display: block;
  font-weight: 600;
  font-size: var(--size-hero);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 11ch;
  margin: 0 auto;
}
/* "Return to yourself." — the quieter second beat, following on once the
   light is on. */
.hero .h1-sub {
  display: block;
  font-weight: 400;
  font-size: var(--size-hero-sub);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 0.45em;
}
/* "Switch on." comes up like a light switching on: once, briefly, and not
   at all under Reduce Motion. "Return to yourself." then settles in. */
.js .hero .h1-main {
  animation: switch-on 900ms var(--ease) 500ms both;
}
.js .hero .h1-sub {
  animation: follow-on 700ms var(--ease) 1250ms both;
}
@keyframes follow-on {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes switch-on {
  0% {
    opacity: 0.18;
  }
  35% {
    opacity: 0.55;
  }
  45% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}
.hero .lead {
  font-size: var(--size-lead);
  color: var(--ink-muted);
  max-width: 35rem;
  margin: 0 auto 40px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--size-small);
  text-decoration: none;
  transition:
    transform 300ms var(--ease),
    box-shadow 300ms var(--ease),
    background 300ms var(--ease);
}
.button:hover {
  transform: translateY(-1px);
}
.button:active {
  transform: translateY(0) scale(0.98);
}
.button-primary {
  background: var(--ink-brand);
  color: var(--white);
  box-shadow: var(--shadow-action);
}
.button-primary:hover {
  box-shadow: 0 14px 36px rgba(43, 42, 120, 0.28);
}
.button-quiet {
  background: var(--glass-strong);
  color: var(--ink-brand);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

/* Sections */
section {
  position: relative;
}
.section {
  padding: var(--section) 0 0;
}
.eyebrow {
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-brand);
  margin: 0 0 16px;
}
h2 {
  color: var(--ink-brand);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-h2);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 18ch;
}
h3 {
  color: var(--ink-brand);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-h3);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.section-lead {
  color: var(--ink-muted);
  font-size: var(--size-lead);
  max-width: var(--measure);
  margin: 0;
}
p {
  margin: 0 0 16px;
}

/* Glass card */
/* The one card surface — every card on the site uses it unchanged. */
.card {
  background: var(--surface);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-soft);
}

/* Introduction */
.intro-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 72px;
  }
}

/* Example conversation */
.chat {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-label {
  font-size: var(--size-label);
  color: var(--ink-muted);
  font-weight: 600;
  margin: 0 4px 4px;
}
.bubble {
  max-width: 86%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: var(--size-small);
  line-height: 1.5;
}
.bubble-buddy {
  background: var(--surface-solid);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.bubble-you {
  background: var(--tint-you);
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.proposal {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-solid);
  border-radius: 20px;
  padding: 12px 12px 12px 16px;
  font-size: var(--size-small);
}
.proposal .confirm {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--signal);
  color: var(--ink-brand);
  font-weight: 700;
  font-size: var(--size-label);
}

/* Activities */
.activity-grid {
  display: grid;
  gap: 16px;
  margin-top: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .activity-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.activity {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.activity .category {
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-brand);
  opacity: 0.75;
}
.activity p {
  color: var(--ink-muted);
  font-size: var(--size-small);
  margin: 0;
}
.activity ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.activity li {
  font-size: var(--size-label);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--tint-brand);
  color: var(--ink-brand);
}

/* How it works */
.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step {
  padding: 32px 28px;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-label);
  letter-spacing: 0.1em;
  color: var(--ink-brand);
}
.step p {
  color: var(--ink-muted);
  font-size: var(--size-small);
  margin: 0;
}

/* Principles */
.principles {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}
.principles li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--ink);
}
.principles li::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--ink-brand);
  opacity: 0.55;
}

/* Closing call */
.closing {
  text-align: center;
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px);
}
.closing h2 {
  margin-left: auto;
  margin-right: auto;
}
.closing .section-lead {
  margin: 0 auto 32px;
}

/* Footer */
.site-footer {
  padding: var(--section) 0 48px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-grid h2 {
  font-family: var(--font-body);
  line-height: 1.6;
  max-width: none;
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 14px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-grid a {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--size-small);
}
.footer-grid a:hover {
  color: var(--ink-brand);
  text-decoration: underline;
}
.footer-note {
  color: var(--ink-muted);
  font-size: var(--size-small);
  max-width: 26rem;
}
.fine {
  margin-top: 40px;
  color: var(--ink-muted);
  font-size: var(--size-label);
}

/* Legal pages */
.legal {
  padding: clamp(56px, 10vw, 112px) 0 0;
}
.legal article {
  max-width: 44rem;
  padding: clamp(28px, 6vw, 56px);
}
.legal h1 {
  color: var(--ink-brand);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-h2);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 8px;
}
.legal h2 {
  font-size: 1.25rem;
  max-width: none;
  margin: 36px 0 10px;
}
.legal .updated {
  color: var(--ink-muted);
  font-size: var(--size-small);
  margin-bottom: 32px;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 8px;
}

/* Reveal on scroll — only when JS runs and motion is welcome */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .button {
    transition: none;
  }
  .js .hero .h1-main,
  .js .hero .h1-sub {
    animation: none;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card,
  .site-header {
    background: var(--glass-strong);
  }
}
