/* Petal website. Colors come from the app (Sources/PetalUI/Theme.swift). */

@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-style: italic; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito.woff2") format("woff2"); font-style: normal; font-weight: 200 1000; font-display: swap; }

/* Registered so the whole page can glide from day to evening. */
@property --ground  { syntax: "<color>"; inherits: true; initial-value: #FAF3F0; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #FFFAF8; }
@property --ink     { syntax: "<color>"; inherits: true; initial-value: #4E2D3D; }
@property --muted   { syntax: "<color>"; inherits: true; initial-value: #6B4858; }
@property --rim     { syntax: "<color>"; inherits: true; initial-value: #EBD3DA; }

:root {
  --ground: #FAF3F0;
  --surface: #FFFAF8;
  --ink: #4E2D3D;
  --muted: #6B4858;
  --rim: #EBD3DA;
  --rose: #D893A4;
  --peach: #E5A38F;
  --lilac: #D8BFCE;
  --honey: #CE8127;
  --deep: #9A4F66;
  --on-blossom: #3A1F2C;
  --blossom: linear-gradient(135deg, #D893A4, #E5A38F);
  --ring: #B5637A;

  --serif: "Fraunces", "New York", "Iowan Old Style", Georgia, serif;
  --soft: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;

  --pad: clamp(20px, 4vw, 48px);
  --sec: clamp(92px, 12vw, 176px);
  --ease: cubic-bezier(.22, .8, .24, 1);

  transition: --ground 1.4s ease, --surface 1.4s ease, --ink 1.4s ease, --muted 1.4s ease, --rim 1.4s ease;
  color-scheme: light;
}
:root.eve {
  --ground: #21111C;
  --surface: #301B2A;
  --ink: #FBECE7;
  --muted: #DFC2CD;
  --rim: #543247;
  --ring: #F1B7C2;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 500 1.0625rem/1.55 var(--soft);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* The page's light: a peach, rose and lilac mesh by day, rose and violet glows by evening. */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transition: opacity 1.4s ease; }
body::before {
  background:
    radial-gradient(70% 60% at 100% 0%, #F7D3C4 0%, transparent 68%),
    radial-gradient(65% 65% at 0% 100%, #E1C5D6 0%, transparent 70%),
    radial-gradient(62% 58% at 100% 100%, #EBBAC7 0%, transparent 72%),
    linear-gradient(165deg, #FDF8F5 0%, #F9E9E4 45%, #F0D2D6 100%);
}
body::after {
  opacity: 0;
  background:
    radial-gradient(60% 50% at 88% 8%, rgba(216, 147, 164, .34) 0%, transparent 70%),
    radial-gradient(55% 55% at 6% 92%, rgba(134, 92, 160, .36) 0%, transparent 72%),
    radial-gradient(50% 45% at 60% 110%, rgba(229, 163, 143, .22) 0%, transparent 70%),
    #21111C;
}
.eve body::before { opacity: 0; }
.eve body::after { opacity: 1; }

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, .display {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 380;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
h1 { font-size: clamp(3.1rem, 1.3rem + 8.4vw, 8.4rem); line-height: .96; }
h2, .display { font-size: clamp(2.3rem, 1.3rem + 3.9vw, 4.5rem); }
h3 { font: 750 1.2rem/1.25 var(--soft); letter-spacing: -0.01em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.2rem, 1.08rem + .55vw, 1.45rem); line-height: 1.4; font-weight: 550; }

.wrap { width: min(100%, 1180px + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.sec { padding-block: var(--sec); position: relative; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 50; background: var(--surface); padding: 12px 18px; border-radius: 999px; }
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 30px; border: 0; border-radius: 999px;
  background: var(--blossom); color: var(--on-blossom);
  font: 750 1.0625rem/1 var(--soft); text-decoration: none; cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(204, 118, 140, .95), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(204, 118, 140, 1), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn:active { transform: translateY(0); filter: brightness(.97); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: .95rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }

/* Nav */
.nav {
  position: fixed; z-index: 20; top: 14px; left: 50%; translate: -50% 0;
  width: min(100% - 28px, 880px);
  display: flex; align-items: center; gap: 8px;
  padding: 7px 7px 7px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--rim) 80%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: italic 420 1.5rem/1 var(--serif); letter-spacing: -0.02em; margin-right: auto; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 10px 13px; border-radius: 999px; text-decoration: none; font-size: .95rem; font-weight: 650; color: var(--muted); }
.nav-links a:hover { color: var(--ink); background: color-mix(in srgb, var(--rose) 16%, transparent); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* 1. Hero */
.hero { height: 360vh; height: 360svh; position: relative; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; left: 50%; width: min(100% - 2 * var(--pad), 940px); text-align: center; translate: -50% 0; will-change: opacity, transform; }
.hero-copy--1 { top: 46%; translate: -50% -50%; }
.hero-copy--1::before {
  content: ""; position: absolute; inset: -18% -12%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 246, 243, .96) 30%, rgba(253, 246, 243, .7) 62%, transparent);
}
.hero-copy--1 .lead { max-width: 30ch; margin: 22px auto 30px; color: var(--muted); }
.hero-hint { margin-top: 26px; font-size: .95rem; font-weight: 650; color: var(--deep); }
.hero-hint::after { content: ""; display: block; width: 2px; height: 30px; margin: 10px auto 0; border-radius: 2px; background: linear-gradient(var(--rose), transparent); animation: hint 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0%, 100% { transform: scaleY(.35); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
.hero-copy--2, .hero-copy--3 { top: clamp(92px, 13svh, 130px); opacity: 0; }
.hero-copy--3 .lead { max-width: 40ch; margin: 14px auto 0; color: var(--muted); }
.hero-labels { position: absolute; inset: 0 auto auto 0; opacity: 0; }
.hero-labels li { position: absolute; translate: -50% 0; text-align: center; white-space: nowrap; font-size: .95rem; line-height: 1.3; }
.hero-labels b { display: block; font-weight: 750; }
.hero-labels span { color: var(--muted); font-size: .875rem; }

/* Reduce Motion: no pinning; the sorted result is shown as a still. */
.hero--still { height: auto; }
.hero--still .hero-stage { position: relative; min-height: 720px; }
.hero--still .hero-copy--1 { top: clamp(92px, 12svh, 120px); translate: -50% 0; }
.hero--still .hero-copy--1 h1 { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.6rem); }
.hero--still .hero-copy--1 .lead { margin: 12px auto 18px; max-width: 46ch; font-size: 1.1rem; }
.hero--still .hero-copy--1::before, .hero--still .hero-hint, .hero--still .hero-copy--2, .hero--still .hero-copy--3 { display: none; }
.hero--still .hero-labels { opacity: 1; }

/* Two-column sections */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 44px); align-items: center; row-gap: 44px; }
.split-text { grid-column: 1 / span 5; }
.split-text h2 + p { margin-top: 26px; }
.split-text p + p { margin-top: 14px; }
.split-text > p:not(.lead) { color: var(--muted); max-width: 46ch; }
.split > .window, .split > .reel-stage { grid-column: 6 / -1; }
.split--flip .split-text { grid-column: 8 / -1; grid-row: 1; }
.split--flip > .reel-stage { grid-column: 1 / span 7; grid-row: 1; }
.style .split-text { grid-column: 8 / -1; grid-row: 1; }
.style .split > .window { grid-column: 1 / span 7; grid-row: 1; }
@media (max-width: 900px) {
  .split-text, .split > .window, .split > .reel-stage, .split--flip .split-text, .split--flip > .reel-stage, .style .split-text, .style .split > .window { grid-column: 1 / -1; grid-row: auto; }
  .style .split-text, .split--flip .split-text { order: -1; }
}

.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 44px); row-gap: 20px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { grid-column: 1 / span 7; }
.sec-head p { grid-column: 9 / -1; color: var(--muted); }
@media (max-width: 900px) { .sec-head h2, .sec-head p { grid-column: 1 / -1; } .sec-head p { max-width: 52ch; } }

/* App window with a real screenshot */
.window {
  border-radius: clamp(14px, 1.8vw, 24px); overflow: hidden; background: var(--surface);
  border: 1px solid rgba(216, 191, 206, .9);
  box-shadow: 0 50px 90px -40px rgba(154, 79, 102, .55), 0 18px 36px -22px rgba(154, 79, 102, .35);
}
.window-bar { display: flex; gap: 7px; padding: 12px 14px; background: linear-gradient(#FFF7F4, #FBEDE9); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--rose); }
.window-bar i:nth-child(2) { background: var(--peach); }
.window-bar i:nth-child(3) { background: var(--lilac); }
@media (min-width: 901px) {
  /* The screenshots run off the edge of the page, like an open window too big for the desk. */
  .window--right { width: calc(100% + 16vw); }
  .window--left { width: calc(100% + 16vw); margin-left: -16vw; }
}

/* 3. Dream up */
.ask { display: grid; gap: 14px; max-width: 860px; }
.ask-box {
  display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 24px 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rim);
  box-shadow: 0 24px 50px -30px rgba(154, 79, 102, .6);
}
.ask-line { font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); font-weight: 600; min-width: 0; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; background: var(--deep); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.spin { width: 30px; height: 30px; flex: none; }
.is-thinking .spin { animation: turn 1.6s linear infinite; }
@keyframes turn { to { rotate: 360deg; } }

.ask-tries, .reel-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-tries button, .reel-ideas button {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink);
  border: 1px solid var(--rim); font: 600 .95rem/1.1 var(--soft);
  transition: background .25s, border-color .25s, color .25s;
}
.ask-tries button:hover, .reel-ideas button:hover { border-color: var(--rose); }
.ask-tries button[aria-pressed="true"], .reel-ideas button[aria-pressed="true"] { background: var(--blossom); color: var(--on-blossom); border-color: transparent; }
.ask-reading { min-height: 1.6em; color: var(--muted); font-weight: 600; }
.ask-reading b { color: var(--ink); font-weight: 750; }
.ask-reading i { font-style: normal; display: inline-block; margin: 0 6px 6px 0; padding: 3px 12px; border-radius: 999px; background: linear-gradient(120deg, #FBE2D8, #F5D0D8); color: #4E2D3D; font-size: .92rem; }

.wall { position: relative; margin-top: 26px; }
.wall .tile { position: absolute; left: 0; top: 0; transition: transform 1s var(--ease), opacity .7s ease, filter .7s ease; will-change: transform; }
.wall.is-setting .tile { transition: none; }
.wall canvas { display: block; width: 100%; height: 100%; border-radius: 20%/16%; }
.wall .tile.is-dim { opacity: .26; filter: saturate(.7); }
.wall .tile.is-hit canvas { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--rose), 0 22px 34px -16px rgba(154, 79, 102, .8); }
.note { margin-top: 18px; font-size: .9rem; color: var(--muted); }

/* 4. Reel */
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); max-width: 620px; }
.frame { position: relative; transition: transform 1.1s var(--ease), opacity .8s ease; }
.frame canvas { display: block; width: 100%; height: auto; border-radius: 13%/7.5%; box-shadow: 0 34px 50px -30px rgba(154, 79, 102, .8); }
.frame-over { position: absolute; inset: auto 9% 9% 9%; color: #FFFAF8; font: italic 420 clamp(.82rem, .5rem + 1.3vw, 1.3rem)/1.12 var(--serif); text-shadow: 0 1px 14px rgba(78, 45, 61, .55); text-wrap: balance; }
.frame-label { margin-top: 12px; font-weight: 750; font-size: .98rem; }
.frame-label span { display: block; font-weight: 550; color: var(--muted); font-size: .88rem; }
.frames.is-stacked .frame { opacity: 0; }
.frames.is-stacked .frame:nth-child(1) { transform: translateX(104%) rotate(-7deg) scale(.86); }
.frames.is-stacked .frame:nth-child(2) { transform: rotate(3deg) scale(.86); }
.frames.is-stacked .frame:nth-child(3) { transform: translateX(-104%) rotate(8deg) scale(.86); }
.frame:nth-child(2) { transition-delay: .12s; }
.frame:nth-child(3) { transition-delay: .24s; }
.reel-out { max-width: 620px; margin-top: 28px; min-height: 7.5em; }
.reel-caption { font: italic 400 clamp(1.25rem, 1.05rem + .9vw, 1.7rem)/1.25 var(--serif); font-variation-settings: "SOFT" 100; }
.reel-extras { white-space: pre-wrap; margin-top: 12px; color: var(--muted); font-weight: 600; font-size: .95rem; opacity: 0; transition: opacity .8s ease; }
.reel-extras.is-on { opacity: 1; }
.reel-ideas { margin-top: 26px; }

/* 5. Style */
.connect-title { margin-top: 30px !important; font-weight: 750; color: var(--ink) !important; }
.connect { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.connect li { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rim); font-weight: 700; font-size: .98rem; }
.connect svg { width: 22px; height: 22px; color: var(--deep); }

/* 6. Evening */
.home { padding-block: calc(var(--sec) * 1.25); }
.home-title { font-size: clamp(3rem, 1.4rem + 7vw, 7.4rem); line-height: .96; text-align: center; }
.home-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(48px, 7vw, 96px); }
.home-points p { margin-top: 10px; color: var(--muted); }
@media (max-width: 800px) { .home-points { grid-template-columns: 1fr; max-width: 46ch; margin-inline: auto; } }

/* 7. Steps: a real sequence, so it is numbered. */
.steps-list { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(40px, 6vw, 72px); }
.steps-list li { counter-increment: step; }
.steps-list li::before {
  content: counter(step); display: block; margin-bottom: 14px;
  font: italic 380 clamp(4rem, 3rem + 4vw, 6.5rem)/.9 var(--serif);
  background: var(--blossom); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.steps-list p { margin-top: 10px; color: var(--muted); }
.needs { margin-top: clamp(36px, 5vw, 60px); color: var(--muted); font-weight: 600; }
@media (max-width: 800px) { .steps-list { grid-template-columns: 1fr; max-width: 46ch; } }

/* 8. Price */
.ways { display: grid; grid-template-columns: 1fr 1fr; border-radius: clamp(24px, 3vw, 40px); background: var(--surface); border: 1px solid var(--rim); box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .7); }
.way { padding: clamp(26px, 4vw, 52px); }
.way + .way { border-left: 1px solid var(--rim); }
.way-mark { width: 40px; height: 40px; margin-bottom: 20px; }
.way h3 { font: italic 400 clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem)/1.05 var(--serif); letter-spacing: -0.02em; }
.way p { margin-top: 14px; color: var(--muted); max-width: 42ch; }
.way .way-sum { margin-top: 26px; color: var(--ink); font-weight: 750; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } .way + .way { border-left: 0; border-top: 1px solid var(--rim); } }

/* 9. Waitlist */
.waitlist { text-align: center; padding-bottom: calc(var(--sec) * .8); }
.waitlist h2 { font-size: clamp(2.8rem, 1.4rem + 6vw, 6.4rem); }
.waitlist .lead { margin: 20px auto 0; max-width: 34ch; color: var(--muted); }
.join { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 36px; transition: opacity .5s ease, transform .5s ease; }
.join input {
  flex: 1 1 260px; max-width: 380px; min-height: 56px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--rim); background: var(--surface); color: var(--ink); font: 600 1.0625rem var(--soft);
}
.join input::placeholder { color: var(--muted); }
.join .spin { display: none; width: 24px; height: 24px; }
.join.is-thinking .spin { display: block; }
.join.is-done { opacity: 0; transform: scale(.96); pointer-events: none; height: 0; margin: 0; overflow: hidden; }
.join-note { margin-top: 16px; font-size: .9rem; color: var(--muted); }
.join-note a { text-underline-offset: 3px; }
.join-msg { min-height: 1.6em; margin-top: 18px; font-weight: 650; }
.bloom { height: 0; opacity: 0; }
.bloom svg { width: 120px; height: 120px; transform: scale(.2) rotate(-90deg); transition: transform 1.4s var(--ease); filter: drop-shadow(0 20px 40px rgba(216, 147, 164, .6)); }
.bloom.is-on { height: auto; opacity: 1; margin-top: 30px; transition: opacity .8s ease; }
.bloom.is-on svg { transform: none; }

/* Footer */
.foot { padding-block: 34px 44px; border-top: 1px solid color-mix(in srgb, var(--rim) 70%, transparent); font-size: .95rem; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; justify-content: space-between; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot nav { display: flex; gap: 4px; }
.foot nav a { padding: 10px 12px; border-radius: 999px; }

/* Petals fall over everything, and never get in the way. */
.petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; }

/* Legal pages: Impressum, privacy, terms, delete (written by tools/legal.py) */
.page { padding-block: 150px var(--sec); max-width: 760px; }
.page h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.4rem); margin-bottom: 10px; }
.page .updated { color: var(--muted); font-size: .92rem; margin-bottom: 26px; }
.page .lead { margin: 18px 0 28px; }
.page section { margin: 16px 0; padding: 22px 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--rim); }
.page h2 { font: 750 1.2rem/1.3 var(--soft); letter-spacing: 0; margin: 0 0 8px; }
.page p, .page li { color: var(--muted); }
.page p + p { margin-top: 10px; }
.page ul { list-style: disc; padding-left: 1.2em; margin: 8px 0; }
.page li { margin: 4px 0; }
.page a { color: var(--deep); text-underline-offset: 3px; }
.page .note { font-size: .95rem; }
.foot nav { flex-wrap: wrap; }
.foot nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root, body::before, body::after { transition: none; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
