/* The site uses the app palette. The values in :root must be equal to
   constants/palette.js. The test __tests__/website-test.ts locks this. */
:root {
  --bg: #03312A;
  --surface: #0B4239;
  --surface-raised: #12524A;
  --border: rgba(241,250,247,0.08);
  --ink-primary: #F1FAF7;
  --ink-secondary: #BFDDD4;
  --ink-muted: #8FBDB1;
  --accent: #7BE8C9;
  --accent-ink: #04332C;
  --phase-inhale: #8FF0D2;
  --phase-exhale: #3FA58E;

  --radius: 24px;
  --gutter: 20px;
  --max: 1080px;
  --sans: "Poppins", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: dark;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces_300Light.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-primary);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-underline-offset: 3px; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 999px;
}

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

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
}
.site-nav a[aria-current="page"] { color: var(--ink-primary); }

/* Hero */
.hero {
  padding: 48px 0 72px;
  background: radial-gradient(ellipse 70% 60% at 70% 40%, var(--surface) 0%, transparent 70%);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  margin: 0 0 8px;
}
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; text-wrap: balance; }
p, li { text-wrap: pretty; }
h1 {
  font-size: clamp(2.25rem, 5vw + 1rem, 3.75rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 em {
  font-family: var(--serif);
  font-weight: 300;
  font-style: normal;
  color: var(--accent);
}
.lead {
  color: var(--ink-secondary);
  font-size: 1.1875rem;
  max-width: 34em;
  margin: 20px 0 32px;
  text-wrap: pretty;
}
.cta-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.button:not([aria-disabled="true"]):active { transform: scale(0.96); }
.button svg { width: 20px; height: 20px; flex: none; }
/* The official Apple badge (assets/img/app-store-badge-black.svg, from
   toolbox.marketingtools.apple.com). Do not change its artwork or colors. */
.badge {
  display: inline-block;
  flex: none;
  border-radius: 8px;
  transition: opacity 150ms ease, transform 150ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.badge img { height: 48px; width: auto; max-width: none; }
.badge:active { transform: scale(0.96); }
.cta-note { color: var(--ink-muted); font-size: 0.9375rem; }

/* The breathing flower, a small copy of the one in the app */
.flower-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.flower {
  position: relative;
  width: 70%;
  aspect-ratio: 1;
  animation: breathe 11s ease-in-out infinite;
}
.petal {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52%;
  height: 52%;
  border-radius: 50%;
  background: var(--phase-exhale);
  opacity: 0.3;
  transform: rotate(var(--a)) translateY(-34%);
}
/* The far layer spreads wider and is fainter, as in the app */
.petal.far {
  width: 46%;
  height: 46%;
  opacity: 0.14;
  transform: rotate(var(--a)) translateY(-68%);
}
.flower .core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34%;
  height: 34%;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--ink-primary);
}

/* Resonance breathing: 5.5 s in, 5.5 s out */
@keyframes breathe {
  0%, 100% { transform: scale(0.82) rotate(0deg); }
  50% { transform: scale(1.12) rotate(30deg); }
}

/* Sections */
section { padding: 72px 0; }
.section-title {
  font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-intro.flush { margin-bottom: 0; }
.section-intro {
  color: var(--ink-secondary);
  max-width: 38em;
  margin: 12px 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 1.125rem; margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-secondary); font-size: 0.96875rem; }
.card .pattern {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.shots figure { margin: 0; }
.shots img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  outline: 1px solid var(--border);
  outline-offset: -1px;
}
.shots figcaption {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  text-align: center;
  margin-top: 12px;
}

.privacy-band {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.privacy-band ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.privacy-band li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-secondary);
}
.privacy-band li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--accent);
}

/* Text pages: privacy and support */
.page { padding: 32px 0 80px; }
.prose { max-width: 42rem; }
.prose h1 { font-size: clamp(2rem, 3vw + 1rem, 2.75rem); margin-bottom: 8px; }
.prose .updated { color: var(--ink-muted); margin: 0 0 32px; font-size: 0.9375rem; }
.prose h2 { font-size: 1.375rem; margin: 40px 0 12px; }
.prose h3 { font-size: 1.125rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-secondary); }
.prose strong { color: var(--ink-primary); font-weight: 600; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 6px; }
.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 8px;
}
.summary p { margin: 0; color: var(--ink-primary); }
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin: 24px 0 8px;
}
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 20px;
  margin-bottom: 10px;
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-primary);
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
summary::-webkit-details-marker { display: none; }
/* A chevron on the right that turns when the answer opens */
summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 150ms ease-out;
}
details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
summary:focus-visible { outline-offset: 4px; }
details[open] summary { padding-bottom: 4px; }
details > :not(summary) { margin: 8px 0 16px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 0 20px; flex-wrap: wrap; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-secondary);
}

@media (max-width: 820px) {
  .hero { padding-top: 16px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero .flower-stage { max-width: 300px; }
  .privacy-band { grid-template-columns: 1fr; }
  .shots {
    grid-template-columns: repeat(3, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
  }
  .shots figure { scroll-snap-align: center; }
  section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flower { animation: none; transform: scale(1); }
  .button, .badge { transition: none; }
  summary::after { transition: none; }
}

/* Hover styles only for a mouse or trackpad: on touch, :hover stays on after a tap */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
  .site-nav a:hover { color: var(--ink-primary); }
  .button:hover { text-decoration: none; }
  .badge:hover { opacity: 0.85; }
}
