/* Whirly marketing site
   Colors, type and spacing come from whirly-brand-kit/tokens.json.
   Layout is mobile-first: base styles are for phones, and the
   @media blocks further down add the tablet and desktop layouts. */

:root {
  /* Day theme */
  --cream: #F4EDE1;
  --paper: #FBF7F0;
  --ink: #2A2622;
  --ink-soft: #4F463E;
  --ink-muted: #6B6158;
  --on-ink: #F4EDE1;
  --line: #D9CCBB;
  --wind: #B3A493;

  /* Evening theme (used by the dark sections) */
  --ev-paper: #38322C;
  --ev-ink-soft: #E6DDD0;
  --ev-ink-muted: #CFC4B6;
  --ev-line: #4E463E;
  --ev-accent-text: #E6A88C;

  /* Petals */
  --terracotta: #D48A6C;
  --sand: #E2BE8F;
  --olive: #A3AE7C;
  --slate: #7F9DB6;

  --hover: #B5664A;
  --accent-text: #9A4F36;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Page side margin: 16px on phones, growing to 96px on desktop */
  --gutter: 16px;

  /* One breath cycle for the pinwheel and wind (brand default: 9s) */
  --breath: 9s;
  --ease-breath: cubic-bezier(0.45, 0, 0.35, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { color: var(--hover); }

:focus-visible {
  outline: 3px solid var(--slate);
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }

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

/* ---------- Shared pieces ---------- */

.label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.title {
  font-size: clamp(34px, 4.45vw, 64px);
  font-weight: 800;
  letter-spacing: clamp(-2px, -0.14vw, -1px);
  line-height: 1;
}

/* The one high-contrast element: an ink pill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { color: var(--on-ink); }

.btn-lg {
  height: 58px;
  padding: 0 32px;
  font-size: 18px;
}

.petal { display: block; flex-shrink: 0; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; }
.brand span {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 17px;
  font-weight: 500;
}
.nav a { text-decoration: none; }
/* On phones only the Join button fits; the page is one scroll anyway */
.nav .nav-link { display: none; }
.nav .btn { font-size: 16px; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 8px;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 40px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero h1 {
  font-size: clamp(44px, 7.23vw, 104px);
  font-weight: 800;
  letter-spacing: clamp(-3px, -0.21vw, -1.5px);
  line-height: 0.95;
}

.hero-lede {
  max-width: 560px;
  font-size: clamp(17px, 1.46vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
}
.cta-note {
  font-size: 13px;
  color: var(--ink-muted);
}

/* Pinwheel and wind: one 600 x 560 stage that scales with the screen */
.stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 600 / 560;
  margin: 0 auto;
}
.stage svg { position: absolute; }
.stage .wind-layer {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.stage .wind-front { pointer-events: none; }
.stage .pinwheel {
  left: 16.667%;
  top: 14.286%;
  width: 66.667%;
  height: 71.429%;
}

.spin {
  transform-origin: 50% 50%;
  animation: breathe var(--breath) infinite;
}
@keyframes breathe {
  0%   { transform: rotate(0deg) scale(0.92); animation-timing-function: var(--ease-breath); }
  40%  { transform: rotate(150deg) scale(1); animation-timing-function: var(--ease-breath); }
  100% { transform: rotate(0deg) scale(0.92); }
}

.wind {
  opacity: 0;
  animation: wind var(--breath) infinite;
}
@keyframes wind {
  0%   { stroke-dashoffset: 28; opacity: 0; animation-timing-function: var(--ease-breath); }
  6%   { opacity: 0.85; }
  34%  { opacity: 0.85; }
  40%  { stroke-dashoffset: -100; opacity: 0; animation-timing-function: var(--ease-breath); }
  48%  { opacity: 0.4; }
  92%  { opacity: 0.4; }
  100% { stroke-dashoffset: 28; opacity: 0; }
}

/* Reduce Motion: the pinwheel sits still and the wind stays hidden */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spin, .wind { animation: none; }
}

/* ---------- Definition band ---------- */

.band {
  background: var(--sand);
  color: var(--ink);
}
.band .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 48px;
  padding-bottom: 48px;
}
.band .label {
  color: var(--ink);
  font-size: 14px;
}
.band-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.band-term {
  font-size: clamp(30px, 3.62vw, 52px);
  font-weight: 800;
  letter-spacing: clamp(-1.5px, -0.1vw, -0.75px);
  line-height: 1.05;
}
.band-quote {
  font-size: clamp(19px, 1.67vw, 24px);
  font-style: italic;
}

/* ---------- Sections ---------- */

.section {
  padding-top: 72px;
  padding-bottom: 72px;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* How it works */
.how { background: var(--paper); }
.how .wrap {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.steps {
  display: grid;
  gap: 40px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}
.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 15px;
}
.step .petal { width: 40px; height: 40px; }
.step h3 {
  font-size: clamp(22px, 2.08vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.step p {
  font-size: clamp(17px, 1.32vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Who it's for (Evening colors) */
.who {
  background: var(--ink);
  color: var(--cream);
}
.who .wrap {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.who .label { color: var(--ev-ink-muted); }
.cards {
  display: grid;
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--ev-paper);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.card .label { color: var(--ev-ink-muted); }
.card .petal { width: 36px; height: 36px; }
.card h3 {
  font-size: clamp(26px, 2.36vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
}
.card p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ev-ink-soft);
}
.plan {
  list-style: none;
  margin: 8px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--ev-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ev-ink-soft);
}
.plan li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Your watch + promises */
.watch .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
.watch-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.watch-copy .title { font-size: clamp(34px, 4.17vw, 60px); }
.watch-copy p {
  font-size: clamp(17px, 1.39vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
}
.promises {
  background: var(--ink);
  color: var(--cream);
  border-radius: 28px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.promises .label { color: var(--ev-ink-muted); }
.promises ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.promises li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: clamp(19px, 1.67vw, 24px);
  font-weight: 700;
  line-height: 1.3;
}
.promises li svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}
.promises .fine {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ev-ink-muted);
}

/* Join band */
.join {
  background: var(--terracotta);
  color: var(--ink);
}
.join .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-top: 64px;
  padding-bottom: 64px;
}
.join-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.join-copy p { font-size: clamp(17px, 1.46vw, 21px); }

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

.site-footer {
  background: var(--ink);
  color: var(--ev-ink-muted);
  font-size: 16px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand svg { width: 24px; height: 24px; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer a:hover { color: var(--ev-accent-text); }

/* ---------- Privacy policy page ---------- */

/* Keep the footer at the bottom even when the page is short */
.page-doc {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-doc .doc { flex-grow: 1; }

.doc {
  padding-top: 32px;
  padding-bottom: 80px;
}
.doc-inner {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.doc h1 {
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 800;
  letter-spacing: clamp(-2.5px, -0.17vw, -1.5px);
  line-height: 1;
}
.doc p,
.doc li {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.doc h2 {
  font-size: clamp(22px, 2.08vw, 30px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-top: 16px;
}
.doc ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc li::marker { color: var(--terracotta); }
.doc strong { color: var(--ink); font-weight: 700; }
.doc a:hover { color: var(--accent-text); }

/* Providers table: a normal table on wider screens,
   stacked rows with their own labels on phones */
.providers {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.providers thead { display: none; }
.providers tr {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.providers tr:last-child { border-bottom: 1px solid var(--line); }
.providers td { display: block; }
.providers td::before {
  content: attr(data-label);
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 6px;
}
.providers td:first-child {
  font-weight: 700;
  color: var(--ink);
}
.providers td:first-child::before { display: none; }

@media (min-width: 600px) {
  .providers thead { display: table-header-group; }
  .providers tr { display: table-row; padding: 0; border: 0; }
  .providers td { display: table-cell; }
  .providers td::before { display: none; }
  .providers th,
  .providers td {
    text-align: left;
    vertical-align: top;
    padding: 14px 16px 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .providers th {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-muted);
    border-bottom: 2px solid var(--ink);
  }
}


/* ================================================================
   Larger phones and small tablets (600px and up)
   ================================================================ */
@media (min-width: 600px) {
  :root { --gutter: 32px; }

  .cta {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .card { padding: 32px; }
  .promises { padding: 40px; }

  .site-footer .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .footer-nav {
    flex-direction: row;
    gap: 32px;
  }
}

/* ================================================================
   Tablets (768px and up)
   ================================================================ */
@media (min-width: 768px) {
  :root { --gutter: 48px; }

  .label { font-size: 14px; }

  .site-header { height: 96px; }
  .brand { gap: 14px; }
  .brand svg { width: 36px; height: 36px; }
  .brand span { font-size: 32px; }
  .nav { gap: 32px; }
  .nav .nav-link { display: inline; }
  .nav .btn {
    font-size: 17px;
    padding: 13px 22px;
  }

  .hero { padding-bottom: 56px; }
  .hero-copy { gap: 28px; }
  .stage { max-width: 520px; }

  .band .wrap {
    flex-direction: row;
    align-items: center;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .band .label {
    font-size: 16px;
    flex-shrink: 0;
  }

  .section {
    padding-top: 96px;
    padding-bottom: 96px;
  }
  .section-head { gap: 16px; }
}

/* ================================================================
   Small laptops and landscape tablets (1024px and up)
   ================================================================ */
@media (min-width: 1024px) {
  :root { --gutter: 64px; }

  .nav { gap: 40px; }

  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
  }
  .stage { max-width: 600px; }

  .how .wrap { gap: 56px; }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
  .step { gap: 16px; padding-top: 28px; }
  .step .petal { width: 44px; height: 44px; }

  .who .wrap { gap: 48px; }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  .card { gap: 14px; }
  .card .petal { width: 40px; height: 40px; }
  .card p { font-size: 18px; }
  .plan { margin-top: 10px; }

  .watch .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 80px;
  }
  .watch-copy { gap: 20px; }
  .promises { padding: 44px; gap: 22px; }
  .promises ul { gap: 22px; }
  .promises li { gap: 16px; align-items: center; }
  .promises li svg { width: 26px; height: 26px; margin-top: 0; }
  .promises .fine { margin-top: 8px; }

  .join .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    padding-top: 88px;
    padding-bottom: 88px;
  }
}

/* ================================================================
   Desktop (1280px and up): the approved 1440px design
   ================================================================ */
@media (min-width: 1280px) {
  :root { --gutter: 96px; }

  .site-header { height: 104px; }

  /* Hero fills the design's 860px together with the 104px header */
  .hero-section {
    min-height: 756px;
    display: flex;
    flex-direction: column;
  }
  .hero {
    flex-grow: 1;
    padding-top: 0;
  }

  .band .wrap {
    gap: 64px;
    min-height: 240px;
  }

  .how { padding-top: 115px; padding-bottom: 115px; }
  .who { padding-top: 110px; padding-bottom: 110px; }
  .watch { padding-top: 100px; padding-bottom: 100px; }
  .join .wrap { min-height: 300px; }

  .site-footer .wrap { min-height: 140px; }
}
