/* MutePulse — Forest palette, Soft Structuralism */

:root {
  --bg: #f8faf9;
  --bg-elevated: #ffffff;
  --text: #1a1f1c;
  --text-muted: #5c6b63;
  --text-subtle: #8a9690;
  --forest: #1b4332;
  --accent: #52b788;
  --accent-hover: #40916c;
  --border: rgba(27, 67, 50, 0.1);
  --shadow-soft: 0 24px 64px rgba(27, 67, 50, 0.08);
  --shadow-card: 0 2px 24px rgba(27, 67, 50, 0.06);
  --radius: 16px;
  --radius-sm: 8px;
  --font: "Geist Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --nav-height: 64px;
  --section-y: clamp(4rem, 10vw, 7rem);
  --container: min(1120px, calc(100% - 2rem));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1110;
    --bg-elevated: #141a18;
    --text: #eef2f0;
    --text-muted: #9aaba3;
    --text-subtle: #6b7a73;
    --forest: #6ee7b7;
    --accent: #52b788;
    --accent-hover: #6ee7b7;
    --border: rgba(110, 231, 183, 0.12);
    --shadow-soft: 0 24px 64px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 2px 24px rgba(0, 0, 0, 0.25);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-muted: #9aaba3;
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ── Nav ── */

.nav-wrap {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding-inline: 1rem;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--nav-height);
  padding: 0 0.5rem 0 1.25rem;
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow-card);
}

@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: var(--bg-elevated);
    backdrop-filter: none;
  }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--forest);
  display: grid;
  place-items: center;
}

.nav-logo-mark svg {
  width: 14px;
  height: 14px;
  fill: var(--bg);
}

@media (prefers-color-scheme: dark) {
  .nav-logo-mark svg {
    fill: #0d1110;
  }
}

.nav-links {
  display: none;
  list-style: none;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  margin-left: auto;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--forest);
  color: #f8faf9;
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    background: var(--accent);
    color: #0d1110;
  }
}

.btn-primary:hover {
  background: var(--accent-hover);
}

@media (prefers-color-scheme: dark) {
  .btn-primary:hover {
    background: #6ee7b7;
  }
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--forest) 6%, transparent);
}

/* ── Hero ── */

.hero {
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 3rem;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 12ch;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 38ch;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
}

.hero-visual-shell {
  padding: 0.5rem;
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--forest) 4%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.hero-visual-inner {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.hero-visual-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Social proof ── */

.proof {
  padding-block: 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (min-width: 640px) {
  .proof-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.proof-item {
  text-align: center;
}

.proof-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--forest);
}

@media (prefers-color-scheme: dark) {
  .proof-value {
    color: var(--accent);
  }
}

.proof-label {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

/* ── Sections ── */

.section {
  padding-block: var(--section-y);
}

.section-header {
  max-width: 36rem;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 48ch;
}

/* ── Steps ── */

.steps {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.step {
  padding: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  color: var(--forest);
}

@media (prefers-color-scheme: dark) {
  .step-icon {
    color: var(--accent);
  }
}

.step-icon svg {
  width: 20px;
  height: 20px;
}

.step-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Bento ── */

.bento {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
  }

  .bento-a {
    grid-column: span 7;
    grid-row: span 2;
  }

  .bento-b {
    grid-column: span 5;
  }

  .bento-c {
    grid-column: span 5;
  }
}

.bento-cell {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}

.bento-a {
  display: grid;
}

@media (min-width: 768px) {
  .bento-a {
    grid-template-columns: 1fr 1fr;
  }
}

.bento-a-copy {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-a-img {
  min-height: 200px;
}

.bento-a-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-b,
.bento-c {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.bento-b.has-image {
  padding: 0;
  position: relative;
  min-height: 220px;
}

.bento-b.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

.bento-b-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 16, 0.75), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  color: #f8faf9;
}

.bento-label {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.bento-text {
  font-size: 0.875rem;
  opacity: 0.85;
}

.bento-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 1rem;
}

/* ── Sample player ── */

.sample {
  background: color-mix(in srgb, var(--forest) 5%, var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sample-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

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

.sample-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.breath-ring-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  --breath-scale: 0.72;
  --breath-transition: 0.4s;
}

.breath-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transform: scale(calc(var(--breath-scale) * var(--ring-factor, 1)));
  opacity: calc(0.45 + var(--breath-scale) * 0.45);
  transition: transform var(--breath-transition) cubic-bezier(0.4, 0, 0.2, 1),
    opacity var(--breath-transition) ease;
  will-change: transform;
}

.breath-ring-1 {
  inset: 0;
}

.breath-ring-2 {
  inset: 12px;
  --ring-factor: 0.94;
  border-color: color-mix(in srgb, var(--forest) 25%, transparent);
}

.breath-ring-3 {
  inset: 24px;
  --ring-factor: 0.88;
  border-color: color-mix(in srgb, var(--accent) 15%, transparent);
}

.breath-ring-wrap.is-hold .breath-ring,
.breath-ring-wrap.is-rest .breath-ring {
  transition-duration: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .breath-ring {
    transition: none;
  }
}

.breath-core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--forest);
  display: grid;
  place-items: center;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .breath-core {
    background: var(--accent);
  }
}

.breath-core svg {
  width: 24px;
  height: 24px;
  fill: #f8faf9;
}

@media (prefers-color-scheme: dark) {
  .breath-core svg {
    fill: #0d1110;
  }
}

.breath-meta {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  width: 100%;
}

.breath-label,
.breath-timer {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.breath-label-key {
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.6875rem;
}

#breath-phase,
#breath-time {
  color: var(--forest);
  font-weight: 500;
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: dark) {
  #breath-phase,
  #breath-time {
    color: var(--accent);
  }
}

.breath-progress {
  width: 100%;
  max-width: 240px;
  height: 4px;
  background: color-mix(in srgb, var(--forest) 10%, transparent);
  border-radius: 999px;
  overflow: hidden;
}

.breath-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--forest);
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 0.25s linear;
}

@media (prefers-color-scheme: dark) {
  .breath-progress-fill {
    background: var(--accent);
  }
}

.breath-pattern {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-align: center;
}

.sample-player.is-complete .breath-pattern {
  color: var(--forest);
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .sample-player.is-complete .breath-pattern {
    color: var(--accent);
  }
}

.sample-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.sample-mute-btn {
  min-width: 7.5rem;
}

/* ── FAQ ── */

.faq-list {
  max-width: 640px;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  border-radius: 1px;
  transition: transform 0.25s ease;
}

.faq-icon::before {
  width: 12px;
  height: 2px;
  top: 11px;
  left: 6px;
}

.faq-icon::after {
  width: 2px;
  height: 12px;
  top: 6px;
  left: 11px;
}

.faq-item.is-open .faq-icon::after {
  transform: scaleY(0);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 52ch;
}

/* ── Footer CTA ── */

.footer-cta {
  text-align: center;
  padding-block: var(--section-y);
}

.footer-cta-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 16ch;
  margin-inline: auto;
  margin-bottom: 1rem;
}

.footer-cta-sub {
  color: var(--text-muted);
  max-width: 40ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .footer-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ── Mobile nav toggle ── */

.nav-toggle {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
}

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

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 6rem 2rem 2rem;
}

.mobile-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 500;
  padding: 0.75rem 0;
  letter-spacing: -0.02em;
}

.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}
