/* Flora's Cakes. Phone first; wider layouts from 760px and 1040px.
   Colour rules (WCAG 2.2 AA, measured): plum text on cream 15.8:1, white on purple 5.4:1,
   plum on orange 6.2:1. Orange never sits on purple or cream without a plum outline. */

:root {
  --cream: #fff6ec;
  --white: #ffffff;
  --plum: #2a1238;
  --plum-soft: #5e4a6b;
  --purple: #8a44d6;
  --purple-deep: #5b22a3;
  --orange: #eb810a;
  --lilac: #f1e8fd;
  --line: #e7ddf1;
  --display: "Shrikhand", Georgia, serif;
  --text: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --press: 0 5px 0 var(--plum);
  --radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
a { color: var(--purple-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, .chip:focus-within {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}
.hero a:focus-visible, .visit a:focus-visible, .site-footer a:focus-visible { outline-color: var(--white); }
h1, h2, h3 { margin: 0; }
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  color: var(--purple-deep);
}
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: var(--plum); color: var(--white); font-weight: 700;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px;
  border: 2px solid var(--plum); border-radius: 999px;
  font: 700 17px/1.2 var(--text); text-decoration: none; cursor: pointer;
  box-shadow: var(--press);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:active { transform: translateY(5px); box-shadow: none; }
.btn-orange { background: var(--orange); color: var(--plum); }
.btn-purple { background: var(--purple-deep); color: var(--white); }
.btn-cream { background: var(--cream); color: var(--plum); }
.btn-white { background: var(--white); color: var(--plum); }
.btn-sm { min-height: 46px; padding: 0 18px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 2px solid var(--plum); border-radius: 999px;
  background: var(--white); color: var(--plum);
}
.icon-btn svg { width: 20px; height: 20px; }
.link-light {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.link-light svg { width: 18px; height: 18px; }

/* Header */
.site-header { background: var(--cream); border-bottom: 2px solid var(--plum); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum); }
.brand-mark { width: 46px; height: 46px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--display); font-size: 24px; line-height: 1.1; color: var(--purple-deep); }
.brand-tag { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--plum-soft); }
.header-nav { display: none; gap: 28px; font-weight: 600; }
.header-nav a { color: var(--plum); text-decoration: none; }
.header-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.hide-sm { display: none; }

/* Hero */
.hero { background: var(--purple); color: var(--white); border-bottom: 2px solid var(--plum); overflow: hidden; }
.hero-inner { display: grid; gap: 36px; padding: 32px 0 48px; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border: 2px solid var(--plum); border-radius: 999px; background: var(--cream); color: var(--plum);
  font-size: 15px; font-weight: 700;
}
.tag svg { width: 17px; height: 17px; }
.tag-lilac { background: var(--lilac); }
h1 { display: flex; flex-direction: column; gap: 8px; }
.eyebrow { font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.display {
  font-family: var(--display); font-weight: 400; color: var(--cream);
  font-size: clamp(50px, 13vw, 92px); line-height: .98;
}
.lede { margin: 0; max-width: 34ch; font-size: 19px; line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; font-size: 16px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { width: 18px; height: 18px; }

.hero-art { position: relative; aspect-ratio: 1 / 0.92; width: 100%; max-width: 560px; justify-self: center; }
.pola {
  position: absolute; margin: 0; padding: 8px 8px 30px;
  background: var(--white); border: 2px solid var(--plum); border-radius: 10px;
  box-shadow: 0 6px 0 var(--plum);
}
.pola img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.pola-main { left: 4%; top: 2%; width: 52%; height: 88%; transform: rotate(-4deg); z-index: 2; }
.pola-top { right: 2%; top: 0; width: 42%; height: 46%; transform: rotate(5deg); z-index: 1; }
.pola-low { right: 8%; bottom: 2%; width: 40%; height: 44%; transform: rotate(-3deg); z-index: 3; }
.badge { position: absolute; left: -2%; bottom: -2%; width: 30%; height: auto; z-index: 4; animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Marquee */
.marquee { overflow: hidden; background: var(--plum); color: var(--cream); padding: 14px 0 12px; }
.marquee-track {
  display: flex; width: max-content; gap: 32px;
  font-family: var(--display); font-size: 30px; line-height: 1.35; white-space: nowrap;
  animation: marquee 38s linear infinite;
}
.marquee .star { color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 64px 0 72px; }
.section-lilac { background: var(--lilac); border-block: 2px solid var(--plum); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.section-head p { margin: 0; max-width: 46ch; font-size: 18px; color: var(--plum-soft); }

/* What we bake */
.bento { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 2px solid var(--plum); border-radius: var(--radius); box-shadow: var(--press);
}
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 2px solid var(--plum); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex-grow: 1; }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--purple-deep); }
.card p { margin: 0; color: var(--plum-soft); }
.card-link {
  margin-top: auto; padding-top: 8px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  font-weight: 700; color: var(--plum); text-decoration: underline; text-underline-offset: 4px;
}
.card-link svg { width: 16px; height: 16px; }

.card-wide { grid-column: span 2; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.thumb {
  display: block; width: 100%; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 2px solid var(--plum); border-radius: 16px; background: var(--white);
}
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s ease; }
.thumb:hover img { transform: scale(1.05); }
.gallery-more { display: flex; justify-content: center; margin-top: 28px; }

/* Planner */
.planner { display: grid; gap: 20px; }
.planner-form {
  display: flex; flex-direction: column; gap: 22px; padding: 22px;
  background: var(--white); border: 2px solid var(--plum); border-radius: var(--radius); box-shadow: var(--press);
}
fieldset { margin: 0; padding: 0; border: 0; }
legend, .field label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 18px;
  border: 2px solid var(--plum); border-radius: 999px; background: var(--white); font-weight: 700;
}
.chip input:checked + span { background: var(--plum); color: var(--cream); }
.chip input:checked + span::before { content: "✓"; font-weight: 700; }
.field-row { display: grid; gap: 16px; }
.field input {
  width: 100%; height: 52px; padding: 0 14px;
  border: 2px solid var(--plum-soft); border-radius: 14px; background: var(--white);
  font: 600 17px var(--text); color: var(--plum);
}
.field input::placeholder { color: #8b7c95; font-weight: 500; }
.planner-preview { display: flex; flex-direction: column; gap: 16px; }
.bubble {
  padding: 22px; background: var(--lilac); border: 2px solid var(--plum); border-radius: 24px 24px 24px 6px;
}
.bubble h3 { margin-bottom: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple-deep); }
.bubble p { margin: 0; font-size: 18px; line-height: 1.55; white-space: pre-line; }
.small { margin: 0; text-align: center; font-size: 15px; color: var(--plum-soft); }
.small a { color: var(--plum); font-weight: 700; }

/* Visit */
.visit { background: var(--purple-deep); color: var(--white); padding: 56px 0 64px; border-top: 2px solid var(--plum); }
.visit h2 { color: var(--cream); margin-bottom: 18px; }
.visit-inner { display: grid; gap: 28px; align-items: center; }
.visit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 19px; font-weight: 600; }
.visit-list li { display: flex; align-items: center; gap: 12px; }
.visit-list svg { width: 22px; height: 22px; flex-shrink: 0; }
.visit-list a { color: var(--white); }
.visit-actions { display: flex; flex-direction: column; gap: 14px; }
.visit-actions .link-light { align-self: center; margin-top: 4px; }

/* Footer */
.site-footer { background: var(--plum); color: var(--cream); padding: 44px 0 120px; }
.footer-inner { display: flex; flex-direction: column; gap: 24px; }
.brand-footer .brand-name { color: var(--cream); }
.brand-footer .brand-tag { color: #d9c2fa; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }
.footer-nav a { color: var(--cream); }
.footer-bottom {
  display: flex; flex-direction: column; gap: 6px; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgba(255, 246, 236, .25); font-size: 14px;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--orange); font-weight: 700; }

/* Phone quick bar */
.mobile-bar {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 20;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; padding: 8px;
  background: var(--cream); border: 2px solid var(--plum); border-radius: 999px; box-shadow: var(--press);
}
.mobile-bar { grid-template-columns: auto 1fr; }
/* The free-tier "Hosted on MakeMySiteLive" badge is fixed to the bottom edge;
   lift the quick bar above it while the badge is on the page. */
body:has(#site-footer-badge) .mobile-bar { bottom: 54px; }
body:has(#site-footer-badge) .site-footer { padding-bottom: 170px; }
.mobile-bar .btn { min-height: 48px; padding: 0 16px; font-size: 15px; white-space: nowrap; box-shadow: none; }

/* Lightbox */
.lightbox { max-width: min(92vw, 1000px); max-height: 92vh; padding: 0; border: 2px solid var(--plum); border-radius: 20px; background: var(--white); }
.lightbox::backdrop { background: rgba(42, 18, 56, .82); }
.lightbox img { max-height: calc(92vh - 4px); width: auto; margin: 0 auto; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 2px solid var(--plum); border-radius: 999px; background: var(--white); color: var(--plum); cursor: pointer;
}
.lightbox-close svg { width: 20px; height: 20px; }

/* Phones only */
@media (max-width: 759px) {
  .header-actions { display: none; }
  .brand-tag { display: none; }
  .brand-name { font-size: 22px; white-space: nowrap; }
  .brand-mark { width: 40px; height: 40px; }
  .header-inner { min-height: 64px; }
  .tag { font-size: 14px; padding: 6px 12px; }
  .hero-inner { gap: 18px; padding: 24px 0 40px; }
  .hero-copy { display: contents; }
  .tags { order: 1; }
  h1 { order: 2; }
  .hero-art { order: 3; aspect-ratio: 1 / 0.8; max-width: 380px; margin: 8px 0 12px; }
  .lede { order: 4; font-size: 17px; }
  .cta-row { order: 5; }
  .facts { order: 6; flex-direction: column; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card-big { grid-column: span 2; }
  .card:not(.card-big) img { aspect-ratio: 1; }
  .card:not(.card-big) .card-body { padding: 12px 14px 14px; }
  .card:not(.card-big) h3 { font-size: 19px; }
  .card:not(.card-big) p { font-size: 14px; line-height: 1.45; }
  .card:not(.card-big) .card-link { font-size: 14px; white-space: nowrap; }
  .card:not(.card-big) .card-link svg { display: none; }
  .card.card-wide img { aspect-ratio: 16 / 9; }
  .card-wide h3 { font-size: 22px; }
  .section { padding: 52px 0 60px; }
}

/* Tablet and up */
@media (min-width: 760px) {
  body { font-size: 18px; }
  .hide-sm { display: inline; }
  .section { padding: 96px 0 104px; }
  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 44px; }
  .section-head p { margin-bottom: 8px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-big { grid-column: span 2; }
  .card-wide { flex-direction: row; }
  .card.card-wide img { width: 50%; aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 2px solid var(--plum); }
  .card-wide .card-body { justify-content: center; padding: 28px; }
  .card-wide .card-link { margin-top: 10px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .planner-form { padding: 30px; }
  .visit-inner { grid-template-columns: 1.3fr 1fr; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .site-footer { padding-bottom: 48px; }
  .mobile-bar { display: none; }
  .marquee-track { font-size: 40px; }
}

/* Desktop */
@media (min-width: 1040px) {
  .header-nav { display: flex; }
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 48px; padding: 72px 0 96px; }
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; }
  .card-big { grid-column: 1; grid-row: span 2; }
  .card-big img { aspect-ratio: auto; flex: 1 1 0; min-height: 0; height: auto; }
  .card-big .card-body { flex-grow: 0; }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .planner { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px; align-items: start; }
  .planner-preview { position: sticky; top: 24px; }
  .visit { padding: 80px 0 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge, .marquee-track { animation: none; }
  .btn, .thumb img { transition: none; }
}
