:root {
  color-scheme: light;
  --paper: #fff8f0;
  --cream: #fffdf8;
  --ink: #362320;
  --soft: #674a43;
  --berry: #792c49;
  --line: #dfc6bd;
  --display: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 3rem, 74rem); margin-inline: auto; }
.skip-link { position: absolute; top: .5rem; left: .5rem; transform: translateY(-150%); z-index: 1; }
.skip-link:focus { transform: none; background: var(--cream); padding: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .6rem; font: bold 1.26rem var(--display); text-decoration: none; }
.brand img { border-radius: 50%; flex: none; }
.header nav { display: flex; align-items: center; gap: clamp(.75rem, 2.8vw, 2rem); font-size: .92rem; }
.header nav a { text-decoration: none; }
.header nav a:hover, .text-link:hover { text-decoration: underline; }
.basket-button { color: var(--berry); background: none; border: 1px solid var(--line); border-radius: 100px; padding: .5rem .8rem; min-height: 44px; white-space: nowrap; }
.basket-button span { display: inline-grid; place-items: center; margin-inline-start: .15rem; min-width: 1.4rem; height: 1.4rem; padding: 0 .25rem; border-radius: 50%; color: white; background: var(--berry); font-size: .75rem; }

.hero { display: grid; grid-template-columns: .95fr 1.05fr; min-height: 31rem; padding-bottom: 2.25rem; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(2rem, 5vw, 4.5rem); background: #f8e3df; border-radius: 1.35rem 0 0 1.35rem; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; }
h1 { margin-block: .7rem 1rem; font-size: clamp(3.65rem, 7.2vw, 5.9rem); line-height: .92; letter-spacing: -.075em; }
h1 em { color: var(--berry); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.04; letter-spacing: -.045em; }
h3 { font-size: clamp(1.65rem, 2.5vw, 2rem); letter-spacing: -.035em; }
.hero-copy > p { max-width: 24rem; color: var(--soft); font-size: 1.05rem; margin: 0 0 1.45rem; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.hero-photo { position: relative; min-height: 100%; margin: 0; overflow: hidden; border-radius: 0 1.35rem 1.35rem 0; background: #ead6b4; }
.hero-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
.hero-photo figcaption { position: absolute; right: .8rem; bottom: .8rem; border-radius: 100px; padding: .42rem .7rem; background: var(--cream); color: var(--soft); font-size: .76rem; }

.button { display: inline-flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 48px; border: 1px solid var(--berry); background: var(--berry); color: white; border-radius: 100px; padding: .65rem 1.12rem; font-size: .89rem; font-weight: 700; text-decoration: none; }
.button:hover { background: #63223b; }
.enquiry-button { justify-content: center; }
.button-outline { justify-content: center; background: transparent; color: var(--berry); }
.button-outline:hover { color: white; }
.menu { background: var(--cream); padding: 2.55rem 0 3rem; border-block: 1px solid #f0ded2; }
.section-title { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; column-gap: 1rem; margin-bottom: 1.35rem; }
.section-title p { margin: .45rem 0 0; font-size: .9rem; color: var(--soft); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; }
.product { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; }
.plain { background: #fff5df; }
.decorative { background: #f5e5e7; }
.personalised { background: #e8eddf; }
.product-example { position: relative; overflow: hidden; aspect-ratio: 8 / 5; }
.product-example img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.plain .product-example img { object-position: center 68%; }
.decorative .product-example img { top: 0; right: 0; width: 207%; height: auto; max-width: none; transform: translateY(-41%); }
.personalised .product-example img { object-position: center 44%; }
.product-copy { display: flex; flex: 1; flex-direction: column; padding: clamp(1rem, 2vw, 1.55rem); }
.product-copy > p { color: var(--soft); min-height: 3rem; margin: .65rem 0 0; line-height: 1.5; }
.product dl { flex: 1; margin: .65rem 0 1.1rem; }
.product dl div, .subtotal { display: flex; gap: .6rem; justify-content: space-between; padding: .52rem 0; border-bottom: 1px solid var(--line); }
.product dd { margin: 0; font-weight: 750; }
.allergen-note { margin: 1.1rem 0 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--soft); font-size: .9rem; line-height: 1.5; }
.allergen-note p { margin: 0; }
.allergen-note details { margin-top: .35rem; }
.allergen-note summary { width: fit-content; cursor: pointer; font-weight: 700; color: var(--berry); }
.allergen-note details p { margin-top: .45rem; }
.allergen-note dl { margin-bottom: 0; }
.allergen-note dl > div + div { margin-top: .5rem; }
.allergen-note dt { font-weight: 700; }
.allergen-note dd { margin: 0; }
.allergen-note a, .notice a { color: var(--berry); text-underline-offset: .15em; }
.cakes { padding: clamp(1.5rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--line); }
.cake-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.cake-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--cream); }
.cake-card-photo { position: relative; min-height: 13rem; background: #f8e3df; }
.cake-card-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.cake-card-body { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; padding: clamp(.75rem, 2.8vw, 1.5rem); }
.cake-card h3 { font-size: clamp(1.45rem, 2.15vw, 1.9rem); }
.cake-card p { margin: .35rem 0 .75rem; color: var(--soft); line-height: 1.4; }
.cake-card .button { min-height: 44px; }
.cake-examples { margin-top: .65rem; }
.cake-examples summary { width: fit-content; padding: .7rem 0; color: var(--berry); cursor: pointer; font-weight: 700; }
.cake-example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.cake-example-grid figure { margin: 0; }
.cake-example-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .6rem; }
.cake-example-grid figcaption { margin: .3rem 0 0; color: var(--soft); font-size: .85rem; }
.collection { display: grid; grid-template-columns: .65fr 1fr; align-items: center; gap: clamp(1.5rem, 6vw, 5rem); padding: clamp(2rem, 5vw, 4.5rem) 0; }
.collection img { width: 100%; height: clamp(14rem, 28vw, 22rem); object-fit: cover; object-position: 50% 55%; border-radius: 1.3rem; }
.collection p { max-width: 30rem; color: var(--soft); line-height: 1.55; }
.text-link { color: var(--berry); text-underline-offset: .2em; font-weight: 700; }
.footer { border-top: 1px solid var(--line); color: var(--soft); font-size: .85rem; }
.footer > div { display: flex; flex-wrap: wrap; justify-content: space-between; padding-block: 1.1rem; gap: .5rem 1.5rem; }

dialog { width: min(100% - 1.5rem, 31rem); max-height: calc(100% - 1.5rem); overflow: auto; padding: clamp(1rem, 3vw, 1.65rem); border: 1px solid var(--line); border-radius: 1.25rem; background: var(--cream); color: var(--ink); }
dialog::backdrop { background: #362320a8; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.dialog-heading h2 { font-size: clamp(1.9rem, 6vw, 2.65rem); }
.close { background: none; color: var(--berry); border: 1px solid var(--line); border-radius: 50%; flex: none; width: 44px; height: 44px; font-size: 1.55rem; line-height: 1; }
form > label, fieldset { display: block; margin-block: .9rem; }
form input[type='text'], form input[type='email'], form select, form textarea { display: block; width: 100%; color: var(--ink); background: white; border: 1px solid #a1837a; border-radius: .5rem; padding: .6rem; margin-top: .28rem; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: .55rem; padding: .4rem .55rem .65rem; }
#sponge-options label { display: inline-flex; align-items: center; min-height: 42px; margin-right: .6rem; }
#sponge-options input { accent-color: var(--berry); }
.cake-fields > label { display: block; margin-bottom: .6rem; }
#cake-email-hint { display: block; margin-top: .4rem; }
#cake-send-error { padding: .65rem; border: 1px solid var(--berry); border-radius: .5rem; color: var(--berry); }
.cake-receipt { padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper); }
.cake-receipt p { line-height: 1.5; overflow-wrap: anywhere; }
.cake-receipt .full { justify-content: center; }
#box-submit:disabled { cursor: wait; opacity: .72; }
.optional, .notice { color: var(--soft); font-size: .875rem; }
.full { width: 100%; margin-top: .55rem; }
.photo-field { margin-block: .9rem; }
.photo-control { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; cursor: pointer; }
.photo-control:focus-within .photo-select { outline: 3px solid var(--berry); outline-offset: 3px; }
.photo-control:hover .photo-select { color: white; background: var(--berry); }
.photo-select { min-height: 44px; padding-block: .4rem; }
.photo-field .notice { margin: .4rem 0 0; }
#photo-status:empty { display: none; }
.photo-list { display: grid; gap: .4rem; margin: .55rem 0 0; padding: 0; list-style: none; }
.photo-list li { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: .5rem; }
.photo-list img { flex: none; width: 2.5rem; height: 2.5rem; border-radius: .3rem; object-fit: cover; }
.photo-list span { flex: 1; min-width: 0; font-size: .85rem; overflow-wrap: anywhere; }
.photo-list .remove { min-height: 44px; font-size: .85rem; }
.basket-items { margin: 0; padding: 0; list-style: none; }
.basket-items > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .75rem; padding-block: .75rem; border-bottom: 1px solid var(--line); }
.basket-items > li > p { margin: 0; color: var(--soft); font-size: .88rem; overflow-wrap: anywhere; }
.basket-items .photo-list { grid-column: 1 / -1; margin-top: .25rem; }
.remove { grid-column: 2; justify-self: end; color: var(--berry); border: 0; padding: .5rem 0 .5rem .5rem; background: transparent; text-decoration: underline; }
.collection-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.collection-fields label { display: block; min-width: 0; margin: 0; }
.collection-fields input { display: block; width: 100%; min-width: 0; min-height: 44px; margin: .25rem 0 0; padding: .35rem; border: 1px solid #a1837a; border-radius: .45rem; background: white; color: var(--ink); }
.collection-fields input:disabled { background: #f4ece6; }
.collection-fields input[aria-invalid='true'] { border-color: var(--berry); }
.collection-picker .notice { margin: .45rem 0 0; }

@media (max-width: 710px) {
  .shell { width: calc(100% - 2rem); }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 1rem; }
  .hero-copy { padding: 1.05rem 1.15rem; border-radius: 1.1rem 1.1rem 0 0; }
  .hero h1 { margin-block: 0 .55rem; font-size: clamp(3rem, 8vw, 4.5rem); }
  .hero-copy > p { margin-bottom: .7rem; font-size: .94rem; }
  .hero-actions { gap: .45rem .9rem; }
  .hero .button { min-height: 44px; padding: .55rem .85rem; }
  .hero .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
  .hero-photo { min-height: 0; height: clamp(8.5rem, 36vw, 15rem); border-radius: 0 0 1.1rem 1.1rem; }
  .hero-photo img { object-position: center 52%; }
  .menu { padding-block: 1.5rem; }
  .section-title { margin-bottom: .8rem; }
  .section-title p { font-size: .83rem; }
  .product-grid, .cake-grid { grid-template-columns: 1fr; gap: .65rem; }
  .product { display: grid; grid-template-columns: clamp(4.8rem, 27vw, 8rem) minmax(0, 1fr); align-items: center; gap: .7rem; padding: .7rem; }
  .product-example { aspect-ratio: 1; border-radius: .55rem; }
  .product-copy { padding: 0; }
  .product h3 { font-size: clamp(1.35rem, 5.8vw, 1.65rem); }
  .product-copy > p { min-height: 0; margin-top: .35rem; font-size: .85rem; }
  .product dl { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin: .4rem 0 .5rem; font-size: .85rem; }
  .product dl div { gap: .4rem; padding: 0; border: 0; }
  .product .button { align-self: flex-start; min-height: 44px; }
  .cake-card { grid-template-columns: clamp(6.1rem, 30vw, 11rem) minmax(0, 1fr); }
  .cake-card-photo { min-height: 8rem; }
  .cake-card p, .cake-examples { font-size: .9rem; }
  .collection { display: block; padding: 1.55rem 0; }
  .collection img { display: none; }
}

@media (max-width: 580px) { .collection-link { display: none; } }

@media (max-width: 430px) {
  .header { gap: .65rem; }
  .brand { font-size: 1.03rem; }
  .brand img { width: 38px; height: 38px; }
  .header nav { gap: .5rem; font-size: .82rem; }
}

@media (max-width: 385px) {
  .header { flex-wrap: wrap; gap: .25rem .65rem; padding-block: .65rem; }
  .header nav { flex: 1 0 auto; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
