:root {
  color-scheme: light;
  --paper: #fbf5eb;
  --ivory: #fffaf1;
  --rose: #f3e4de;
  --sage: #ebede3;
  --ink: #41322c;
  --muted: #66564b;
  --berry: #793e49;
  --gold: #bd9b6c;
  --line: #dfcbb3;
  --serif: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background:
    linear-gradient(#fbf5ebae, #fbf5ebae),
    url("images/gingerbread-background.jpg") center top / 630px auto repeat,
    var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
}
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--berry); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font: 400 2.5rem/1.08 var(--serif); letter-spacing: -.035em; }
[id] { scroll-margin-top: 1.25rem; }

.wrap { width: min(1220px, calc(100% - 88px)); margin-inline: auto; }
.header, .footer {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--ivory);
}
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-block: 14px 20px;
  padding: 10px 12px 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  max-width: 100%;
  color: var(--berry);
  text-align: center;
  text-decoration: none;
  font: clamp(1.55rem, 4.1vw, 3.35rem)/1.06 var(--serif);
}
.logo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: multiply;
}
.logo-art { position: absolute; top: -6%; left: -15.2%; width: 124%; }
.logo-art::after {
  position: absolute;
  inset: 0;
  /* Black in screen mode leaves the QR and its quiet zone untouched. */
  background:
    linear-gradient(#000, #000) 54% 61% / 34% 33% no-repeat,
    radial-gradient(ellipse 11% 15% at 78% 54%, #ad5967 18%, transparent 73%),
    radial-gradient(ellipse 13% 21% at 79% 62%, #586c48 28%, transparent 90%),
    radial-gradient(ellipse 13% 17% at 27% 50%, #986432 32%, transparent 90%),
    radial-gradient(ellipse 13% 14% at 27% 64%, #586c48 32%, transparent 90%),
    linear-gradient(154deg, #864857 23%, #6f3644 57%, #88603d 100%);
  content: "";
  mix-blend-mode: screen;
  pointer-events: none;
}
.brand-mark { flex: 0 0 128px; width: 128px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 24px; }
.nav a { padding-block: 8px; text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--berry); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }

.paper-frame {
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: radial-gradient(ellipse at 8% 0, #fff7ed 1%, transparent 63%), var(--rose);
}
.paper-frame::before {
  position: absolute;
  inset: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  content: "";
  pointer-events: none;
}
.ornament { display: flex; width: 124px; align-items: center; gap: 11px; color: var(--gold); }
.ornament::before, .ornament::after { flex: 1; height: 3px; border-block: 1px solid currentColor; content: ""; }
.ornament i { width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid currentColor; border-radius: 2px; }
.ornament i::before { position: absolute; inset: 2px; background: currentColor; content: ""; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); align-items: center; gap: clamp(22px, 4.8vw, 72px); padding: clamp(28px, 4.6vw, 63px); }
.hero h1 { margin-top: 20px; font-size: clamp(2.4rem, 5.35vw, 5.15rem); line-height: .99; }
.hero h1 span { display: block; margin-top: 13px; color: var(--berry); font-size: .57em; font-style: italic; line-height: 1.15; letter-spacing: -.025em; }
.intro { max-width: 36ch; margin-top: 19px; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.17rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 19px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 19px; border: 1px solid var(--berry); border-radius: 4px; background: var(--berry); color: var(--ivory); text-decoration: none; font-weight: 650; }
.button:hover { background: #65303b; }
.text-link { color: var(--berry); font-weight: 650; text-underline-offset: 4px; }

.hero-photo { padding: 8px 8px 0; border: 1px solid var(--gold); border-radius: 45% 45% 4px 4px / 23% 23% 4px 4px; background: var(--ivory); box-shadow: 0 7px 16px #67473716; }
.hero-photo a { display: block; overflow: hidden; border-radius: 45% 45% 2px 2px / 23% 23% 2px 2px; }
.hero-photo img { aspect-ratio: 1.25; object-fit: cover; object-position: center; background: var(--rose); }
.hero-photo figcaption { padding: 7px 4px; text-align: center; color: var(--muted); font: italic 1rem/1.3 var(--serif); }

.about, .showcase {
  margin-block: clamp(26px, 4.6vw, 60px);
  padding: clamp(22px, 4.4vw, 52px);
  background: var(--ivory);
}
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 4.4vw, 55px);
}
.about h2 { margin-top: 14px; }
.about p { margin-top: 10px; color: var(--muted); }
.about-terms { padding: clamp(16px, 2.5vw, 28px); border: 1px solid #d7d8c7; border-radius: 5px; background: var(--sage); }
.about-terms h3 { color: var(--berry); font-size: clamp(1.4rem, 2.6vw, 2rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; margin-bottom: 19px; }
.section-head h2, .order-heading h2, .about h2 { font-size: clamp(2.1rem, 3.7vw, 3.4rem); }
.tiles, .gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); }
.tile, .work { display: block; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--ivory); }
.tile { text-decoration: none; }
.tile img { aspect-ratio: 1.35; object-fit: cover; object-position: 50% 48%; }
.tile h3 { padding: 12px 6px 7px; text-align: center; font-size: clamp(1.28rem, 2.1vw, 1.85rem); }
.tile p { padding: 0 6px 10px; color: var(--muted); text-align: center; font-size: .94rem; }
.tile:hover, .work:hover { border-color: var(--gold); }
.tile:hover h3 { color: var(--berry); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tile img, .work-image img { border-radius: 2px; background: var(--rose); }

.order-panel { padding: clamp(23px, 5vw, 58px); margin-bottom: clamp(32px, 5vw, 66px); }
.order-heading, .order-form { max-width: 800px; margin-inline: auto; }
.order-heading h2 { margin-top: 14px; }
.order-heading p { margin-top: 10px; max-width: 59ch; color: var(--muted); }
.order-form { display: grid; gap: 18px; margin-top: 23px; }
.order-form [hidden] { display: none; }
.order-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.form-field { display: grid; align-content: start; gap: 6px; min-width: 0; font-weight: 600; }
.form-field small { margin-left: 4px; color: var(--muted); font-size: .875rem; font-weight: 400; }
.field-wide { grid-column: 1 / -1; }
.form-field :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid #b69b82;
  border-radius: 4px;
  background: var(--ivory);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.form-field textarea { resize: vertical; }
.order-form :is(input, select, textarea, button):focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
.dessert-options { min-width: 0; margin: 0; padding: 10px 14px 14px; border: 1px solid var(--gold); border-radius: 4px; }
.dessert-options > legend { padding-inline: 6px; color: var(--berry); font: 1.3rem/1.2 var(--serif); }
.cake-fillings { margin: 2px 0 0; padding: 0; border: 0; }
.cake-fillings legend { padding: 0; font-weight: 600; }
.cake-fillings p, .order-submit p { color: var(--muted); font-size: .9rem; }
.filling-choices { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 6px; }
.filling-choices label { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; cursor: pointer; }
.filling-choices input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--berry); }
.order-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.order-submit button { font: inherit; font-weight: 650; cursor: pointer; }
.order-submit button:disabled { opacity: .6; cursor: default; }
.order-status:empty { display: none; }
.order-status { color: var(--berry); font-weight: 600; }
.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) minmax(0, .82fr);
  grid-template-areas: "heading channels logo";
  align-items: center;
  gap: clamp(16px, 3vw, 42px);
  padding: clamp(24px, 4.4vw, 59px);
}
.contact-heading { grid-area: heading; }
.contact-logo { grid-area: logo; width: min(100%, 250px); justify-self: center; }
.contacts, .work-cta { background: var(--sage); }
.contacts h2, .work-cta h2 { margin-top: 13px; font-size: clamp(2rem, 3.6vw, 3.35rem); }
.phone { display: inline-block; margin-top: 15px; padding-block: 5px; color: var(--berry); font-size: clamp(1.1rem, 2vw, 1.55rem); text-decoration-color: var(--gold); text-underline-offset: 5px; }
.channels { grid-area: channels; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.channel { display: flex; height: 100%; min-height: 76px; flex-direction: column; justify-content: center; gap: 2px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 4px; background: var(--ivory); text-decoration: none; }
.channel:hover { border-color: var(--gold); color: var(--berry); }
.channel span { color: var(--muted); font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
.footer { margin-block: 20px 14px; padding: 17px 12px; text-align: center; color: var(--muted); font: 1rem/1.35 var(--serif); }

.gallery-hero { padding: clamp(28px, 4.8vw, 66px); text-align: center; }
.gallery-hero .ornament { margin-inline: auto; }
.gallery-hero h1 { margin-top: 16px; font-size: clamp(3rem, 6.5vw, 5.65rem); }
.gallery-hero p { max-width: 50ch; margin: 9px auto 0; color: var(--muted); }
.category-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.category-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 5px 15px; border: 1px solid var(--gold); border-radius: 4px; background: var(--ivory); color: var(--berry); text-decoration: none; font-weight: 650; }
.category-links a:hover { background: var(--berry); color: var(--ivory); }
.gallery-section {
  margin-block: clamp(18px, 3vw, 32px);
  padding: clamp(15px, 3.2vw, 40px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--ivory);
}
.work-image { display: block; }
.work-image img { aspect-ratio: 4 / 5; object-fit: cover; }
.work figcaption { padding: 8px 5px 5px; color: var(--ink); font: 1.07rem/1.27 var(--serif); }
.work-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px 26px; padding: clamp(25px, 4vw, 43px); }
.work-cta h2 { margin: 0; }

@media (max-width: 980px) {
  .wrap { width: calc(100% - 54px); }
  .contacts {
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
    grid-template-areas: "heading logo" "channels channels";
  }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .brand-mark { flex-basis: 100px; width: 100px; }
  .nav { gap: 4px 15px; font-size: .9rem; }
  .hero, .contacts, .about { grid-template-columns: 1fr; }
  .contacts { grid-template-areas: "heading" "channels" "logo"; }
  .hero { gap: 25px; padding: 30px 22px 22px; }
  .hero-photo { width: min(100%, 500px); justify-self: center; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  body { background-size: auto, 400px auto, auto; }
  .nav a { padding-block: 6px; }
  .tiles { grid-template-columns: 1fr; }
  .order-fields { grid-template-columns: 1fr; }
  .tile img { aspect-ratio: 1.55; }
  .work { padding: 5px; }
  .work figcaption { padding-inline: 2px; font-size: .97rem; }
  .channel { padding-inline: 9px; }
}

