/* caketopper.app — standalone landing page, self-contained. */

:root {
  --raspberry: #e04d7a;
  --raspberry-dark: #c53c66;
  --gold: #e8c04a;
  --bg: #fff7fa;
  --surface: #ffffff;
  --text: #33223d;
  --muted: #7c6786;
  --border: #f3deeb;
  --shadow: 0 22px 60px -26px rgba(224, 77, 122, .5);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17101d; --surface: #221829; --text: #f4ecf4;
    --muted: #b6a3bf; --border: #372a41;
    --shadow: 0 22px 60px -28px rgba(0, 0, 0, .85);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.14; margin: 0; }
p { margin: 0 0 1.1rem; }
a { color: var(--raspberry); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; font-size: .98rem; }
.brand img { border-radius: 9px; }
#lang {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: .45rem .9rem; font: inherit; font-size: .9rem; cursor: pointer;
}
#lang:focus-visible { outline: 2px solid var(--raspberry); outline-offset: 2px; }
/* The same language links, present for crawlers and for anyone without
   JavaScript, but visually replaced by the dropdown above. */
.langs-seo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.langwrap { position: relative; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: clamp(2.2rem, 6vw, 4.5rem) 0; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -30% 52% 40% -22%;
  background: radial-gradient(closest-side, rgba(224, 77, 122, .2), transparent);
  pointer-events: none;
}
.grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: center; position: relative; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: 1rem; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.14rem); margin-bottom: 1.6rem; }
.facts { display: flex; gap: 2rem; list-style: none; padding: 0; margin: 0 0 1.8rem; flex-wrap: wrap; }
.facts strong { display: block; font-family: 'Playfair Display', serif; font-size: 1.75rem; line-height: 1.1; }
.facts span { color: var(--muted); font-size: .9rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--raspberry); color: #fff; padding: 1rem 1.8rem;
  border-radius: 999px; font-weight: 700; font-size: 1.02rem;
  box-shadow: var(--shadow); transition: transform .18s ease, background .18s ease;
}
.btn:hover { background: var(--raspberry-dark); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--raspberry); box-shadow: none; border: 1.5px solid var(--border); }
.btn.sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn svg { flex-shrink: 0; }
.note { color: var(--muted); font-size: .9rem; margin: .8rem 0 0; }
.other-head { font-weight: 700; margin-bottom: .25rem; }
.qr-row { display: flex; gap: 1.2rem; align-items: flex-start; }
.qr { background: #fff; padding: 9px; border-radius: 12px; border: 1px solid var(--border); line-height: 0; flex-shrink: 0; }

/* ── Phone + carousel ────────────────────────────────────────────────── */
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.phone {
  width: min(310px, 78vw); aspect-ratio: 9 / 17.4;
  background: var(--text); border-radius: 38px; padding: 10px;
  box-shadow: var(--shadow); position: relative;
}
.phone::after {
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28);
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 29px; overflow: hidden;
  background: var(--surface); position: relative;
}
.carousel { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease;
  display: grid; place-items: center; padding: 14px; background: #fff;
}
.slide.on { opacity: 1; }
.slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; max-width: 300px; }
.dot { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: var(--border); cursor: pointer; }
.dot.on { background: var(--raspberry); width: 20px; border-radius: 4px; }

/* ── Gallery ─────────────────────────────────────────────────────────── */
.gallery { padding: clamp(2rem, 6vw, 4rem) 0; border-top: 1px solid var(--border); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .5rem; }
.sub { color: var(--muted); margin-bottom: 1.6rem; }
/* Category filter. Horizontally scrollable rather than wrapped to six rows —
   24 occasions would otherwise push the designs themselves off the screen. */
.chips {
  display: flex; gap: .5rem; overflow-x: auto; padding: 0 0 1.2rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: .5rem 1rem; font-size: .92rem; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.chip:hover { text-decoration: none; }
.chip:hover { border-color: var(--raspberry); }
.chip i { font-style: normal; font-size: .78rem; color: var(--muted); }
.chip.on { background: var(--raspberry); color: #fff; border-color: var(--raspberry); }
.chip.on i { color: rgba(255,255,255,.75); }

/* One section per occasion, each with its own heading and description, so the
   gallery contributes real indexable text rather than a wall of images. */
.cat { margin: 2.4rem 0 0; scroll-margin-top: 80px; }
.cat h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.cat-line { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.cat-more { color: var(--muted); font-size: .88rem; margin: .8rem 0 0; }

.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 8px; overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform .18s ease, border-color .18s ease;
  display: flex; flex-direction: column; gap: .5rem;
}
.tile:hover { transform: translateY(-3px); border-color: var(--raspberry); text-decoration: none; }
.tile img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: #fff; border-radius: 8px; }
/* The design name is real text, not just alt — it is what someone searching
   "dinosaur cake topper" is looking for. */
.tile span { font-size: .78rem; line-height: 1.3; color: var(--muted); text-align: center; padding: 0 2px 4px; }

/* ── Steps ───────────────────────────────────────────────────────────── */
.steps { padding: clamp(2rem, 6vw, 4rem) 0; border-top: 1px solid var(--border); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; list-style: none; padding: 0; margin: 1.4rem 0 0; }
.step-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem; }
.num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--raspberry); color: #fff; font-weight: 700; font-size: .95rem; margin-bottom: .9rem; }
.step-grid h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step-grid p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ── Print section ───────────────────────────────────────────────────── */
.print { padding: clamp(2rem, 6vw, 4rem) 0; border-top: 1px solid var(--border); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.grid2 img { border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.print p { color: var(--muted); }
.badge {
  display: inline-block; background: color-mix(in srgb, var(--gold) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  color: var(--text); padding: .4rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
}

/* ── Footer + sticky CTA ─────────────────────────────────────────────── */
/* FAQ — <details> so the answers are in the HTML for the FAQPage schema and
   still collapsed for readability. */
.faq { padding: clamp(2rem, 6vw, 4rem) 0; border-top: 1px solid var(--border); }
.qa { border-bottom: 1px solid var(--border); padding: .2rem 0; }
.qa summary {
  cursor: pointer; padding: 1rem 0; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--raspberry); font-size: 1.4rem; line-height: 1; }
.qa[open] summary::after { content: '\2212'; } /* minus sign, escaped so it survives any encoding */
.qa p { color: var(--muted); margin: 0 0 1rem; font-size: .97rem; }

.narrow { max-width: 44rem; }

.foot { border-top: 1px solid var(--border); padding: 1.8rem 0 5.5rem; }
.foot p { margin: 0; color: var(--muted); font-size: .9rem; }
.foot a { color: var(--muted); }

.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  display: none;
}
.stickybar .btn { width: 100%; justify-content: center; }

@media (max-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .phone-wrap { order: -1; }        /* the designs sell it — show them first */
  .step-grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .stickybar { display: block; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .qr-row { flex-direction: column; }
}
