/* togetherdo.szigen.com — shared styles. Bump ?v= in index.html, 404.html and src/invite.js on every change
   (Cloudflare lets browsers cache this file for 4 hours).
   Palette from the app: blush paper, surface, wine, rose, ink. Night mode uses the app's deep plum.
   Pages: index.html (landing, body.landing), 404.html and /i/* (body.narrow). */
:root {
  --bg: #F6EDEF;
  --card: #FFFAF6;
  --ink: #592C3D;
  --muted: #856270;
  --primary: #712C46;
  --on-primary: #FFFAF3;
  --accent: #AA4263;
  --powder: #E7AABF;
  --blush: #F3DCE3;
  --ticket: #FFF8EC;
  --line: rgba(89, 44, 61, .14);
  --print: #FFFDFB;
  --shadow: 0 18px 50px rgba(89, 44, 61, .13);
  --serif: Georgia, "Times New Roman", serif;
  --sans: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2F0F2F;
    --card: #3D1A38;
    --ink: #F8E9EE;
    --muted: #D2B3C0;
    --primary: #E7AABF;
    --on-primary: #2F0F2F;
    --accent: #F2B3C8;
    --blush: #4A2143;
    --ticket: #4A2443;
    --line: rgba(248, 233, 238, .16);
    --print: #4A2443;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; text-wrap: balance; }

/* ---------- Brand bar ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 20px/1 var(--serif);
}
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 8px rgba(89, 44, 61, .15); }

/* ---------- Store badges (official artwork; Google's PNG has built-in padding we cancel out) ---------- */
.badges { --bh: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badges a { display: block; line-height: 0; border-radius: 9px; }
.badges a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.badges img { max-width: none; }
.badge-as { display: block; height: var(--bh); width: auto; }
.badge-gp { display: block; height: calc(var(--bh) * 250 / 168); width: auto; margin: calc(var(--bh) * -41 / 168); }

/* ---------- Buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 16px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { display: inline-flex; width: auto; min-height: 40px; padding: 8px 18px; border-radius: 999px; color: var(--accent); font-size: 15px; }

/* ---------- The room picture, framed like a print pinned to the page ---------- */
.print {
  display: block;
  padding: 8px;
  background: var(--print);
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(89, 44, 61, .18);
  transform: rotate(-2.5deg);
}
.print img { display: block; width: 100%; height: auto; border-radius: 17px; }

/* ---------- Narrow pages: invitations and 404 ---------- */
body.narrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
body.narrow .brand { width: 100%; max-width: 460px; margin-bottom: 18px; }
main.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: 30px;
  padding: 30px 24px 26px;
  box-shadow: var(--shadow);
  text-align: center;
}
main.card .print { width: 74%; max-width: 270px; margin: 2px auto 22px; }
main.card h1 { font-size: 30px; line-height: 1.18; margin: 0 0 10px; overflow-wrap: anywhere; }
main.card p { margin: 0 0 14px; }
.small { font-size: 15px; color: var(--muted); }
.actions { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 6px; }
.get-app { margin-top: 18px; }
.get-app .small { margin-bottom: 12px; }
main.card .badges { justify-content: center; --bh: 44px; }
.manual { border-top: 1px dashed var(--line); padding-top: 18px; margin-top: 20px; }
.manual p { margin-bottom: 12px; }
.code {
  display: inline-block;
  font: 600 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(170, 66, 99, .08);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
main.card .until { margin: 18px 0 0; }
body.narrow footer { width: 100%; max-width: 460px; margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
body.narrow footer a { color: var(--muted); }
@media (min-width: 600px) {
  body.narrow { padding-top: 40px; }
  main.card h1 { font-size: 34px; }
}

/* ---------- Landing ---------- */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.landing .top { padding: max(18px, env(safe-area-inset-top)) 0 0; }
.landing .top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing .top nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 18px; }
.landing .top nav a:hover { color: var(--ink); }

.hero { display: grid; gap: 28px; padding-top: 34px; padding-bottom: 30px; }
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(40px, 9vw, 66px); line-height: 1.04; margin: 0 0 18px; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 32em; margin: 0 0 26px; }
.hero .badges { --bh: 52px; }

/* Two real screenshots in phone frames, over a soft blush circle */
.hero-art { position: relative; height: 560px; max-width: 460px; width: 100%; margin: 0 auto; }
.hero-art .blob {
  position: absolute; inset: 8% 0 4% 0; margin: auto; aspect-ratio: 1; max-height: 92%;
  border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--blush), transparent 70%);
}
.phone {
  position: absolute;
  aspect-ratio: 1320 / 2868;
  padding: 8px;
  border-radius: 42px;
  background: #24161C;
  box-shadow: 0 28px 60px rgba(89, 44, 61, .30), inset 0 0 0 1.5px #4A3540;
}
.phone picture, .phone img { display: block; width: 100%; height: 100%; }
.phone img { border-radius: 34px; object-fit: cover; }
.phone.front { width: 240px; left: 50%; top: 0; transform: translateX(-28%) rotate(2deg); z-index: 2; }
.phone.back { width: 215px; left: 50%; top: 64px; transform: translateX(-102%) rotate(-6deg); z-index: 1; filter: saturate(.92); }
.hero-art .heart {
  position: absolute; z-index: 3; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); color: var(--accent);
  box-shadow: 0 10px 24px rgba(89, 44, 61, .22); right: 6%; bottom: 18%;
}
.hero-art .heart svg { width: 26px; height: 26px; }

.section-title { font-size: clamp(30px, 5vw, 40px); line-height: 1.12; margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.features { padding-top: 40px; padding-bottom: 20px; }
.feature-grid { display: grid; gap: 14px; }
.feature {
  background: var(--card);
  border-radius: 24px;
  padding: 22px 22px 20px;
  box-shadow: 0 8px 26px rgba(89, 44, 61, .07);
}
.feature .dot {
  width: 44px; height: 44px; border-radius: 14px; margin-bottom: 14px;
  display: grid; place-items: center; background: rgba(170, 66, 99, .1); color: var(--accent);
}
.feature .dot svg { width: 22px; height: 22px; }
.feature h3 { font-size: 22px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.feature.note { background: var(--ticket); transform: rotate(-1deg); }

.invited { padding-top: 40px; padding-bottom: 10px; }
.invited-card {
  display: grid; gap: 24px; align-items: center;
  background: var(--card); border-radius: 30px; padding: 26px 22px; box-shadow: var(--shadow);
}
.invited-card .print { width: 78%; max-width: 300px; margin: 6px auto 0; }
.invited-card h2 { font-size: 30px; margin: 0 0 10px; }
.invited-card p { margin: 0 0 12px; color: var(--muted); }
.invited-card .code-hint { color: var(--ink); }

.landing footer { padding: 40px 0 max(30px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.landing footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; padding-top: 22px;
  background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 44px) 1px; }
.landing footer a { color: var(--muted); }

@media (min-width: 760px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .invited-card { grid-template-columns: 300px 1fr; padding: 34px 40px; gap: 44px; }
  .invited-card .print { margin: 0; width: 100%; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 30px; padding-top: 56px; padding-bottom: 50px; min-height: 640px; }
  .hero-art { height: 600px; max-width: none; }
  .phone.front { width: 262px; }
  .phone.back { width: 236px; top: 70px; }
}
@media (max-width: 420px) {
  .hero-art { height: 480px; }
  .phone.front { width: 205px; }
  .phone.back { width: 184px; top: 52px; }
  .landing .top nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
