/* Hashwa, a fictional home bakery in Al Rawdah, Jeddah. Concept site by Orvo.
   One stylesheet for both directions: logical properties throughout,
   the Arabic page only swaps fonts and leading. */

:root {
  color-scheme: light;
  --cocoa: #2a150e;
  --cocoa-2: #3a2016;
  --cocoa-3: #4d2c1f;
  --butter: #f7e2a1;
  --butter-2: #fbedc4;
  --dough: #fff7e0;
  --ink: #2a150e;
  --ink-2: #5a3a2a;
  --ink-3: #7a5643;
  --on-dark: #fbebc6;
  --on-dark-2: #e6caa2;
  --on-dark-3: #bf9d7c;
  --pink: #f5b3c3;
  --pink-2: #fbd3dc;
  --pink-ink: #7a2a3e;
  --pistachio: #b5cf85;
  --pist-ink: #45602a;
  --crust: #c98140;
  --line-dark: rgba(251, 235, 198, 0.16);
  --line-light: rgba(42, 21, 14, 0.14);

  --gutter: 20px;
  --max: 1200px;
  --header: 64px;
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 32px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --font-display: "Bagel Fat One", "Baloo Bhaijaan 2", system-ui, sans-serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --lh-display: 0.98;
  --track-display: -0.005em;
}

:lang(ar) {
  --font-display: "Baloo Bhaijaan 2", "Readex Pro", system-ui, sans-serif;
  --font-body: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --lh-display: 1.18;
  --track-display: 0;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block-start: calc(var(--header) + 12px);
  background: var(--cocoa);
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 129, 64, 0.55) transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201, 129, 64, 0.55); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(201, 129, 64, 0.8); }
::-webkit-scrollbar-corner, ::-webkit-scrollbar-button { display: none; background: transparent; }

body {
  margin: 0;
  background: var(--cocoa);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:lang(ar) body, body:lang(ar) { line-height: 1.75; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

h1, h2 {
  font-family: var(--font-display);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

:lang(ar) h1, :lang(ar) h2 { font-weight: 800; }

p { margin: 0; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font: 600 16px/1.1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }

.btn-pink { background: var(--pink); color: var(--cocoa); box-shadow: inset 0 -3px 0 rgba(122, 42, 62, 0.22); }
.btn-line { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1.5px rgba(251, 235, 198, 0.42); }
.btn-ghost { background: transparent; color: var(--on-dark-2); }
.btn-cocoa { background: var(--cocoa); color: var(--butter); }
.btn-line-dark { background: transparent; color: var(--cocoa); box-shadow: inset 0 0 0 1.5px rgba(42, 21, 14, 0.4); }
.btn-wa { width: 100%; min-height: 58px; background: var(--pink); color: var(--cocoa); font-size: 17px; box-shadow: inset 0 -3px 0 rgba(122, 42, 62, 0.22); }
.btn-wa svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn-wa[aria-disabled="true"] { background: var(--cocoa-3); color: var(--on-dark-2); box-shadow: none; }

@media (hover: hover) and (pointer: fine) {
  .btn-pink:hover, .btn-wa:hover { background: var(--pink-2); }
  .btn-wa[aria-disabled="true"]:hover { background: var(--cocoa-3); }
  .btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--on-dark); }
  .btn-ghost:hover { color: var(--on-dark); }
  .btn-cocoa:hover { background: var(--cocoa-3); }
  .btn-line-dark:hover { box-shadow: inset 0 0 0 1.5px var(--cocoa); }
}

/* ---------- Demo bar + header ---------- */

.demo-bar {
  margin: 0;
  padding: 10px var(--gutter);
  font-size: 13px;
  line-height: 1.4;
  color: var(--on-dark-3);
  text-align: center;
  background: var(--cocoa);
}
.demo-bar a {
  display: inline-block;
  padding: 12px 6px;
  margin: -12px -6px;
  color: var(--on-dark-2);
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(42, 21, 14, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-block-end: 1px solid var(--line-dark);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--cocoa); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.header-row { display: flex; align-items: center; gap: 8px; min-height: var(--header); }

.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; margin-inline-end: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-ar { font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; font-weight: 800; font-size: 26px; line-height: 1; color: var(--butter); transform: translateY(2px); }
.brand-en { font-weight: 600; font-size: 14px; letter-spacing: 0.01em; color: var(--on-dark-2); }

.nav { display: none; }
.nav a, .lang {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px;
  color: var(--on-dark-2); text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 999px;
  transition: color 200ms ease, background-color 200ms ease;
}
.lang { font-family: "Readex Pro", "Segoe UI", Tahoma, sans-serif; }
:lang(ar) .lang { font-family: "Figtree", system-ui, sans-serif; }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .lang:hover { color: var(--on-dark); background: rgba(251, 235, 198, 0.08); }
}

@media (max-width: 430px) {
  .brand-en { display: none; }
}
.site-header .btn { white-space: nowrap; }

@media (min-width: 900px) {
  .nav { display: flex; gap: 2px; margin-inline-end: 6px; }
}

/* ---------- Status line ---------- */

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--on-dark-2);
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--on-dark-3); opacity: 0.6; flex: none;
}
.status[data-state="open"]::before { background: var(--pistachio); opacity: 1; box-shadow: 0 0 0 4px rgba(181, 207, 133, 0.2); }
.status[data-state="soon"]::before { background: #f2c45a; opacity: 1; box-shadow: 0 0 0 4px rgba(242, 196, 90, 0.2); }
.status[data-state="closed"]::before { background: var(--pink); opacity: 1; box-shadow: 0 0 0 4px rgba(245, 179, 195, 0.2); }
.status-light { color: var(--ink-2); margin-block: 12px 20px; }
.status-light[data-state="open"]::before { background: #5e8a2e; box-shadow: 0 0 0 4px rgba(94, 138, 46, 0.16); }
.status-light[data-state="closed"]::before { background: #c0546d; box-shadow: 0 0 0 4px rgba(192, 84, 109, 0.14); }

/* ---------- Story: the pinned 3D cookie ---------- */

.story { position: relative; }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 74%, rgba(247, 199, 120, 0.2), transparent 70%),
    var(--cocoa);
}

.spot {
  position: absolute;
  inset-inline: 12px;
  pointer-events: none;
}
.spot-a { inset-block: 52% 1%; }
.spot-b { inset-block: 10% 41%; }

.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 500ms ease;
}
.poster-end, .poster-b { opacity: 0; }

.gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 500ms ease;
}
.stage.gl-on .gl { opacity: 1; }
.stage.gl-on .poster { opacity: 0; }

.beats {
  position: relative;
  z-index: 2;
  margin-block-start: -100vh;
  margin-block-start: -100svh;
}

.beat {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header) + 20px) var(--gutter) 24px;
}
.beat-hero { align-items: flex-start; padding-block-start: calc(var(--header) + 22px); }
.beat-last { min-height: 110svh; }

.beat-body { width: 100%; max-width: 560px; }

.beat-hero h1 {
  margin-block: 14px 14px;
  font-size: clamp(42px, 11.4vw, 88px);
  color: var(--butter);
}
:lang(ar) .beat-hero h1 { font-size: clamp(42px, 11vw, 92px); }

.lede { font-size: 18px; line-height: 1.5; color: var(--on-dark-2); max-width: 34ch; }
:lang(ar) .lede { line-height: 1.8; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 22px; }

.beat-card {
  padding: 22px 22px 24px;
  border-radius: var(--r-lg);
  background: var(--cocoa-2);
  box-shadow: 0 1px 0 rgba(251, 235, 198, 0.06) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
.beat-card h2 { font-size: clamp(28px, 7.4vw, 52px); color: var(--butter); margin-block-end: 12px; }
.beat-card p { color: var(--on-dark-2); max-width: 44ch; }
.beat-card .btn { margin-block-start: 18px; }

@media (min-width: 900px) {
  .spot { inset-inline: auto 3vw; width: 52vw; }
  .spot-a, .spot-b { inset-block: 12vh 4vh; }
  :lang(ar) .spot { inset-inline: auto 3vw; }
  .stage {
    background:
      radial-gradient(42% 56% at 71% 56%, rgba(247, 199, 120, 0.2), transparent 70%),
      var(--cocoa);
  }
  :lang(ar) .stage {
    background:
      radial-gradient(42% 56% at 29% 56%, rgba(247, 199, 120, 0.2), transparent 70%),
      var(--cocoa);
  }
  .beat { align-items: center; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
  .beat-hero { align-items: center; padding-block-start: var(--header); }
  .beat-body { max-width: min(600px, 44vw); }
  .beat-hero h1 { font-size: clamp(56px, 6.1vw, 92px); }
  :lang(ar) .beat-hero h1 { font-size: clamp(56px, 6vw, 88px); }
  .beat-card { background: none; box-shadow: none; padding: 0; }
  .lede { font-size: 20px; }
}

/* Phones and small tablets: the cookie gets its own slot under the hero copy
   (the 3D camera reads this box, so the poster and the live cookie line up),
   and later sits in the band above the step cards. */
.hero-slot { display: none; }
@media (max-width: 899px) {
  :root { --chrome: 103px; } /* demo bar + header above the story at scroll 0; app.js measures it */
  .beat-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: calc(100svh - var(--chrome));
    padding-block: 20px 18px;
  }
  .beat-hero .beat-body { flex: none; }
  .hero-slot {
    display: block;
    position: relative;
    flex: 1 1 0;
    min-height: 150px;
    margin-block-start: 14px;
    pointer-events: none;
  }
  .story.gl-on .poster-slot { opacity: 0; }
  .spot-a .poster { display: none; }
  .spot-b { inset-block: calc(var(--header) + 12px) calc(var(--card-h, 290px) + 38px); }
  .beat-card { will-change: opacity; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .beat-hero h1 { font-size: clamp(36px, 10.4vw, 44px); margin-block: 10px; }
  :lang(ar) .beat-hero h1 { font-size: clamp(34px, 9.6vw, 42px); }
  .lede { font-size: 16px; }
  .actions { margin-block-start: 16px; }
  .status { font-size: 13px; }
  .beat-card { padding: 18px 18px 20px; }
  .beat-card h2 { font-size: clamp(25px, 7vw, 32px); margin-block-end: 8px; }
  .beat-card p { font-size: 15px; }
}

/* Reduced motion: the finished composition, no scrubbing, no pinning */
@media (prefers-reduced-motion: reduce) {
  .stage { position: absolute; inset: 0 0 auto 0; }
  .beats { margin-block-start: 0; }
  .beat { min-height: auto; padding-block: 0 20px; }
  .beat-hero { min-height: 100vh; min-height: 100svh; padding-block: calc(var(--header) + 22px) 24px; }
  .beat-last { min-height: auto; padding-block-end: 64px; }
  .poster-start { opacity: 0; }
  .poster-end { opacity: 1; }
  .gl { display: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 899px) {
  .beat-hero { min-height: calc(100svh - var(--chrome)); padding-block: 20px 18px; }
  .beat-card { will-change: auto; }
}

/* ---------- Section heads ---------- */

.sec-head { max-width: 640px; margin-block-end: 36px; }
.sec-head h2 { font-size: clamp(40px, 9vw, 76px); margin-block-end: 14px; }
.sec-head p { font-size: 18px; max-width: 52ch; }

/* ---------- Menu (butter) ---------- */

.menu {
  background: var(--butter);
  color: var(--ink);
  padding-block: 72px 80px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  position: relative;
  z-index: 3;
}
.menu .sec-head h2 { color: var(--cocoa); }
.menu .sec-head p { color: var(--ink-2); }

.group-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-block: 0 16px;
  color: var(--cocoa);
}
.group-title + .flavours, .group-title + .bakes { margin-block-end: 48px; }

.flavours {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.flavour {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border-radius: var(--r);
  background: var(--dough);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 24px -18px rgba(90, 50, 20, 0.45);
}
.flavour h4 { font-weight: 700; font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; color: var(--cocoa); margin-block-end: 4px; }
.flavour p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.flavour .price { font-weight: 700; font-size: 16px; color: var(--cocoa); white-space: nowrap; font-variant-numeric: tabular-nums; padding-block-start: 1px; }

.tag {
  display: inline-block; margin-inline-start: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.6; color: var(--pist-ink); background: rgba(181, 207, 133, 0.45);
  white-space: nowrap;
}

/* A cookie broken open: dough ring, filling in the middle, a few chips */
.xsec {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
  background:
    radial-gradient(circle at 30% 34%, var(--fk) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 30%, var(--fk) 0 3px, transparent 4px),
    radial-gradient(circle at 66% 76%, var(--fk) 0 4px, transparent 5px),
    radial-gradient(ellipse 34% 22% at 50% 54%, var(--fc) 0 92%, transparent 100%),
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--fd) 78%, white), var(--fd) 60%, color-mix(in srgb, var(--fd) 72%, black));
  box-shadow: 0 6px 12px -6px rgba(60, 30, 10, 0.5);
}

@media (min-width: 720px) {
  .flavours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .flavours { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .flavour { grid-template-columns: 64px minmax(0, 1fr); }
  .flavour .price { grid-column: 2; }
}

.bakes { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.bake {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--dough);
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  box-shadow: 0 10px 24px -18px rgba(90, 50, 20, 0.45);
}
.bake img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; background: #d9b77d; }
.bake-text { padding: 16px 18px 18px; }
.bake h4 { font-weight: 700; font-size: 18px; line-height: 1.25; color: var(--cocoa); margin-block-end: 4px; }
.bake p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.bake .bake-price { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-block-start: 10px; font-weight: 700; color: var(--cocoa); font-variant-numeric: tabular-nums; }

@media (min-width: 720px) {
  .bakes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bake { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .bake img { aspect-ratio: 4 / 3.4; height: auto; min-height: 0; }
}

.allergens {
  padding: 22px;
  border-radius: var(--r);
  background: rgba(181, 207, 133, 0.35);
  box-shadow: inset 0 0 0 1.5px rgba(69, 96, 42, 0.22);
}
.allergens h3 { font-weight: 700; font-size: 17px; color: var(--pist-ink); margin-block-end: 6px; }
.allergens p { font-size: 15px; color: #3a4a26; max-width: 80ch; }

/* ---------- Order: box builder (cocoa) ---------- */

.order {
  padding-block: 80px 88px;
  background: var(--cocoa);
}
.order .sec-head h2 { color: var(--butter); }
.order .sec-head p { color: var(--on-dark-2); }

.builder { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }

.step {
  margin: 0;
  min-width: 0;
  padding: 20px;
  border: 0;
  border-radius: var(--r);
  background: var(--cocoa-2);
}
.step legend {
  float: inline-start;
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  margin-block-end: 16px;
  font-weight: 700; font-size: 19px; color: var(--on-dark);
}
.step legend + * { clear: both; }
.step-n {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--butter); color: var(--cocoa);
  font: 700 15px/1 var(--font-body);
}

.sizes { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.size {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 14px 16px;
  min-height: 60px;
  border-radius: var(--r-sm);
  background: var(--cocoa-3);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.size:active { transform: scale(0.98); }
.size input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.size-name { font-weight: 700; font-size: 17px; }
.size-note { grid-column: 1; font-size: 14px; color: var(--on-dark-3); }
.size-price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.size:has(input:checked) { background: var(--butter); color: var(--cocoa); box-shadow: 0 10px 22px -14px rgba(247, 226, 161, 0.6); }
.size:has(input:checked) .size-note { color: var(--ink-2); }
.size:has(input:focus-visible) { outline: 3px solid var(--pink); outline-offset: 2px; }

.box-visual {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 16px;
  margin-block-end: 14px;
  border-radius: var(--r-sm);
  background: #f3c9d3;
  background: linear-gradient(180deg, #f6c3cf, #eeb0c0);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -10px 18px -10px rgba(122, 42, 62, 0.4);
}
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; max-width: 420px; }
.slots[data-n="4"] { grid-template-columns: repeat(4, 1fr); max-width: 300px; }
.slot {
  aspect-ratio: 1;
  border-radius: 50%;
}
.slot:not(.xsec) {
  box-shadow: inset 0 0 0 2px rgba(122, 42, 62, 0.28);
  background: rgba(255, 255, 255, 0.2);
}
.slot.xsec { width: auto; height: auto; box-shadow: 0 4px 8px -4px rgba(60, 20, 20, 0.55); }
.slot.is-new { animation: drop 260ms var(--ease-out); }
@keyframes drop { from { transform: translateY(-6px) scale(0.92); opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .slot.is-new { animation: none; } }
.picked { font-weight: 700; font-size: 15px; color: var(--pink-ink); }

.picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pick {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 8px 8px 10px;
  border-radius: var(--r-sm);
  background: var(--cocoa-3);
}
:lang(ar) .pick { padding: 8px 10px 8px 8px; }
.pick .xsec { width: 40px; height: 40px; }
.pick-name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.pick-name small { display: block; font-weight: 500; font-size: 13px; color: var(--on-dark-3); }
.stepper { display: inline-flex; align-items: center; gap: 2px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(251, 235, 198, 0.1); color: var(--on-dark);
  font: 600 22px/1 var(--font-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
}
.stepper button:active { transform: scale(0.92); }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper button[data-plus]:not(:disabled) { background: var(--butter); color: var(--cocoa); }
@media (hover: hover) and (pointer: fine) {
  .stepper button[data-minus]:not(:disabled):hover { background: rgba(251, 235, 198, 0.2); }
  .stepper button[data-plus]:not(:disabled):hover { background: #fff0bf; }
  .size:not(:has(input:checked)):hover { background: #5a3525; }
}
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick.has-qty { box-shadow: inset 0 0 0 1.5px rgba(247, 226, 161, 0.5); }

.fill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #1f0f09; margin-block-end: 16px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 6px 10px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--on-dark-2);
  transition: background-color 200ms ease, color 200ms ease;
}
.seg input:checked + span { background: var(--butter); color: var(--cocoa); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.seg input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }

.field { display: grid; gap: 6px; margin-block-end: 14px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--on-dark-2); }
.field input {
  width: 100%; min-height: 50px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1.5px solid rgba(251, 235, 198, 0.2);
  background: #1f0f09; color: var(--on-dark);
  font: 500 16px/1.2 var(--font-body);
}
.field input::placeholder { color: rgba(230, 202, 162, 0.5); }
.field input:focus { outline: none; border-color: var(--pink); }

.sub-label { font-size: 14px; font-weight: 600; color: var(--on-dark-2); margin-block: 2px 8px; }

.days {
  display: flex; gap: 8px; overflow-x: auto; padding-block-end: 8px; margin-block-end: 12px;
  margin-inline: -20px; padding-inline: 20px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 129, 64, 0.55) transparent;
  overscroll-behavior-x: contain;
}
.days::-webkit-scrollbar { height: 6px; }
.days-fallback { font-size: 15px; color: var(--on-dark-3); }

.times { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { position: relative; cursor: pointer; flex: none; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 46px; min-width: 64px; padding: 6px 14px; border-radius: 16px;
  background: var(--cocoa-3); color: var(--on-dark);
  font-weight: 600; font-size: 15px; line-height: 1.25; text-align: center;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.chip:active > span { transform: scale(0.96); }
.chip small { font-weight: 500; font-size: 12px; color: var(--on-dark-3); }
.chip input:checked + span { background: var(--butter); color: var(--cocoa); }
.chip input:checked + span small { color: var(--ink-2); }
.chip input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.chip input:disabled + span { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(251, 235, 198, 0.14); color: var(--on-dark-3); cursor: not-allowed; }
.chip input:disabled + span small { color: var(--pink); }
.day > span { min-width: 76px; min-height: 66px; }
.day b { font-size: 19px; font-weight: 700; line-height: 1.1; }

.check { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; font-size: 15px; color: var(--on-dark-2); }
.check input { width: 22px; height: 22px; accent-color: var(--pink); flex: none; }

.summary {
  padding: 22px;
  border-radius: var(--r);
  background: var(--dough);
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.summary h3 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; color: var(--cocoa); margin-block-end: 12px; }
:lang(ar) .summary h3 { font-weight: 800; }
.summary-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; }
.summary-lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-lines .missing { color: #a33d58; font-weight: 600; }
.total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-block: 14px; margin-block-end: 14px;
  border-block-start: 1.5px dashed rgba(42, 21, 14, 0.25);
  font-weight: 700; font-size: 18px;
}
.total strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.hint { margin-block-start: 12px; font-size: 14px; color: var(--ink-3); text-align: center; }
.hint.is-warn { color: #a33d58; font-weight: 600; }

@media (min-width: 720px) {
  .sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .size { grid-template-columns: minmax(0, 1fr); align-content: start; padding: 16px 18px; }
  .size-price { grid-column: 1; grid-row: auto; margin-block-start: 8px; }
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { padding: 24px; }
  .days { margin-inline: -24px; padding-inline: 24px; }
}

@media (min-width: 1000px) {
  .builder { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 24px; }
  .builder .step { grid-column: 1; }
  .summary { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: calc(var(--header) + 20px); }
}

/* ---------- How ordering works (butter) ---------- */

.how {
  background: var(--butter);
  color: var(--ink);
  padding-block: 80px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.how .sec-head h2 { color: var(--cocoa); }
.how .sec-head p { color: var(--ink-2); }

.steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.steps li { padding: 20px; border-radius: var(--r); background: var(--dough); }
.steps .step-n { background: var(--cocoa); color: var(--butter); margin-block-end: 12px; }
.steps h3 { font-weight: 700; font-size: 19px; color: var(--cocoa); margin-block-end: 4px; }
.steps p { font-size: 15px; color: var(--ink-2); }

.facts { margin: 0; display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); border-block-start: 1.5px solid var(--line-light); }
.facts div { padding-block: 16px; border-block-end: 1.5px solid var(--line-light); display: grid; gap: 4px; }
.facts dt { font-weight: 700; color: var(--cocoa); }
.facts dd { margin: 0; color: var(--ink-2); }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- From the kitchen (pink) ---------- */

.kitchen { background: var(--pink); color: var(--cocoa); padding-block: 80px; }
.kitchen-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.kitchen-photo { margin: 0; border-radius: var(--r-lg); overflow: hidden; max-width: 420px; transform: rotate(-2deg); box-shadow: 0 30px 50px -30px rgba(90, 20, 40, 0.6); }
:lang(ar) .kitchen-photo { transform: rotate(2deg); }
.kitchen-photo img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; background: #d9b77d; }
.kitchen-note h2 { font-size: clamp(40px, 9vw, 72px); margin-block-end: 18px; color: var(--cocoa); }
.kitchen-note p { font-size: 19px; line-height: 1.6; max-width: 46ch; margin-block-end: 14px; color: #4a2219; }
:lang(ar) .kitchen-note p { line-height: 1.9; }
.kitchen-note .sign { font-family: var(--font-display); font-size: 26px; color: var(--cocoa); margin-block-start: 6px; }
:lang(ar) .kitchen-note .sign { font-weight: 800; }

@media (min-width: 860px) {
  .kitchen-grid { grid-template-columns: 5fr 7fr; gap: 64px; }
}

/* ---------- Pickup and hours (butter) ---------- */

.visit { background: var(--butter-2); color: var(--ink); padding-block: 80px; }
.visit-grid { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr); }
.visit h2 { font-size: clamp(40px, 9vw, 72px); color: var(--cocoa); }

.hours { width: 100%; border-collapse: collapse; font-size: 17px; }
.hours th, .hours td { text-align: start; padding: 14px 0; border-block-end: 1.5px solid var(--line-light); vertical-align: top; }
.hours th { font-weight: 600; color: var(--cocoa); padding-inline-end: 16px; }
.hours td { color: var(--ink-2); }
.hours tr[aria-current] th, .hours tr[aria-current] td { color: var(--cocoa); font-weight: 700; }
.hours tr.muted th, .hours tr.muted td { color: var(--ink-3); font-weight: 500; }

.visit-card { padding: 24px; border-radius: var(--r-lg); background: var(--dough); box-shadow: 0 20px 40px -28px rgba(90, 50, 20, 0.5); align-self: start; }
.visit-card h3 { font-family: var(--font-display); font-size: 32px; line-height: 1.1; color: var(--cocoa); margin-block-end: 10px; }
:lang(ar) .visit-card h3 { font-weight: 800; }
.visit-card p { color: var(--ink-2); max-width: 46ch; }
.visit-card .actions { margin-block: 20px 16px; }
.phone a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--cocoa); text-underline-offset: 3px; }

@media (min-width: 860px) {
  .visit-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .visit-card { margin-block-start: 12px; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--cocoa); color: var(--on-dark-3); padding-block: 40px 48px; font-size: 15px; }
.footer-row { display: grid; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--on-dark); font-weight: 600; }
.footer-row a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--on-dark-2); text-underline-offset: 3px; }

@media (min-width: 860px) {
  .footer-row { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
}
