/* ============================================================
   Willy — shared stylesheet
   Design tokens taken directly from the app implementation.
   Strictly monochrome. Opacity carries hierarchy, not color.
   ============================================================ */

:root {
  --bg: #101010;
  --text-1: rgba(255, 255, 255, 0.70);   /* primary   */
  --text-2: rgba(255, 255, 255, 0.54);   /* secondary */
  --text-3: rgba(255, 255, 255, 0.38);   /* tertiary  */
  --text-4: rgba(255, 255, 255, 0.24);   /* muted     */

  --accent: #e0a96d;   /* warm accent — used sparingly on eyebrow labels only */

  --card-fill: rgba(255, 255, 255, 0.05);
  --card-fill-hover: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.07);

  --circle-belly: rgba(255, 255, 255, 0.11);
  --circle-chest: rgba(255, 255, 255, 0.07);

  --max-width: 760px;
  --nav-height: 84px;

  --ease-organic: cubic-bezier(0.45, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

a:hover {
  text-decoration-color: var(--text-1);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 1px solid var(--text-2);
  outline-offset: 4px;
  border-radius: 4px;
}

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

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

/* ---------------- Nav ---------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo img {
  height: 65px;
  width: auto;
}

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

.nav-links a {
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.4s var(--ease-organic);
}

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

@media (max-width: 560px) {
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 11px;
    letter-spacing: 0.8px;
  }
}

/* ---------------- Typography helpers ---------------- */

.eyebrow {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

h1, h2, h3 {
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--text-1);
  margin: 0;
}

h1 {
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: 1.5px;
  line-height: 1.3;
}

h2 {
  font-size: clamp(22px, 4vw, 28px);
  letter-spacing: 1px;
  line-height: 1.4;
}

p {
  color: var(--text-2);
  font-weight: 300;
  margin-top: 9px;
  margin-bottom: 9px;
}

.muted {
  color: var(--text-3);
}

.faint {
  color: var(--text-4);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--card-fill);
  border: 1px solid var(--card-border);
  color: var(--text-1);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 400;
  transition: background 0.4s var(--ease-organic), border-color 0.4s var(--ease-organic);
  cursor: pointer;
}

.btn:hover {
  background: var(--card-fill-hover);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.badge-disabled {
  display: inline-block;
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.store-badge {
  height: 48px;
  width: auto;
  display: block;
}

.card {
  background: var(--card-fill);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
}

/* ---------------- Sections / fade-in on scroll ---------------- */

section.wrap {
  padding-top: 20px;
  padding-bottom: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.9s var(--ease-organic), transform 0.9s var(--ease-organic);
}

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

hr.divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 0;
}

/* ---------------- Breathing animation (signature element) ----------------
   Mirrors the in-app phase timing exactly:
   belly out 1.9s -> chest up 2.0s -> hold and feel 2.2s -> release 5.5s
   Total cycle: 11.6s
   ---------------------------------------------------------------------- */

.breath {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 35px;
  padding: 32px 0 12px;
}

.breath-small {
  gap: 26px;
  padding: 0;
}

.breath-small .breath-chest {
  width: clamp(110px, 12.6vw, 128px);
  height: clamp(110px, 12.6vw, 128px);
}

.breath-small .breath-belly {
  width: clamp(140px, 16vw, 166px);
  height: clamp(140px, 16vw, 166px);
}

.breath-small .breath-label {
  font-size: clamp(13px, 1.4vw, 15px);
  padding: 0 12px;
}

.breath-circle {
  border-radius: 999px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.breath-chest {
  width: clamp(138px, 14vw, 152px);
  height: clamp(138px, 14vw, 152px);
  background: var(--circle-chest);
  animation: breathChest 11.6s var(--ease-organic) infinite;
}

.breath-belly {
  width: clamp(178px, 18vw, 196px);
  height: clamp(178px, 18vw, 196px);
  background: var(--circle-belly);
  animation: breathBelly 11.6s var(--ease-organic) infinite;
}

.breath-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 300;
  letter-spacing: 0.4px;
  color: var(--text-1);
  opacity: 0;
  padding: 0 18px;
  transition: opacity 0.3s ease;
}

/* ---------------------------------------------------------------------
   Timing derived directly from learn_page.dart:
     bellySeconds = 1.9, chestSeconds = 2.0, holdSeconds = 2.2,
     exhaleSeconds = 5.5, textDelay = 0.2, overlap = 0.5
     total = 11.6s

   Scale (circle growth) boundaries:
     chest starts growing : 1.4s  (12.07%)
     belly reaches full   : 1.9s  (16.38%)
     chest reaches full   : 3.9s  (33.62%)
     hold ends / exhale starts : 6.1s (52.59%)

   Text boundaries (note: text changes CONTENT, it does not blink
   off and on — "belly out" stays on screen continuously until it
   becomes "hold and feel", same for chest's "chest up"):
     chest text appears ("chest up")     : 2.1s (18.10%)
     both switch to "hold and feel"      : 4.1s (35.34%)
     both switch to "release"            : 7.0s (60.34%)
     loops back to "belly out" / empty at 11.6s (100%)
   --------------------------------------------------------------------- */

@keyframes breathBelly {
  0%      { transform: scale(1); }
  16.38%  { transform: scale(1.18); }
  52.59%  { transform: scale(1.18); }
  100%    { transform: scale(1); }
}

@keyframes breathChest {
  0%      { transform: scale(1); }
  12.07%  { transform: scale(1); }
  33.62%  { transform: scale(1.22); }
  52.59%  { transform: scale(1.22); }
  100%    { transform: scale(1); }
}

/* Belly circle: "belly out" (0 -> 35.34%) -> "hold and feel" (35.34 -> 60.34%) -> "release" (60.34 -> 100%) */
.label-belly-out { animation: lblBellyOut 11.6s linear infinite; }

@keyframes lblBellyOut {
  0%      { opacity: 1; }
  35.34%  { opacity: 1; }
  35.84%  { opacity: 0; }
  100%    { opacity: 0; }
}

/* Chest circle: empty (0 -> 18.10%) -> "chest up" (18.10 -> 35.34%) -> "hold and feel" (35.34 -> 60.34%) -> "release" (60.34 -> 100%) */
.label-chest-up { animation: lblChestUp 11.6s linear infinite; }

@keyframes lblChestUp {
  0%      { opacity: 0; }
  18.10%  { opacity: 0; }
  18.60%  { opacity: 1; }
  35.34%  { opacity: 1; }
  35.84%  { opacity: 0; }
  100%    { opacity: 0; }
}

/* Shared "hold and feel" — appears in BOTH circles at the same time */
.label-hold { animation: lblHold 11.6s linear infinite; }

@keyframes lblHold {
  0%      { opacity: 0; }
  35.34%  { opacity: 0; }
  35.84%  { opacity: 1; }
  60.34%  { opacity: 1; }
  60.84%  { opacity: 0; }
  100%    { opacity: 0; }
}

/* Shared "release" — appears in BOTH circles at the same time, through to loop end */
.label-release { animation: lblRelease 11.6s linear infinite; }

@keyframes lblRelease {
  0%      { opacity: 0; }
  60.34%  { opacity: 0; }
  60.84%  { opacity: 1; }
  100%    { opacity: 1; }
}

.breath-caption {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}



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

footer {
  padding: 64px 0 56px;
  text-align: center;
}

footer .wordmark {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-4);
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

footer .footer-links a {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
}

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

footer .copyright {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-4);
}

/* ---------------- FAQ accordion ---------------- */

.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: background 0.3s var(--ease-organic), border-color 0.3s var(--ease-organic);
}

.faq-item.open {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}

.faq-item.open .faq-question {
  color: var(--text-1);
}

.faq-chevron {
  flex-shrink: 0;
  display: inline-flex;
  width: 13px;
  height: 13px;
  color: var(--text-4);
  transition: transform 0.35s var(--ease-organic), color 0.3s var(--ease-organic);
}

.faq-chevron svg {
  width: 100%;
  height: 100%;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--text-2);
}

.faq-answer-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-organic);
}

.faq-item.open .faq-answer-wrap {
  max-height: 600px;
}

.faq-answer {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
  font-weight: 300;
}

/* ---------------- Misc page helpers ---------------- */

.page-header {
  padding: 64px 0 12px;
  text-align: center;
}

.page-header .eyebrow {
  display: block;
  margin-bottom: 18px;
}

.legal h2 {
  margin-top: 48px;
  margin-bottom: 14px;
  font-size: 18px;
}

.legal h2:first-of-type {
  margin-top: 0;
}

.legal ul {
  color: var(--text-2);
  padding-left: 20px;
}

.legal li {
  margin-bottom: 6px;
}

.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.value-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--text-2);
  font-size: 15px;
}

.value-list .dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-4);
  transform: translateY(-2px);
}

/* ---------------- Section rhythm variants ----------------
   Each section keeps the same eyebrow/h2/body grammar, but
   width, alignment, and density vary so a long scroll doesn't
   read as one repeating block. */

/* Philosophy: narrower column, slightly intimate. */
.section-intimate {
  max-width: 540px;
}

/* Technique: real sequence, so numbering carries information
   (the order of the four phases matters). */
.technique-steps {
  display: grid;
  gap: 0;
  counter-reset: phase;
  margin-top: 8px;
}

.technique-step {
  counter-increment: phase;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.technique-step:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.technique-step-title {
  color: var(--text-1);
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 400;
}

.technique-step-body {
  margin: 0;
  color: var(--text-3);
}

/* Value prop: wide and centered — a breathing-room pause
   between the dense technique list and the "doesn't have" card. */
.section-breathing-room {
  text-align: center;
}

.section-breathing-room .value-list {
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}

/* "Doesn't have" card: slightly stronger fill so it reads as
   a deliberate pause/contrast block, not just another list. */
.card-emphasis {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.09);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--text-1);
}

/* ---------------- Alternating split layout ----------------
   Used for the four mid-page sections (benefits, doesn't-have,
   how it works, technique, why willy) so a long scroll reads as
   a left/right rhythm instead of one repeating centered column.
   Each .split-section has a text side and a visual side; the
   visual is a quiet echo of the hero's breathing circles —
   static, not another shape language. */

.split-wide {
  max-width: 980px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

@media (min-width: 760px) {
  .split-section {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .split-section.split-flip {
    direction: rtl;
  }

  .split-section.split-flip > * {
    direction: ltr;
  }
}

.split-text {
  min-width: 0;
}

.split-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* The shared circle motif: a large, quiet, static ring that
   echoes the hero's breathing circles without animating —
   it anchors each section visually without competing for
   attention with the text. */
.anchor-ring {
  position: relative;
  width: clamp(160px, 20vw, 220px);
  height: clamp(160px, 20vw, 220px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.anchor-ring .anchor-number {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 300;
  color: var(--text-2);
  line-height: 1;
}

.anchor-ring .anchor-label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-4);
}

@media (max-width: 759px) {
  .split-visual {
    order: -1;
  }
  .anchor-ring {
    width: 140px;
    height: 140px;
  }
  .anchor-ring .anchor-number {
    font-size: 32px;
  }
}

/* Large, thin "willy" wordmark echo for the "Why Willy" section —
   a quiet visual signature, not a competing shape. Sits low in
   opacity so it reads as a watermark, not a heading. */
.why-wordmark {
  font-size: clamp(56px, 8vw, 100px);
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-4);
  text-align: center;
  width: 100%;
}