/* Cyklea website. A slanted band in the colours of the app icon (powder, raspberry, wine, a touch of lime) behind
   a large headline and a phone with the real app, then soft raised cards on a plain background. System font,
   light (pink, wine text) and dark (wine). */
:root {
  color-scheme: light dark;
  --bg: #fbeef3;
  --surface: #fff;
  --text: #4a0e0e;
  --secondary: #7a4550;
  --line: rgba(74, 14, 14, 0.1);
  --raised: 0 1px 2px rgba(74, 14, 14, 0.05), 0 12px 32px -8px rgba(74, 14, 14, 0.16);
  --phone-shadow: 0 50px 100px -20px rgba(74, 14, 14, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.35);
  /* The app's markers: period raspberry, ovulation lime. The other two tint the feature symbols. */
  --red: #b3264f;
  --pink: #d9507c;
  --purple: #7a1730;
  --blue: #e9f9a1;
  --green: #f27ba5;
  --ink: #4a0e0e;
  /* Navigation and text that sit on the colour band */
  --nav: #4a0e0e;
  --on-band: rgba(74, 14, 14, 0.85);
  /* Raspberry for text: 5.6:1 on the pink background. */
  --accent-text: #b3264f;
  --link: #b3264f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2c0c0d;
    --surface: #451516;
    --text: #fbe3ec;
    --secondary: #d9a9b5;
    --line: rgba(255, 255, 255, 0.08);
    --raised: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 40px -12px rgba(0, 0, 0, 0.7);
    --phone-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
    --red: #f27ba5;
    --pink: #f5b7d0;
    --purple: #b3264f;
    --blue: #e9f9a1;
    --green: #f27ba5;
    /* The band stays light pink in dark mode too, so what sits on it stays wine. */
    --nav: #4a0e0e;
    --on-band: rgba(74, 14, 14, 0.85);
    --accent-text: #e9f9a1;
    --link: #f5b7d0;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside running text are underlined, so they do not rely on colour alone. */
p a, li a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
p a:hover, li a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Slanted colour band ---------- */

.band {
  position: absolute;
  inset: 0 0 auto 0;
  /* Tall and shallow enough that the whole lead and the button row sit on the band: off it, their wine text would
     fall on the wine page in dark mode. */
  height: 800px;
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
  background:
    radial-gradient(60% 80% at 8% 20%, #fde6ef 0%, transparent 60%),
    radial-gradient(50% 70% at 45% 10%, #f9cadc 0%, transparent 65%),
    radial-gradient(45% 70% at 85% 0%, #f27ba5 0%, transparent 60%),
    radial-gradient(65% 70% at 30% 90%, #e9f9a1 0%, transparent 62%),
    radial-gradient(40% 50% at 75% 40%, #e9f9a1 0%, transparent 70%),
    linear-gradient(120deg, #fbd5e4, #f5b7d0 55%, #f27ba5);
}

/* A light sheen across the band, like the light streak in the app's glass. */
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 62%);
}

.band.short { height: 380px; clip-path: polygon(0 0, 100% 0, 100% 55%, 0 100%); }

/* ---------- Navigation ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
  color: var(--nav);
  font-weight: 600;
  font-size: 16px;
}

.nav a { color: var(--nav); }
.nav .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.nav .brand img { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18)); }
.nav .spacer { flex: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.pill.light { background: #e9f9a1; color: #4a0e0e; }
.pill.dark { background: #e9f9a1; color: #4a0e0e; box-shadow: 0 0 0 1px rgba(74, 14, 14, 0.12), 0 10px 24px -8px rgba(74, 14, 14, 0.4); }
.pill.light:hover, .pill.dark:hover { text-decoration: none; filter: brightness(1.05); }
.pill .chev { font-weight: 700; }

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

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 32px;
  padding-top: 56px;
  min-height: 720px;
}

.tag {
  display: inline-flex;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e9f9a1;
  color: #4a0e0e;
  font-size: 14px;
  font-weight: 600;
}

.tag span + span::before { content: "·"; margin-right: 8px; opacity: 0.8; }

h1 {
  margin: 28px 0 0;
  font-size: clamp(48px, 7.6vw, 88px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
  /* Plain wine on the pink band, like the app's light look. */
  color: var(--ink);
}

.hero .lead {
  max-width: 27em;
  margin: 32px 0 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--on-band);
  font-weight: 500;
}

.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .actions .note { color: var(--on-band); font-size: 15px; font-weight: 500; }

/* ---------- Phone ---------- */

.phone {
  position: relative;
  width: 300px;
  padding: 10px;
  border-radius: 54px;
  background: linear-gradient(145deg, #2a2a30, #0d0d10);
  box-shadow: var(--phone-shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}

.phone picture { display: block; }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 1206 / 2622; border-radius: 44px; }

/* Dynamic Island */
.phone::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 50%;
  width: 31%;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  z-index: 1;
}

.hero .device { position: relative; justify-self: center; margin-top: 8px; }
.hero .device .phone { transform: rotate(-2deg); }

/* A floating card beside the phone, like the dashboard panel next to a checkout. */
.float {
  position: absolute;
  left: -96px;
  bottom: 90px;
  width: 220px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--raised);
  font-size: 14px;
}

.float .k { color: var(--secondary); }
.float .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.float .row { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--secondary); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.red { background: var(--red); }
.dot.ring { border: 1.5px solid var(--red); }
.dot.blue { background: var(--blue); box-shadow: inset 0 0 0 1px var(--ink); }
.dot.fertile { background: color-mix(in srgb, var(--blue) 70%, transparent); }

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

section { padding: 56px 0; }

.eyebrow { color: var(--accent-text); font-weight: 700; font-size: 15px; margin: 0 0 8px; }

h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-lead { color: var(--secondary); font-size: 19px; max-width: 34em; margin: 0; }

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.grid4 .card { padding: 24px; }
.grid4 .card h3 { font-size: 18px; }

.why {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.big-stat { font-size: clamp(44px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 8px 0 12px; }

.card {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--raised);
}

.card h3 { margin: 18px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--secondary); }
.card p + p { margin-top: 10px; }

.sym {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
}

.sym svg { width: 22px; height: 22px; }
.sym.red { background: linear-gradient(135deg, #d9507c, #b3264f); }
/* Light symbols carry wine marks, as on the app's light markers. */
.sym.blue { background: linear-gradient(135deg, #f6fdd3, #e9f9a1); color: #4a0e0e; }
.sym.green { background: linear-gradient(135deg, #f9cadc, #f27ba5); color: #4a0e0e; }
.sym.purple { background: linear-gradient(135deg, #8e1d3c, #4a0e0e); }

/* Light and dark side by side */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.duo .phones { display: flex; justify-content: center; align-items: flex-start; gap: 24px; }
.duo .phones .phone { width: 240px; }
.duo .phones .phone:last-child { margin-top: 64px; }

.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: center; }
.checks li::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9f9a1;
  color: #4a0e0e;
  font-size: 13px;
  font-weight: 800;
}

.notice { display: flex; gap: 14px; align-items: flex-start; }
.notice svg { flex: none; width: 26px; height: 26px; color: var(--red); }
.notice p { color: var(--text); font-weight: 500; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Appearance switch in the design section */
.theme-demo { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.theme-demo .phone { width: 280px; }

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 -14px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

.switch-label svg { width: 16px; height: 16px; }

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 2px var(--pink), 0 6px 16px -6px rgba(179, 38, 79, 0.45);
}

.segmented button:hover:not([aria-pressed="true"]) {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.segmented button:active { transform: scale(0.97); }

@media (prefers-reduced-motion: no-preference) {
  .segmented button { transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease; }
}

.swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128, 128, 140, 0.45); }
.swatch.light { background: linear-gradient(135deg, #fbeef3, #f5b7d0); }
.swatch.dark { background: #541819; }

.stack { position: relative; }
.stack img { opacity: 0; }
.stack img + img { position: absolute; inset: 0; }
.stack img.on { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .stack img { transition: opacity 0.35s ease; }
}

@media (max-width: 520px) {
  .theme-demo .phone { width: 240px; }
  .segmented button { padding: 8px 12px; gap: 6px; font-size: 15px; }
  .swatch { width: 14px; height: 14px; }
}

/* ---------- Frequently asked questions ---------- */

.faq { display: grid; gap: 12px; max-width: 820px; margin-top: 32px; }
.faq .card { padding: 0; border-radius: 20px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 650;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent-text); font-size: 24px; font-weight: 500; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 24px 22px; }

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

.policy-head { padding-top: 64px; padding-bottom: 48px; color: var(--ink); }
.policy-head h1 { color: var(--ink); font-size: clamp(40px, 6vw, 64px); }
.policy-head .meta { margin: 16px 0 0; color: var(--ink); opacity: 0.7; font-weight: 600; }

.policy { max-width: 760px; display: grid; gap: 16px; padding-bottom: 24px; }
.policy .card h2 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 8px; font-weight: 700; }
.policy .card p, .policy .card li { color: var(--text); }
.policy ul { margin: 10px 0 0; padding-left: 20px; }
.policy li + li { margin-top: 6px; }
.policy ul + p { margin-top: 10px; }

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

footer {
  margin-top: 24px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--secondary);
  font-size: 14px;
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer .brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
footer .brand img { width: 24px; height: 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer .copy { margin-left: auto; }

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; }
  .hero .device { margin-top: 24px; }
  .float { left: auto; right: -12px; bottom: 40px; width: 180px; }
  .grid3, .split, .duo, .why { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .band { height: 640px; }
  .nav .hide-narrow { display: none; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .phone { width: 260px; }
  .duo .phones .phone { width: 46vw; max-width: 220px; border-radius: 40px; padding: 7px; }
  .duo .phones .phone img { border-radius: 33px; }
  .duo .phones .phone::before { top: 14px; height: 18px; }
  .duo .phones { gap: 12px; }
  .float { display: none; }
  .grid4 { grid-template-columns: 1fr; }
  footer .copy { margin-left: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .device .phone { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px) rotate(-2deg); } }
}

/* Dark mode: the band stays the light pink of the app icon, a touch deeper on the right so it meets the wine page. */
@media (prefers-color-scheme: dark) {
  .band {
    background:
      radial-gradient(60% 80% at 8% 20%, #fde6ef 0%, transparent 60%),
      radial-gradient(50% 70% at 45% 10%, #f9cadc 0%, transparent 65%),
      radial-gradient(45% 70% at 85% 0%, #f27ba5 0%, transparent 60%),
      radial-gradient(65% 70% at 30% 90%, #e9f9a1 0%, transparent 62%),
      radial-gradient(40% 50% at 75% 40%, #e9f9a1 0%, transparent 70%),
      linear-gradient(120deg, #fbd5e4, #f5b7d0 50%, #e5608f);
  }
}
