:root {
  --white: #fff;
  --canvas: #f7f6f4;
  --ink: #1b1b1d;
  --muted: #605d60;
  --line: #dedbdc;
  --dark: #171719;
  --sans: Nunito, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 500 16px/1.6 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.shell { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; top: 16px; left: 16px; z-index: 3; background: white; color: var(--ink); padding: 10px 18px; transform: translateY(-180%); }
.skip:focus { transform: none; }

.site-header { color: var(--white); background: var(--dark); border-bottom: 1px solid #ffffff22; }
.header-inner { min-height: 92px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; }
.brand { display: block; width: fit-content; border-radius: 50%; }
.brand img { width: 72px; height: auto; border-radius: 50%; }
#navigation { display: flex; gap: clamp(18px, 3vw, 37px); font-size: 15px; font-weight: 750; }
#navigation a:hover, .footer-main a:hover, .footer-base a:hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-button { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 49px; padding: 10px 20px; border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 14px; font-weight: 850; text-align: center; line-height: 1.35; transition: background .2s, border-color .2s; }
.button-primary { background: #e9e9eb; border-color: #737375; color: var(--ink); }
.button-primary:hover { background: #d7d7da; border-color: var(--ink); }
.button-outline { border-color: #b7b2b5; }
.button-outline:hover { background: #2222220c; }
.site-header .button-outline, .hero .button-outline { border-color: #ffffff65; }
.site-header .button-outline:hover, .hero .button-outline:hover { background: #ffffff14; }
.header-order { justify-self: end; min-height: 42px; }
.text-link { text-decoration: underline; text-underline-offset: 4px; }

.hero-band { color: var(--white); background: var(--dark) url("./assets/brand-background.webp") center / cover no-repeat; }
.hero { display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 24px; min-height: 560px; padding-block: 34px 40px; }
.location { color: #e8e2e4; font-size: 16px; font-weight: 750; }
h1 { margin-top: 15px; font-size: clamp(53px, 5.2vw, 75px); font-weight: 900; line-height: .99; letter-spacing: -.055em; }
.hero-description { margin-top: 24px; max-width: 420px; color: #e4dfe2; font-size: 17px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 27px; }
.hero-visual { display: grid; place-items: center; min-width: 0; }
.hero-visual img { width: 100%; height: clamp(390px, 37vw, 510px); object-fit: contain; filter: brightness(1.2); }

.section { padding-block: 67px 76px; }
h2 { font-size: clamp(34px, 4vw, 55px); font-weight: 900; line-height: 1.08; letter-spacing: -.045em; }
.catalog-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.catalog-controls button { border: 1px solid var(--line); background: transparent; border-radius: 7px; padding: 8px 14px; font-size: 14px; font-weight: 800; transition: background .2s, color .2s; }
.catalog-controls button:hover { border-color: var(--ink); }
.catalog-controls button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.catalog-note { margin: 13px 0 20px; color: var(--muted); font-size: 14px; }
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--white); }
.product:hover { border-color: #8d878a; }
.product-image { width: 100%; aspect-ratio: 1.57; overflow: hidden; background: var(--canvas); }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product:hover img, .gallery-image:hover img { transform: scale(1.04); }
.product-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 17px 18px 19px; }
.product-title { font-size: clamp(18px, 2.2vw, 25px); font-weight: 900; line-height: 1.12; letter-spacing: -.025em; }
.product-description { font-size: 14px; color: var(--muted); }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 7px; font-weight: 850; font-size: 14px; }
.product-arrow { width: 8px; height: 8px; margin-right: 5px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.catalog-more { display: flex; justify-content: center; margin-top: 24px; }
.catalog-more:has([hidden]) { display: none; }
.dessert-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; grid-column: 1 / -1; padding: 25px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.dessert-panel h3 { font-size: clamp(21px, 3vw, 29px); line-height: 1.16; }

.gallery-section { background: var(--canvas); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 25px; }
.gallery-image { padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: #dedbdc; }
.gallery-image img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.order-section { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; align-items: center; }
.order-copy > p { margin: 15px 0 21px; color: var(--muted); }
.order-steps { margin: 0; padding-left: 26px; }
.order-steps li { padding: 12px 0 12px 6px; border-bottom: 1px solid var(--line); }
.order-steps li:first-child { border-top: 1px solid var(--line); }
.order-steps li::marker { font-weight: 900; }
.order-steps h3 { font-size: 19px; line-height: 1.25; }
.order-steps p { color: var(--muted); font-size: 14px; }

footer { background: var(--dark); color: var(--white); }
.footer-main { display: grid; grid-template-columns: .55fr 1.2fr .8fr 1fr; align-items: start; gap: 22px; padding-block: 37px 28px; }
.footer-main h2 { margin-bottom: 8px; font-size: 16px; letter-spacing: 0; }
.footer-main a:not(.brand), .footer-main p { display: block; width: fit-content; margin-top: 4px; color: #e1dcdf; font-size: 14px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid #ffffff27; padding-block: 12px 18px; color: #ddd8dc; font-size: 13px; }

dialog { border: 1px solid var(--line); border-radius: 11px; background: var(--white); padding: 0; color: var(--ink); width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: #131315c9; }
dialog .close { position: absolute; right: 10px; top: 10px; z-index: 2; border: 1px solid var(--line); border-radius: 50%; width: 42px; height: 42px; padding: 0; background: var(--white); font: 600 27px/1 var(--sans); }
#detail-image { width: 100%; height: min(260px, 32vh); object-fit: cover; }
.detail-body { display: grid; gap: 10px; padding: 22px; }
.detail-body h2 { font-size: 34px; }
.detail-category { color: var(--muted); font-weight: 800; font-size: 13px; }
.detail-price { font-weight: 900; }
.detail-body .button { justify-self: start; }
#lightbox { width: auto; max-width: calc(100vw - 28px); background: var(--dark); }
#lightbox img { max-height: calc(100dvh - 40px); width: auto; object-fit: contain; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
  .hero { min-height: 500px; }
  h1 { font-size: clamp(43px, 5.3vw, 53px); }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 72px; grid-template-columns: 1fr auto auto; gap: 10px; }
  .header-inner .brand img { width: 55px; }
  .header-order { grid-column: 2; grid-row: 1; min-height: 40px; padding-inline: 12px; font-size: 13px; }
  .menu-button { grid-column: 3; grid-row: 1; width: 40px; height: 40px; padding: 0; display: grid; align-content: center; justify-items: center; gap: 5px; background: transparent; border: 1px solid #ffffff60; border-radius: 7px; }
  .menu-button span { width: 16px; height: 1px; background: var(--white); }
  #navigation { grid-column: 1 / -1; display: none; flex-wrap: wrap; gap: 10px 22px; padding: 6px 0 14px; font-size: 14px; }
  #navigation.open { display: flex; }
  .hero { grid-template-columns: 1fr; padding-block: 34px 15px; min-height: 0; gap: 18px; }
  .location { font-size: 14px; }
  h1 { margin-top: 12px; font-size: clamp(43px, 10.65vw, 68px); }
  .hero-description { margin-top: 16px; font-size: 16px; }
  .actions { margin-top: 20px; }
  .hero-visual img { height: clamp(260px, 75vw, 410px); }
  .section { padding-block: 45px 55px; }
  .products { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-body { padding: 12px; }
  .product-description { font-size: 12px; }
  .gallery-grid { gap: 10px; }
  .gallery-image { border-radius: 6px; }
  .order-section { grid-template-columns: 1fr; gap: 25px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 20px 10px; }
}

@media (max-width: 420px) {
  .catalog-controls { gap: 5px; }
  .catalog-controls button { padding-inline: 8px; font-size: 12px; }
  .dessert-panel { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
