/* Ms Durian Cakes — brand palette carried over from the original site */
:root {
  --cream: hsl(40, 79%, 96%);
  --brown: hsl(33, 87%, 31%);
  --brown-deep: hsl(33, 87%, 24%);
  --gold: hsl(41, 58%, 52%);
  --sand: hsl(40, 62%, 84%);
  --olive: hsl(79, 19%, 36%);

  --font-heading: "Manrope", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --font-script: "Pinyon Script", "Brush Script MT", cursive;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 1400px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2.2rem); }
h4 { font-size: clamp(1.1rem, 1.6vw, 1.45rem); }
p { margin: 0 0 1em; }

/* Script accents (the original site renders <em> in headings with a script face) */
h1 em, h2 em, h3 em, .script {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.theme-brown { background: var(--brown); color: var(--cream); }
.theme-brown a { color: var(--cream); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.15rem 2.6rem;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s;
}
.btn:hover { background: var(--brown-deep); transform: translateY(-2px); }
.theme-brown .btn:hover { background: var(--cream); color: var(--brown); }

.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 1.5px solid currentColor;
  padding: 0.7rem 1.4rem;
  font-size: 0.8rem;
}
.btn-outline:hover { background: var(--brown); color: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(620px, 100svh, 1000px);
  display: flex;
  overflow: hidden;
  isolation: isolate;
}
.hero-media,
.hero-media video,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsla(33, 87%, 18%, 0.55) 0%, hsla(33, 87%, 22%, 0.35) 45%, hsla(33, 87%, 16%, 0.7) 100%);
  z-index: -1;
}
.hero .wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(3rem, 8vh, 6rem);
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
}
.hero-logo { width: clamp(180px, 22vw, 300px); margin: 0 auto clamp(2rem, 6vh, 4rem); }
.hero h1 { text-align: center; font-weight: 700; max-width: 18ch; margin: 0 auto 0.3em; }
.hero .script { display: block; text-align: center; font-size: clamp(2.6rem, 5vw, 4.5rem); color: var(--sand); line-height: 1; }
.hero-summary {
  align-self: flex-end;
  max-width: 34rem;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  margin: clamp(3rem, 10vh, 8rem) 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--gold);
}

/* ---------- Story ---------- */
.story { padding: clamp(4rem, 10vw, 8rem) 0; }
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.story-video {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 999px 999px 24px 24px;
  overflow: hidden;
  background: var(--brown-deep);
  position: sticky;
  top: 2rem;
}
.story-video video { width: 100%; height: 100%; object-fit: cover; }
.story-title { margin-bottom: 1.5rem; }
.story-title .script { display: block; font-size: clamp(3rem, 5.5vw, 5.4rem); color: var(--sand); line-height: 0.9; }
.story-title .with { font-family: var(--font-script); font-size: clamp(1.6rem, 2.4vw, 2.4rem); color: var(--sand); margin-left: 0.4em; }
.story-title h2 { font-weight: 700; margin-top: 0.2em; }
.story-copy h3 { font-weight: 700; margin-top: 2rem; color: var(--sand); font-size: clamp(1.2rem, 1.6vw, 1.45rem); } /* >=19px bold = WCAG large text */
.story-copy strong { color: #fff; }
.story-copy .btn { margin-top: 1.5rem; }

.story-side { position: sticky; top: 2rem; display: grid; gap: 1.25rem; justify-items: center; }
.reveal { position: relative; width: 100%; }
.reveal img { width: 100%; }
.reveal .reveal-top {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s;
}
.reveal:hover .reveal-top,
.reveal:focus-within .reveal-top,
.reveal.is-revealed .reveal-top { opacity: 1; transition: opacity 2.5s; }
.reveal button {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: none; border: 0; cursor: pointer;
}
.reveal-hint { font-size: 0.85rem; text-align: center; opacity: 0.85; margin: 0; }
.badge-40 { width: 70%; }

/* ---------- Guide ---------- */
.guide { padding: clamp(3rem, 8vw, 6rem) 0; }
.guide hr { border: 0; border-top: 1px solid currentColor; opacity: 0.4; margin: 0 0 clamp(2rem, 5vw, 4rem); }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: clamp(1.5rem, 5vw, 5rem); }
.guide h2 { font-weight: 700; }
.guide ol { counter-reset: q; list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.9rem; }
.guide li {
  counter-increment: q;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid hsla(33, 87%, 31%, 0.15);
}
.guide li::before {
  content: counter(q, decimal-leading-zero);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold);
}

/* ---------- Catalogue ---------- */
.catalogue { padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem); overflow: hidden; position: relative; }
.catalogue-backdrop {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.8rem, 10.5vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--sand);
  margin: 0;
  user-select: none;
}
.reel { position: relative; margin-top: clamp(-5rem, -6vw, -2rem); }
.reel-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 1rem calc(50% - min(17rem, 38vw));
}
.reel-track::-webkit-scrollbar { display: none; }
.reel-item {
  flex: 0 0 min(34rem, 76vw);
  scroll-snap-align: center;
  text-align: center;
  text-decoration: none;
  color: var(--brown);
}
.reel-item figure {
  margin: 0;
  transform: scale(0.55);
  opacity: 0.55;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.reel-item.is-active figure { transform: scale(1); opacity: 1; }
.reel-item img { width: 100%; aspect-ratio: 708 / 820; object-fit: contain; }
.reel-item figcaption { padding-top: 1rem; }
.reel-item figcaption strong { display: block; font-family: var(--font-heading); font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.2; margin-bottom: 0.4rem; }
.reel-item figcaption span { display: block; max-width: 26rem; margin: 0 auto; }
.reel-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.reel-btn {
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--brown);
  background: transparent;
  color: var(--brown);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.reel-btn:hover { background: var(--brown); color: var(--cream); }

/* ---------- Details ---------- */
.details { padding: clamp(3rem, 8vw, 6rem) 0; }
.details-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}
.details-intro { grid-column: 7 / 13; grid-row: 1; }
.details-intro h2 { font-weight: 700; }
.details-writing { grid-column: 1 / 7; grid-row: 1 / 3; }
.details-writing img, .details-delivery img { border-radius: 20px; }
.details-knife { grid-column: 7 / 10; grid-row: 2; }
.details-knife-copy { grid-column: 10 / 13; grid-row: 2; }
.details-gift { grid-column: 1 / 6; grid-row: 3; }
.details-delivery { grid-column: 6 / 10; grid-row: 3 / 5; }
.details-delivery-copy { grid-column: 10 / 13; grid-row: 4; }
.details h2 { font-size: clamp(1.6rem, 2.6vw, 2.5rem); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--brown);
  color: var(--sand);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0.04em;
  padding: 0.9rem 0;
}
.marquee-inner { display: inline-flex; animation: marquee 28s linear infinite; }
.marquee-inner span { padding-right: 1.5em; }
.marquee.reverse .marquee-inner { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq { padding: clamp(3rem, 8vw, 6rem) 0; }
.faq h2 { text-align: center; font-size: clamp(3rem, 6vw, 5.5rem); margin-bottom: 2.5rem; }
.faq-list { max-width: 60rem; margin: 0 auto; }
.faq details {
  background: var(--sand);
  border-radius: 18px;
  margin-bottom: 1rem;
  padding: 0 clamp(1.25rem, 3vw, 2rem);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}
.faq summary h3 { font: inherit; letter-spacing: inherit; margin: 0; color: var(--brown-deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.8rem; line-height: 1; transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1.4rem; }
.faq a { color: var(--brown-deep); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(3rem, 6vw, 4.5rem) 0; border-top: 1px solid hsla(33, 87%, 31%, 0.2); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; text-align: center; }
.footer-grid h2 { font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.8rem); margin-bottom: 0.6rem; }
.footer-grid p { margin: 0 0 0.25rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.wa-link { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }
.wa-link img { width: 34px; height: 34px; }
.footer-copy { text-align: center; font-size: 0.8rem; color: var(--brown-deep); margin-top: 2.5rem; }

/* ---------- Product page ---------- */
.product { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 7vw, 5rem); }
.product-top { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.product-photo { position: sticky; top: 2rem; }
.product-photo img { width: 100%; }
.product-illustration { width: auto; max-height: 130px; margin-bottom: 1rem; }
.product h1 { font-weight: 700; }
.product-tagline { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--gold); }
.product-copy p { max-width: 38rem; }
.product-copy .note { font-size: 0.9rem; font-style: italic; opacity: 0.85; }
.product-copy .btn { margin-top: 1.25rem; }

.product-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid hsla(33, 87%, 31%, 0.2);
}
.product-nav a { text-decoration: none; display: grid; gap: 0.2rem; }
.product-nav a:last-child { text-align: right; }
.product-nav small { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--brown-deep); }
.product-nav span { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.3rem); }
.product-nav a:hover span { color: var(--gold); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.notfound h1 em { font-size: 1.3em; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .story-side { grid-column: 1 / -1; position: static; grid-template-columns: 1fr 1fr; align-items: center; }
  .story-side .reveal-hint { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 767px) {
  .hero-summary { align-self: stretch; }
  .story-grid { grid-template-columns: 1fr; }
  .story-video { position: static; max-width: 22rem; margin: 0 auto; width: 100%; }
  .story-side { grid-template-columns: 1fr; }
  .reveal-hint { display: none; }
  .badge-40 { width: 55%; }
  .guide-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .details-grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .details-knife img { max-width: 60%; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .product-photo { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-inner { animation: none; }
  .reel-item figure, .reveal .reveal-top { transition: none; }
}

/* ---- SEO/AEO additions (Oct 2026) ---- */
.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; }
.lead { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.5; }
.hero-summary { font-weight: 500; letter-spacing: -0.02em; }
.guide .lead { font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; font-size: clamp(1.1rem, 1.6vw, 1.45rem); margin: 0 0 0.6em; }
.glance { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.glance h2 { font-weight: 700; margin-bottom: 0.6em; }
.glance h3 { font-weight: 700; margin-top: 2rem; font-size: clamp(1.2rem, 2vw, 1.6rem); }
.glance-facts, .glance-cakes { max-width: 60rem; padding-left: 1.2rem; }
.glance-facts li, .glance-cakes li { margin-bottom: 0.45rem; }
.glance a, .more-cakes a, .breadcrumb a, .product-copy a:not(.btn) { color: var(--brown-deep); font-weight: 700; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1rem; font-size: 0.85rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; opacity: 0.8; }
.product h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; margin-top: 1.8rem; margin-bottom: 0.6rem; }
.product .answer { font-size: 1.05rem; line-height: 1.6; }
.facts { border-collapse: collapse; width: 100%; max-width: 38rem; font-size: 0.95rem; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem; border-bottom: 1px solid hsla(33, 87%, 31%, 0.18); }
.facts th { width: 8.5rem; font-family: var(--font-heading); font-weight: 700; }
.more-cakes { margin-top: clamp(2.5rem, 6vw, 4rem); }
.more-cakes h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 700; }
.more-cakes ul { padding-left: 1.2rem; columns: 2 18rem; column-gap: 2rem; }
.more-cakes li { margin-bottom: 0.5rem; break-inside: avoid; }
.more-cakes li span { display: block; font-size: 0.9rem; color: var(--brown-deep); }

/* ---------- FAQ page and cake FAQs ---------- */
.faq-more { text-align: center; margin-top: 2rem; }
.faq-page { padding: clamp(2rem, 5vw, 4rem) 0; }
.faq-page .wrap { max-width: 60rem; }
.faq-page h1 { font-weight: 700; }
.faq-toc ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.5rem 0 2.5rem; }
.faq-toc a, .faq-entry a, .cake-faq a { color: var(--brown-deep); font-weight: 700; }
.faq-group { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.faq-group h2 { font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.4rem); border-bottom: 1px solid hsla(33, 87%, 31%, 0.3); padding-bottom: 0.4rem; }
.faq-entry { margin: 1.6rem 0; scroll-margin-top: 1rem; }
.faq-entry h3, .cake-faq h3 { font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 700; color: var(--brown-deep); margin-bottom: 0.4rem; }
.faq-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.cake-faq { margin-top: clamp(2.5rem, 6vw, 4rem); max-width: 50rem; }
.cake-faq h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 700; }
