:root {
  color-scheme: light;
  --paper: #fff9f0;
  --wash: #f4e6da;
  --ink: #302131;
  --plum: #5b274b;
  --muted: #655363;
  --rule: #cdb9bc;
  --ivory: #f5eee4;
  --espresso: #30201c;
  --serif: "Playfair Display", Georgia, serif;
  --gutter: clamp(20px, 5vw, 80px);
  font-family: Outfit, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-padding-top: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
main {
  background-image: linear-gradient(155deg, var(--paper) 0%, #f8eae2 45%, #f3e0df 100%);
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; width: 100%; height: auto; }
p, figure, dl, dd { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.12; text-wrap: balance; }
h2 { font-size: clamp(2.25rem, 4.5vw, 4rem); }
h3 { font-size: clamp(1.28rem, 2.2vw, 1.65rem); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }

.wrap { width: min(1200px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 7rem); }
.skip-link { position: fixed; z-index: 2; top: 12px; left: 12px; padding: .75rem; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--rule); background: var(--ivory); }
.site-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 1.5rem; padding-block: .65rem; }
.wordmark { display: block; width: clamp(154px, 17vw, 210px); }
.nav-links { display: flex; flex-wrap: wrap; column-gap: clamp(1.25rem, 3vw, 2.5rem); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: .22em; }

.hero { display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.hero h1 { font-size: clamp(3rem, 6.6vw, 6.45rem); line-height: 1.02; letter-spacing: -.045em; }
.hero h1 em { display: block; color: var(--plum); }
.hero-description { max-width: 32ch; margin-top: 1.25rem; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.25rem; margin-top: 1.6rem; }
.button, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 44px; font-weight: 600; }
.button { padding: .7rem 1.1rem; border: 1px solid transparent; border-radius: 2px; color: var(--paper); background: var(--plum); text-decoration: none; }
.button:hover { background: var(--ink); }
.text-link { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: .25em; }
.text-link:hover { text-decoration-thickness: 2px; }
.lead-time { margin-top: .8rem; color: var(--muted); }
.hero-photo img { aspect-ratio: 1; }
.hero-photo figcaption { padding-top: .6rem; color: var(--muted); font-size: .925rem; }

.dietary { border-top: 1px solid var(--rule); background: rgb(255 249 240 / 65%); }
.dietary-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.25rem, 4vw, 4rem); }
.dietary-details { max-width: 56ch; }
.dietary-details p + p { margin-top: .75rem; }
.dietary-details .text-link { margin-top: .5rem; }

#gallery { border-top: 1px solid var(--rule); }
.section-heading { margin-bottom: clamp(1.5rem, 3.5vw, 3rem); }
.section-heading p { margin-top: .65rem; color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1.25rem, 3vw, 2.5rem); row-gap: 2rem; }
.cake { grid-column: span 3; display: flex; flex-direction: column; align-items: start; padding-bottom: .65rem; border-bottom: 1px solid var(--rule); }
.cake-featured { grid-column: span 8; grid-row: span 2; }
.cake:nth-child(2), .cake:nth-child(3) { grid-column: span 4; }
.cake img { aspect-ratio: 1; margin-bottom: .9rem; }
.cake-featured h3 { font-size: clamp(1.65rem, 3vw, 2.5rem); }
.cake p { margin-top: .4rem; color: var(--muted); }
.cake .past-price { margin-top: .6rem; font-size: .9rem; }
.cake .text-link { margin-top: auto; padding-block: .3rem; }
.cake-featured .text-link { margin-top: 0; }
.gallery-social { margin-top: 1.25rem; }

.pricing { background: var(--wash); border-block: 1px solid var(--rule); }
.pricing-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 5vw, 5rem); }
.pricing-layout .section-heading { margin-bottom: 0; }
.price-list > div { padding-block: 1rem; border-top: 1px solid var(--rule); }
.price-list > div:last-child { border-bottom: 1px solid var(--rule); }
.price-list dt { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; font: 500 clamp(1.28rem, 3vw, 1.8rem)/1.2 var(--serif); }
.price-list dt span { white-space: nowrap; color: var(--plum); font: 600 1.05rem/1.5 Outfit, Arial, sans-serif; }
.price-list dd { margin-top: .5rem; color: var(--muted); }

.order-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem 2.5rem; margin-block: 1.75rem; padding: 0; list-style: none; counter-reset: steps; }
.order-steps li { counter-increment: steps; border-top: 1px solid var(--rule); padding-top: .9rem; }
.order-steps li::before { content: counter(steps); display: block; margin-bottom: .45rem; font: italic 500 1.55rem/1.2 var(--serif); color: var(--plum); }
.order-steps p { margin-top: .55rem; color: var(--muted); }
.site-footer { padding-block: clamp(2rem, 4vw, 3.5rem) 1.5rem; color: var(--paper); background: var(--espresso); }
.footer-logo { width: clamp(175px, 20vw, 240px); margin-bottom: 1.25rem; }
.footer-layout { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1.5rem 2rem; }
.footer-layout p + p { margin-top: 1rem; }
.site-footer a { color: inherit; }
.site-footer :focus-visible { outline-color: var(--paper); }
.copyright { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #927a8b; font-size: .9rem; }

dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--rule); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgb(48 33 49 / 64%); }
.inquiry-panel { position: relative; padding: clamp(1rem, 4vw, 2rem); }
.inquiry-panel h2 { padding-right: 44px; font-size: clamp(1.65rem, 4.8vw, 2.65rem); }
.close-form { position: absolute; top: .75rem; right: .75rem; }
.close-button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--rule); color: var(--plum); background: transparent; font-size: 1.55rem; }
.close-button:hover { background: var(--wash); }
.cake-reference { margin-top: .7rem; color: var(--plum); font-weight: 600; }
.form-note { color: var(--muted); font-size: .95rem; font-weight: 400; }
.inquiry-panel > .form-note { margin-top: .65rem; }
.inquiry-form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.form-options, .allergy-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .75rem; }
.form-field { display: grid; gap: .35rem; min-width: 0; }
.form-field label, legend { font-weight: 600; }
.form-field :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 44px; padding: .45rem .6rem; border: 1px solid #927b89; border-radius: 2px; color: var(--ink); background: #fffdfa; }
.form-field textarea { resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: .55rem .75rem .3rem; border: 1px solid var(--rule); }
.allergy-options label { display: flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; }
.allergy-options input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--plum); }
.form-submit .button { width: 100%; margin-top: .45rem; }

@media (min-width: 1100px) {
  .cake-featured img { aspect-ratio: 9 / 10; object-fit: cover; }
}

@media (max-width: 1099px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cake, .cake:nth-child(2), .cake:nth-child(3) { grid-column: auto; }
  .cake-featured { grid-column: 1 / -1; grid-row: auto; }
  .cake-featured img { max-width: 640px; }
}

@media (max-width: 767px) {
  .hero, .dietary-layout, .pricing-layout, .footer-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 1.5rem; }
  .hero h1 { font-size: clamp(2.75rem, 10vw, 4.5rem); }
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .order-steps { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .form-options { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
}

@media (max-width: 500px) {
  .site-nav { padding-block: .5rem .2rem; }
  .nav-links { width: 100%; }
}
