/* Landing page and form. Mobile-first; birthday pages have their own party.css and themes.css. */
:root {
  --bg: #0c0a12;
  --ink: #f7f5fa;
  --muted: #bdb7c9;
  --line: rgba(255,255,255,.14);
  --field: rgba(255,255,255,.06);
  --accent: #ffb547;
  --accent-ink: #1d1405;
  --danger: #ff8a8a;
  --font-d: "Playfair Display", Georgia, serif;
  --font-b: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: none; scroll-behavior: smooth; }
body {
  min-height: 100vh; overflow-x: hidden; color: var(--ink); font-family: var(--font-b); font-size: 17px; line-height: 1.6; background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(1100px, 100%); margin-inline: auto; padding-inline: 20px; }
.narrow { width: min(760px, 100%); }
h1, h2 { font-family: var(--font-d); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(28px, 6.4vw, 42px); }
.lead { color: var(--muted); font-size: clamp(17px, 4.3vw, 20px); max-width: 38em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px;
  border: 1px solid rgba(255,255,255,.24); border-radius: 12px; background: rgba(255,255,255,.06);
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s, opacity .2s;
}
.btn:hover { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.small { min-height: 42px; padding: 8px 14px; font-size: 14.5px; }
.btn.primary { border-color: transparent; color: var(--accent-ink); background: var(--accent); }
.btn.primary:hover { background: #ffc56e; }
.btn.whatsapp { border-color: transparent; color: #06301a; background: #5ee08f; }
.btn.whatsapp:hover { background: #76e8a2; }
.btn.danger { color: var(--danger); border-color: rgba(255,138,138,.4); }
.btn.ghost { border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; width: min(1100px, 100%); min-height: 76px; margin-inline: auto; padding: 14px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 700; font-size: 22px; text-decoration: none; }
.candle { position: relative; display: inline-block; width: 8px; height: 22px; margin-top: 10px; border-radius: 2px; background: repeating-linear-gradient(-45deg, #fff 0 3px, #ff6b4a 3px 6px); }
.candle::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 9px; height: 13px; margin-left: -4.5px; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; background: radial-gradient(ellipse at 50% 75%, #fff, #ffc93c 55%, #ff7b1c); box-shadow: 0 0 12px rgba(255,180,70,.8); }

/* ---------- landing ---------- */
.hero { display: grid; gap: 34px; align-items: center; padding-block: 18px 56px; }
.hero h1 { font-size: clamp(42px, 12vw, 76px); }
.hero h1 em { display: block; font-style: italic; color: var(--accent); }
.hero .lead { margin-top: 16px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.micro { margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.fan { position: relative; height: clamp(300px, 86vw, 430px); }
.fan .thumb { position: absolute; top: 6%; left: 50%; width: 58%; max-width: 250px; height: 86%; margin-left: -29%; border: 5px solid #241f2e; border-radius: 28px; box-shadow: 0 26px 60px -22px #000; }
.fan .thumb:nth-child(1) { transform: translateX(-30%) rotate(-8deg); }
.fan .thumb:nth-child(2) { z-index: 2; transform: translateY(-4%); }
.fan .thumb:nth-child(3) { transform: translateX(30%) rotate(8deg); }
.band { padding-block: 46px; border-top: 1px solid rgba(255,255,255,.08); }
.band .lead { margin-top: 10px; }
.steps ol { display: grid; gap: 22px; margin-top: 24px; list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-family: var(--font-d); font-weight: 700; font-size: 19px; }
.steps b { font-size: 19px; }
.steps span { color: var(--muted); }
.closing { padding-block: 56px 70px; text-align: center; border-top: 1px solid rgba(255,255,255,.08); }
.closing h2 { max-width: 16em; margin: 0 auto 24px; }
.foot { padding: 24px 20px calc(30px + var(--safe-b)); color: var(--muted); font-size: 14px; text-align: center; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- the gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 22px 18px; }
.chip { min-height: 40px; padding: 6px 15px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink); font-size: 14.5px; font-weight: 500; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.designs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.design { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #14111c; transition: border-color .2s, box-shadow .2s; }
.design.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.design .thumb { height: 190px; }
.design-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.design h3 { font-family: var(--font-d); font-size: 22px; line-height: 1.2; }
.design p { flex: 1; color: var(--muted); font-size: 15px; line-height: 1.45; }
.design-actions { display: flex; gap: 8px; margin-top: 8px; }
.design-actions .btn { flex: 1; }

/* Thumbnails: a taste of each design, in its own fonts and colors */
.thumb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; padding: 12px; text-align: center; }
.thumb-icon { font-size: 34px; line-height: 1.2; }
.thumb-script { font-size: 14px; }
.thumb-name { font-size: 44px; line-height: 1.15; }
.thumb-bloom { background: radial-gradient(ellipse at 50% 10%, #4a1030, #120818 75%); }
.thumb-bloom .thumb-script { font-family: "Great Vibes", cursive; font-size: 25px; color: #eef0f4; }
.thumb-bloom .thumb-name { font-family: "Playfair Display", serif; font-style: italic; font-weight: 900; padding-inline: .1em; background: linear-gradient(90deg, #ff6b8b, #ffa36b, #ffe27a, #8ef0b4, #7cc8ff, #a99bff, #ff7ad9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.thumb-arcade { background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px), #05060f; }
.thumb-arcade .thumb-script { font-family: "Press Start 2P", monospace; font-size: 9px; color: #ffe600; }
.thumb-arcade .thumb-name { margin-top: 6px; font-family: "Press Start 2P", monospace; font-size: 24px; line-height: 1.4; color: #39ff14; text-shadow: 3px 3px 0 #0e5c05; }
.thumb-orbit { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 75% 20%, #fff, transparent), radial-gradient(1px 1px at 60% 70%, #fff, transparent), radial-gradient(1px 1px at 30% 80%, #fff, transparent), radial-gradient(ellipse at 70% 10%, #1e2a5a, #03060f 70%); }
.thumb-orbit .thumb-script { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #7cc8ff; }
.thumb-orbit .thumb-name { font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 36px; color: #fff; }
.thumb-stadium { background: repeating-linear-gradient(90deg, #14632f 0 34px, #187539 34px 68px); }
.thumb-stadium .thumb-script { font-family: "Bebas Neue", sans-serif; font-size: 19px; letter-spacing: .08em; color: #fff; }
.thumb-stadium .thumb-name { font-family: "Bebas Neue", sans-serif; font-size: 58px; line-height: 1; color: #ffd166; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.thumb-noir { background: #09090c; outline: 1px solid rgba(232,196,104,.5); outline-offset: -9px; }
.thumb-noir .thumb-script { font-family: "Playfair Display", serif; font-style: italic; font-size: 16px; color: #e8c468; }
.thumb-noir .thumb-name { font-family: "Cinzel", serif; font-weight: 700; font-size: 34px; letter-spacing: .05em; background: linear-gradient(135deg, #fff3c4, #b8862d 60%, #f5dd90); -webkit-background-clip: text; background-clip: text; color: transparent; }
.thumb-party { background: radial-gradient(circle at 15% 20%, #ffe066 0 5px, transparent 6px), radial-gradient(circle at 82% 28%, #7cf0ff 0 6px, transparent 7px), radial-gradient(circle at 26% 80%, #ff7ad9 0 6px, transparent 7px), radial-gradient(circle at 78% 78%, #8cff9e 0 5px, transparent 6px), radial-gradient(circle at 50% 40%, #7c3aed, #2b0a5e 80%); }
.thumb-party .thumb-script { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 16px; color: #ffe066; }
.thumb-party .thumb-name { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 52px; color: #fff; text-shadow: 0 4px 0 #ff3d6e; }

@media (min-width: 820px) {
  .hero { grid-template-columns: 1.1fr .9fr; padding-block: 40px 80px; }
  .steps ol { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- form ---------- */
.create main { padding-block: 6px 150px; }
.create h1 { font-size: clamp(34px, 9vw, 46px); }
.create .lead { margin-top: 6px; }
fieldset { margin-top: 32px; border: 0; min-width: 0; }
legend { display: block; width: 100%; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-family: var(--font-d); font-weight: 700; font-size: 23px; }
#designField .filters { margin-top: 2px; }
/* In the form, designs sit in one swipeable row on phones, so the fields aren't six cards away */
@media (max-width: 659px) {
  #designField .designs { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 80%; grid-template-columns: none; gap: 12px; overflow-x: auto; margin-inline: -20px; padding: 3px 20px 10px; scroll-snap-type: x proximity; scroll-padding-inline: 20px; -webkit-overflow-scrolling: touch; }
  #designField .design { scroll-snap-align: center; }
  #designField .design .thumb { height: 140px; }
}
.field { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; font-weight: 500; }
input[type="text"], input[type="date"], textarea {
  display: block; width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--field);
  color: var(--ink); font: inherit; font-size: 17px; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.42); }
input:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,181,71,.25); }
textarea { resize: vertical; line-height: 1.6; }
.err { margin-top: 6px; color: var(--danger); font-size: 14.5px; }
.help { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.counter { margin-top: 6px; margin-inline-start: auto; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); }
.starters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 14.5px; }
.toggles { display: grid; gap: 8px; }
.toggles label { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); cursor: pointer; }
.toggles input { flex: none; width: 21px; height: 21px; accent-color: var(--accent); }
.more { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; }
.more summary { padding-block: 12px; font-weight: 500; cursor: pointer; }
.more[open] { padding-bottom: 8px; }
.fine { margin-top: 24px; color: var(--muted); font-size: 14.5px; }
.actions {
  position: fixed; z-index: 20; inset-inline: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(transparent, rgba(12,10,18,.97) 28%);
}
.actions .btn { width: 100%; padding-inline: 10px; }
.notice { margin-top: 16px; padding: 12px 16px; border: 1px solid rgba(255,138,138,.45); border-radius: 12px; color: #ffd2d2; }
@media (min-width: 660px) { .actions { position: static; padding: 0; margin-top: 18px; background: none; } .create main { padding-bottom: 60px; } }

/* ---------- pages made on this device ---------- */
.yours { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.yours h2 { font-size: 18px; }
.yours ul { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.yours li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yours li span { min-width: 0; overflow-wrap: anywhere; }

/* ---------- what's included ---------- */
.included .free { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 14px; color: var(--muted); }
.included .free b { color: var(--accent); font-size: clamp(38px, 10vw, 54px); line-height: 1.1; }
.included ul { display: grid; gap: 8px; margin: 16px 0 24px; padding: 0; list-style: none; }
.included li { position: relative; padding-inline-start: 26px; }
.included li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 700; }

/* ---------- footer links ---------- */
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 8px; }
.foot-links a { color: var(--muted); text-underline-offset: 3px; }
.fine a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 659px) { .create .foot { padding-bottom: calc(96px + var(--safe-b)); } }

/* ---------- policy pages ---------- */
.legal { padding-block: 26px 56px; }
.legal h2 { margin-top: 30px; font-size: 21px; }
.legal p, .legal ul { margin-top: 10px; color: var(--muted); }
.legal ul { padding-inline-start: 20px; }
.legal li { margin-top: 6px; }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal .updated { font-size: 14.5px; }

/* ---------- the result ---------- */
#resultView h1 { margin-top: 18px; }
.linkbox { display: flex; gap: 8px; margin-top: 18px; }
.linkbox input { flex: 1; min-width: 0; font-size: 15px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.result-actions .btn { flex: 1 1 150px; }
.manage { margin-top: 36px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); }
.manage h2 { font-size: 21px; }
.manage p { margin-top: 6px; color: var(--muted); font-size: 15px; }
#anotherBtn { display: flex; margin: 22px auto 0; }

/* ---------- preview ---------- */
.preview { position: fixed; inset: 0; z-index: 50; background: #000; }
.preview iframe { display: block; width: 100%; height: 100%; border: 0; }
.preview-close { position: absolute; z-index: 2; left: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); min-height: 42px; padding: 6px 16px; background: rgba(20,17,28,.88); font-size: 14.5px; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(90px + var(--safe-b)); max-width: calc(100% - 32px); padding: 11px 20px; border: 1px solid var(--line); border-radius: 999px; background: rgba(20,17,28,.96); font-weight: 500; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
