/* Caked by Abbie — styles
   Colour contrast (WCAG 2.2):
   cocoa #3F241C on cream #FFF8EE 13.4:1 · muted #6B4436 on cream 7.9:1, on blush 7.1:1
   rose #9C3350 on cream 6.6:1 · white on rose 7.0:1 · input borders #B4707C 3.6:1 (non-text, 3:1 needed) */

@font-face { font-family: "Great Vibes"; src: url("../fonts/great-vibes.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --cream: #FFF8EE;
  --blush: #FCE8E8;
  --petal: #F6D3D8;
  --card: #FFFFFF;
  --cocoa: #3F241C;
  --muted: #6B4436;
  --rose: #9C3350;
  --rose-dark: #7E2840;
  --line: #B4707C;
  --soft-line: #EBC3C8;
  --error: #A11D2B;

  --script: "Great Vibes", "Brush Script MT", cursive;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px -18px rgba(63, 36, 28, .45);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--rose); text-underline-offset: .18em; }
a:hover { color: var(--rose-dark); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.narrow { max-width: 780px; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--cocoa); color: var(--cream); padding: 12px 18px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--cream); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); letter-spacing: .03em; text-decoration: none;
  border: 2px solid var(--rose); cursor: pointer; transition: background-color .2s, color .2s, transform .2s;
}
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--rose); }
.btn-ghost:hover { background: var(--blush); color: var(--rose-dark); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 238, .96); border-bottom: 1px solid var(--soft-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--cocoa); line-height: 1; }
.brand:hover { color: var(--cocoa); }
.brand-script { font-family: var(--script); font-size: 2.1rem; line-height: 1.05; }
.brand-tag { font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); padding-left: 4px; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px;
  background: transparent; border: 2px solid var(--rose); border-radius: 999px; color: var(--rose);
  font: 600 .95rem var(--sans); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) { display: block; padding: 12px 4px; color: var(--cocoa); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--rose); text-decoration: underline; }

.js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--soft-line); padding: 8px 16px 20px; box-shadow: var(--shadow); }
.js .site-nav.is-open { display: block; }
.site-nav li + li { border-top: 1px solid var(--soft-line); }
.site-nav li:last-child { border-top: 0; padding-top: 12px; }
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 8px; }
html:not(.js) .site-nav ul { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
html:not(.js) .site-nav li + li { border: 0; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .js .site-nav, .site-nav { display: block; position: static; padding: 0; background: none; border: 0; box-shadow: none; }
  .site-nav ul { display: flex; align-items: center; gap: 26px; }
  .site-nav li + li { border: 0; }
  .site-nav li:last-child { padding-top: 0; }
  .site-nav a:not(.btn) { padding: 8px 0; }
}

/* ---------- Shared section bits ---------- */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section-alt { background: var(--blush); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--rose); margin-bottom: .8em; }
.script-accent { font-family: var(--script); font-weight: 400; color: var(--rose); font-size: 1.15em; letter-spacing: 0; }
.section-lead { color: var(--muted); font-size: 1.1rem; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--rose); margin: 0 auto 18px; }
.divider::before, .divider::after { content: ""; width: 64px; height: 1px; background: var(--line); }
.heart { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0; background: linear-gradient(180deg, var(--blush) 0%, var(--cream) 100%); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-title { margin-bottom: .35em; }
.hero-title .line-script { display: block; font-family: var(--script); font-weight: 400; font-size: 1.35em; line-height: 1.1; color: var(--rose); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; }
.hero-points .icon { color: var(--rose); margin-top: .2em; }
.hero-art { justify-self: center; width: min(100%, 420px); }
.hero-art svg { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }

/* ---------- Price menu ---------- */
.menu-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }
.menu-card { background: var(--card); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 28px clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.menu-card h3 { font-family: var(--script); font-weight: 400; font-size: 2.4rem; color: var(--cocoa); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 14px; }
.menu-card h4 { font: 600 .82rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.price-list { margin: 0; }
.price-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; }
.price-row dt { flex: 1 1 auto; display: flex; align-items: baseline; gap: 10px; }
.price-row dt::after { content: ""; flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); min-width: 16px; }
.price-row dd { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--rose); white-space: nowrap; }
.menu-note { text-align: center; color: var(--muted); max-width: 640px; margin: 32px auto 0; font-size: .98rem; }

/* ---------- Flavours (arch cards, like the Instagram menu) ---------- */
.arch-grid { display: grid; gap: 22px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .arch-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .arch-grid { grid-template-columns: repeat(4, 1fr); } }
.arch { background: var(--card); border: 1.5px solid var(--soft-line); border-radius: 200px 200px var(--radius) var(--radius); padding: 56px 22px 30px; text-align: center; }
.arch h3 { font-family: var(--script); font-weight: 400; font-size: 2.2rem; margin-bottom: 14px; }
.arch ul { list-style: none; padding: 0; margin: 0; letter-spacing: .14em; text-transform: uppercase; font-size: .92rem; font-weight: 500; }
.arch li { padding: 3px 0; }
.arch p { color: var(--muted); font-size: .98rem; }

/* ---------- Allergens ---------- */
.allergen { background: var(--card); border: 2px solid var(--rose); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); margin-top: 40px; }
.allergen h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; }
.allergen h3 .icon { color: var(--rose); width: 1em; height: 1em; }
.allergen p:last-child, .allergen ul:last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border-radius: var(--radius); padding: 28px; text-align: center; border: 1px solid var(--soft-line); }
.step-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--petal); color: var(--cocoa); margin-bottom: 14px; }
.step-icon .icon { width: 32px; height: 32px; stroke-width: 1.5; }
.step h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.step p { color: var(--muted); margin: 0; }
.step-details { list-style: none; padding: 0; margin: 8px 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- Instagram banner ---------- */
.insta { display: grid; gap: 24px; align-items: center; background: var(--cocoa); color: var(--cream); border-radius: calc(var(--radius) + 6px); padding: clamp(28px, 5vw, 52px); }
.insta h2 { color: var(--cream); }
.insta p { color: var(--petal); margin-bottom: 0; }
.insta .btn-primary { background: var(--cream); color: var(--cocoa); border-color: var(--cream); }
.insta .btn-primary:hover { background: var(--petal); border-color: var(--petal); color: var(--cocoa); }
.insta :focus-visible { outline-color: var(--petal); }
@media (min-width: 800px) { .insta { grid-template-columns: 1fr auto; } }

/* ---------- Order planner form ---------- */
.order-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .order-grid { grid-template-columns: .8fr 1.2fr; } }
.order-info ul { padding-left: 1.2em; }
.form-card { background: var(--card); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); }
.form-title { margin-bottom: .3em; }
.form-intro { color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.field { margin-bottom: 20px; }
.field-row { display: grid; gap: 0 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: .9em; }
input[type="text"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--cocoa);
  background: #fff; border: 2px solid var(--line); border-radius: 12px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--rose); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-hint { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.field-error { color: var(--error); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.field-error::before { content: "⚠ "; }
.choice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.choice input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--rose); flex: none; }
.choice label { font-weight: 400; margin: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: start; }
.field-check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--rose); }
.field-check label { font-weight: 400; }
.field-check .field-error { grid-column: 1 / -1; }
.error-summary { border: 3px solid var(--error); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; background: #FFF4F4; }
.error-summary h4 { margin: 0 0 8px; font-size: 1.1rem; }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--error); font-weight: 600; }

.result { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--soft-line); }
.result textarea { min-height: 220px; background: var(--cream); font-size: .95rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.result-actions .btn { flex: 1 1 220px; }
.form-status { min-height: 1.6em; font-weight: 600; color: var(--rose-dark); margin: 12px 0 0; }

/* ---------- FAQ ---------- */
.faq details { background: var(--card); border: 1px solid var(--soft-line); border-radius: 14px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 600; position: relative; list-style: none; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--rose); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--cocoa); color: var(--petal); padding: 56px 0 28px; font-size: .98rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--petal); }
.site-footer .brand, .site-footer .brand:hover { color: var(--cream); }
.site-footer .brand-tag { color: var(--petal); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-heading { font-family: var(--sans); font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cream); margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 4px; }
.footer-links a { display: inline-block; padding: 6px 0; }
address { font-style: normal; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid rgba(246, 211, 216, .3); margin-top: 40px; padding-top: 20px; font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* ---------- Legal pages ---------- */
.legal { padding: 48px 0 80px; }
.legal h1 { margin-bottom: .2em; }
.legal h2 { font-size: 1.7rem; margin-top: 1.6em; }
.legal h3 { font-size: 1.3rem; margin-top: 1.2em; }
.legal li { margin-bottom: .35em; }
.updated { color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 20px; font-weight: 600; }
.back-link .icon { transform: rotate(180deg); }
.callout { background: var(--blush); border-left: 5px solid var(--rose); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 24px 0; }
.callout p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--soft-line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--card); font-size: .96rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--soft-line); }
th { background: var(--blush); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

@media print {
  .site-header, .site-footer, .hero-art, .insta, .skip-link { display: none; }
  body { background: #fff; }
}

/* Without JavaScript the planner can't build a message, so hide it (a noscript note explains) */
html:not(.js) .order-form { display: none; }

/* Keep anchored sections clear of the sticky header */
section[id], [id="allergens"] { scroll-margin-top: 84px; }
@media (max-width: 479px) {
  .site-header .brand-tag { display: none; }
  .brand-script { font-size: 1.9rem; }
}

/* ---------- Hero cake: tiers stack up once when the cake comes into view ----------
   Plays once in about 4.8 seconds (under WCAG's 5-second limit, so no pause button is needed).
   Skipped for reduced motion and without JavaScript: those visitors see the finished cake. */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  .cake-art .ca-part { transform-box: fill-box; transform-origin: 50% 100%; animation-fill-mode: both; animation-play-state: paused; }
  .cake-art.is-playing .ca-part { animation-play-state: running; }

  .ca-bg      { animation: ca-fade 0.7s ease-out 0s; }
  .ca-stand   { animation: ca-rise 0.7s cubic-bezier(.2,.8,.3,1.2) 0.14s; }
  .ca-tier1   { animation: ca-drop 0.84s cubic-bezier(.3,1.5,.5,1) 0.63s; }
  .ca-tier2   { animation: ca-drop 0.84s cubic-bezier(.3,1.5,.5,1) 1.4s; }
  .ca-pipe    { transform-origin: 50% 50%; animation: ca-pop 0.49s cubic-bezier(.3,1.6,.5,1); }
  .ca-pipe1   { animation-delay: 2.17s; }
  .ca-pipe2   { animation-delay: 2.38s; }
  .ca-pipe3   { animation-delay: 2.59s; }
  .ca-bow     { transform-origin: 50% 20%; animation: ca-pop 0.49s cubic-bezier(.3,1.8,.5,1); }
  .ca-bow1, .ca-bow4 { animation-delay: 2.87s; }
  .ca-bow2    { animation-delay: 3.01s; }
  .ca-bow3, .ca-bow5 { animation-delay: 3.15s; }
  .ca-cherry  { animation: ca-cherry 0.7s cubic-bezier(.3,1.6,.5,1); }
  .ca-cherry1 { animation-delay: 3.36s; }
  .ca-cherry2 { animation-delay: 3.57s; }
  .ca-cherry3 { animation-delay: 3.78s; }
  .ca-ribbon, .ca-heart { transform-origin: 50% 50%; animation: ca-pop 0.7s ease-out 3.85s; }
  .ca-heart2  { animation-delay: 3.99s; }
  .ca-heart3  { animation-delay: 4.13s; }

  @keyframes ca-fade   { from { opacity: 0; } }
  @keyframes ca-rise   { from { opacity: 0; transform: translateY(24px) scaleX(.6); } }
  @keyframes ca-drop   { 0% { opacity: 0; transform: translateY(-190px); } 40% { opacity: 1; } }
  @keyframes ca-pop    { from { opacity: 0; transform: scale(0); } }
  @keyframes ca-cherry { 0% { opacity: 0; transform: translateY(-60px); } 50% { opacity: 1; } }
}
