/* Honey-Do one-pager.
   Calm flat background, one aligned rectangle of panels, colour carried by
   the panels themselves: honey hero, cream poster, tinted flow stages. */

:root {
  --bg: #ece7db;               /* plain, calm */
  --paper: #fdf8e9;
  --card: #fffefa;
  --ink: #2b2317;
  --ink-soft: #6b5f4a;
  --honey: #f2a11c;
  --honey-deep: #d9820a;
  --blueprint: #1c4587;
  --sage-soft: #e7eed7;
  --honey-soft: #fdeecb;
  --blueprint-soft: #e3ebf8;
  --confetti-soft: #f7efdc;
  --hairline: rgba(66, 51, 26, .14);
  --shadow: 0 12px 28px rgba(60, 50, 30, .14), 0 2px 6px rgba(60, 50, 30, .08);
  --r: 20px;
}

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

html, body { height: 100%; }

body {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.sheet {
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(14px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- layout: one aligned rectangle ---------- */

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 0;
}

.card {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---------- hero: the honey panel ---------- */

.hero {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  background: linear-gradient(135deg, #ffe3a0 0%, #f6b93f 100%);
  padding: clamp(26px, 3vw, 46px);
  min-height: 430px;
}

/* The copy reserves the phone's horizontal footprint (same min() as
   .hero-phone's width, plus its right offset and a gap) so text can never
   run onto the bezel, however narrow the hero gets. */
.hero-copy { max-width: calc(100% - min(330px, 46%) - 40px); position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}

.hero p {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.45;
  color: #5c4514;
}

.appstore {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  text-decoration: none;
  line-height: 1.05;
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 16px rgba(60, 45, 15, .3);
}

.appstore:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(60, 45, 15, .35); }
.appstore svg { width: 22px; height: 26px; }
.appstore small { font-weight: 500; font-size: .62rem; letter-spacing: .04em; }

.fine { margin-top: 10px; font-size: .8rem; line-height: 1.5; color: #6d5420; }

/* ---------- the hero phone ---------- */

/* Static, zoomed in, slightly slanted, anchored bottom-right: only the top
   ~30% of the screen shows (the Honey-Do header + points card); the rest
   bleeds past the card edge and is clipped by the hero's overflow. */
.hero-phone {
  position: absolute;
  top: 200px;
  right: 26px;
  width: min(330px, 46%); /* keep the same min() in .hero-copy's guard */
  transform: rotate(-8deg);
  transform-origin: top right;
}

.phone {
  position: relative;
  border: 7px solid var(--ink);
  border-radius: 34px;
  background: var(--ink);
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(70, 50, 15, .3);
}

.phone img { display: block; width: 100%; border-radius: 26px; }

.notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 13px;
  border-radius: 8px;
  background: var(--ink);
}

/* ---------- poster ---------- */

.poster {
  grid-column: 2;
  grid-row: 1 / 3;
  background: var(--paper);
  display: flex;
}

.poster img { width: 100%; height: 100%; object-fit: contain; padding: 14px 16px; }

/* ---------- flow: four tinted stages ---------- */

.flow {
  grid-column: 1;
  grid-row: 2;
  background: var(--card);
  padding: 14px;
  min-height: 300px;
}

.stages {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  height: 100%;
}

.stages li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  min-height: 0;
}

.stages li:nth-child(1) { background: var(--sage-soft); }
.stages li:nth-child(2) { background: var(--honey-soft); }
.stages li:nth-child(3) { background: var(--blueprint-soft); }
.stages li:nth-child(4) { background: none; border: none; }

.stage-art {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-art img { max-width: 100%; max-height: 100%; }

.stage-caption {
  text-align: center;
  font-size: .85rem;
  font-weight: 800;
}

.stages li:nth-child(1) .stage-caption { color: #55693c; }
.stages li:nth-child(2) .stage-caption { color: var(--honey-deep); }
.stages li:nth-child(3) .stage-caption { color: var(--blueprint); }
.stages li:nth-child(4) .stage-caption { color: #b3542e; }

/* Confetti stage: SVG art + canvas share one box so the pieces land exactly
   on the artwork's floor. Aspect locked to the cropped viewBox (470×400). */
.confetti-box {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 220 / 330;
  margin: auto;
}

.confetti-box .postcard-art,
.confetti-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.confetti-box canvas { pointer-events: none; }

/* ---------- audience: three comic-strip scenarios ---------- */

/* One frameless comic strip (assets/comic-strip.svg): three life stories,
   one punchline balloon each, floating straight on the page background. */
.audience {
  grid-column: 1 / -1;
  grid-row: 3;
  padding: clamp(8px, 1.5vw, 16px) 0 0;
}

.audience-head {
  text-align: center;
  margin-bottom: 14px;
}

.banner {
  display: block;
  margin: 0 auto;
  width: min(100%, 860px);
  height: auto;
}

.panel-art {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- colophon ---------- */

.colophon {
  text-align: center;
  color: var(--ink-soft);
  font-size: .78rem;
}

.colophon a {
  color: inherit;
  text-decoration-color: var(--hairline);
}

.colophon a:hover { color: var(--honey-deep); }

/* ---------- legal pages (privacy.html, terms.html) ---------- */

/* Same sheet, narrowed to reading width: a small honey hero card over one
   prose card, aligned like the main page's rectangle. */
.legal-sheet { max-width: 760px; }

.legal-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-hero {
  background: linear-gradient(135deg, #ffe3a0 0%, #f6b93f 100%);
  padding: clamp(22px, 3vw, 34px) clamp(24px, 3vw, 40px);
}

.legal-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -.02em;
  line-height: 1.05;
}

.legal-meta {
  margin-top: 6px;
  font-size: .85rem;
  font-weight: 700;
  color: #6d5420;
}

.legal-body {
  padding: clamp(24px, 3.5vw, 42px) clamp(24px, 3.5vw, 44px);
  line-height: 1.55;
}

.legal-body .lede {
  font-size: 1.05rem;
  font-weight: 600;
  color: #5c4514;
}

.legal-body h2 {
  margin-top: 26px;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.legal-body p { margin-top: 10px; }

.legal-body ul {
  margin-top: 10px;
  padding-left: 1.2em;
}

.legal-body li { margin-top: 6px; }

.legal-body a {
  color: var(--honey-deep);
  font-weight: 600;
  text-decoration-color: rgba(217, 130, 10, .4);
}

/* ---------- small screens ---------- */

@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .hero, .poster, .flow, .audience { grid-column: 1; grid-row: auto; }
  .poster { min-height: 70vh; }
}

@media (max-width: 640px) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hero-copy { max-width: 100%; }
  .hero-phone { display: none; }
  .hero { min-height: 0; }
}

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