/* ============================================================
   DOE — Doe'kies · production stylesheet
   Palette is locked to the 9 brand tokens. Hairlines, flat fills,
   radii ≤ 6px, exactly one shadow (the WhatsApp FAB).
   ============================================================ */

:root {
  --cream: #EAD9C9;
  --beige: #E7CFB5;
  --lift: #F2E5D7;
  --tan: #D4B799;
  --cocoa: #34220E;
  --cocoa-60: #6B5138;
  --cookie: #D9A05B;
  --chip: #4A2A15;
  --white-chip: #F6EDE0;

  --font-body: 'Cormorant Garamond', 'Amiri', Georgia, serif;
  --font-script: 'Pinyon Script', cursive;

  --ls: 0.18em;                                   /* caps tracking (EN) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad-sec: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 64px);
}
html[lang="ar"] { --ls: 0.02em; }                 /* never track out Arabic */

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.6;
  overflow-x: clip;                               /* ambient/hero overhangs never scroll (set on both html+body — body alone doesn't propagate `clip` reliably) */
  -webkit-font-smoothing: antialiased;
}
.page { position: relative; overflow: clip; }    /* clips ambient/hero negative overhangs in both LTR and RTL */
a { color: var(--cocoa); }
a:hover { color: var(--cocoa-60); }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }

html[lang="ar"] .script,
html[lang="ar"] .hero-tagline { font-family: 'Amiri', serif; font-style: italic; }
.script { font-family: var(--font-script); }

.skip {
  position: absolute; inset-inline-start: 16px; top: -72px; z-index: 100;
  background: var(--cocoa); color: var(--lift); padding: 10px 18px;
  border-radius: 3px; text-decoration: none; transition: top 200ms var(--ease-out);
}
.skip:focus-visible { top: 12px; color: var(--lift); }

:focus-visible { outline: 2px solid var(--cocoa-60); outline-offset: 3px; }

/* ---------- reveal engine (JS-gated: no-JS sees everything) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(20px) scale(0.96); }
.js .rule[data-reveal] { transform: scaleX(0); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: clamp(16px, 4vw, 44px); padding-block: 14px;
  background: transparent; border-bottom: 1px solid transparent;
  transition: padding 320ms var(--ease-out), background 320ms ease, border-color 320ms ease;
}
.site-head.condensed { padding-block: 6px; background: var(--cream); border-bottom-color: var(--tan); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 46px; }
.brand-word { font-size: 18px; letter-spacing: 0.3em; font-weight: 600; }
.head-actions { display: flex; align-items: center; gap: 6px; }
.lang-btn {
  min-height: 44px; min-width: 44px; padding: 8px 10px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; letter-spacing: 0.14em;
  text-decoration: none; text-underline-offset: 5px;
}
.lang-ar { font-family: 'Amiri', serif; font-size: 16px; letter-spacing: 0; }
.lang-btn[aria-pressed="true"] { text-decoration: underline; }
.lang-sep { color: var(--cocoa-60); }
.head-wa { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.wa-path { fill: var(--cocoa); }
.wa-path-light { fill: var(--lift); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 92vh; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px;
}
.hero-cookie {
  position: absolute; top: 10vh; inset-inline-end: -16vw;
  width: clamp(150px, 36vw, 520px); z-index: 0;
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-deer { width: 72px; animation: fadeIn 1100ms var(--ease-out) both; }
.hero-word {
  margin: 0; font-size: clamp(3.5rem, 12vw, 9rem); font-weight: 500;
  line-height: 1; letter-spacing: 0.14em; text-indent: 0.14em;
}
.hero-word span { display: inline-block; animation: riseIn 620ms var(--ease-out) both; }
.hero-word span:nth-child(1) { animation-delay: 150ms; }
.hero-word span:nth-child(2) { animation-delay: 190ms; }
.hero-word span:nth-child(3) { animation-delay: 230ms; }
.hero-sub {
  margin: 0; font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.42em; text-indent: 0.42em;
  animation: riseIn 620ms var(--ease-out) 320ms both;
}
.hero-tagline {
  margin: 10px 0 0; font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  color: var(--cocoa-60); animation: fadeIn 700ms var(--ease-out) 500ms both;
}
html[lang="ar"] .en-only { display: none; }
.hero-cta { margin-top: 28px; animation: riseIn 620ms var(--ease-out) 650ms both; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 34px;
  background: var(--cocoa); color: var(--lift);
  border: none; border-radius: 3px; cursor: pointer;
  text-decoration: none; letter-spacing: var(--ls); font-size: 14px;
  transition: background 220ms ease, opacity 220ms ease;
}
.btn-primary:hover { background: var(--chip); color: var(--lift); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-outline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px;
  border: 1px solid var(--cocoa); border-radius: 3px; text-decoration: none;
  font-size: 13px; letter-spacing: var(--ls); transition: background 220ms ease;
  margin-top: 18px;
}
.btn-outline:hover { background: var(--cream); color: var(--cocoa); }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; width: 1px; height: 52px;
  background: var(--cocoa-60);
  animation: cue 2.4s var(--ease-out) infinite;
}
.crumb {
  position: absolute; border-radius: 50%;
  background: var(--cocoa); opacity: 0.12;
}
.crumb-1 { top: 22%; inset-inline-start: 14%; width: 5px; height: 5px; }
.crumb-2 { top: 64%; inset-inline-start: 8%;  width: 4px; height: 4px; }
.crumb-3 { top: 30%; inset-inline-end: 10%;   width: 6px; height: 6px; }
.crumb-4 { top: 74%; inset-inline-end: 20%;   width: 4px; height: 4px; }

/* ---------- marquee ---------- */
.marquee {
  position: relative; z-index: 1; overflow: clip;
  background: var(--cocoa); color: var(--cream); padding-block: 12px;
}
.marquee-track {
  display: flex; gap: 56px; width: max-content; white-space: nowrap;
  font-size: 12px; letter-spacing: 0.26em;
  animation: marquee 36s linear infinite;
}

/* ---------- shared section chrome ---------- */
.sec { position: relative; z-index: 1; padding: var(--pad-sec); }
.sec-cream { background: var(--cream); }
.sec-beige { background: var(--beige); }
.sec-label {
  display: flex; align-items: center; gap: 18px; justify-content: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.sec-label h2 {
  margin: 0; font-size: 13px; font-weight: 600;
  letter-spacing: var(--ls); white-space: nowrap; text-align: center;
}
.sec-label-start { justify-content: flex-start; margin-bottom: 22px; }
.rule { height: 1px; background: var(--cocoa); flex: 0 1 90px; }
.rule-long { flex: 0 1 140px; }
.js .rule.in { transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out); }

/* ---------- types ---------- */
.types-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 1px solid var(--cocoa);
}
.types-grid figure {
  margin: 0; padding: clamp(20px, 3vw, 36px) 16px;
  border: 1px dotted var(--tan);
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.types-grid img { width: 110px; height: 110px; transition: transform 320ms var(--ease-out); }
@media (hover: hover) {
  .types-grid figure:hover img { transform: translateY(-6px) rotate(6deg); }
  .types-grid figure[data-tilt="-"]:hover img { transform: translateY(-6px) rotate(-6deg); }
}
.type-name { font-size: 12px; font-weight: 600; letter-spacing: var(--ls); }
.type-line { font-size: 1rem; color: var(--cocoa-60); margin-top: 4px; }

/* ---------- picker ---------- */
.picker .sec-label { margin-bottom: 10px; }
.picker-script {
  text-align: center; margin: 0 0 clamp(28px, 4vw, 44px);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--cocoa-60);
}
.picker-body { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.size-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.size-label { font-size: 12px; letter-spacing: var(--ls); color: var(--cocoa-60); }
.seg { display: inline-flex; border: 1px solid var(--cocoa); border-radius: 3px; overflow: hidden; }
.seg button {
  min-width: 64px; min-height: 48px; border: none; cursor: pointer;
  font-size: 1.3rem; background: var(--lift); color: var(--cocoa);
  transition: background 220ms ease, color 220ms ease;
}
.seg button + button { border-inline-start: 1px solid var(--cocoa); }
.seg button[aria-checked="true"] { background: var(--cocoa); color: var(--lift); }

.comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.comp-card {
  text-align: start; cursor: pointer; background: transparent;
  border: 1px solid var(--tan); border-radius: 4px; padding: 22px;
  transition: background 220ms ease, border-color 220ms ease; min-height: 44px;
}
.comp-card[aria-pressed="true"] { background: var(--lift); border-color: var(--cocoa); }
.comp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.comp-title { font-size: 13px; font-weight: 600; letter-spacing: var(--ls); }
.badge {
  font-size: 11px; letter-spacing: 0.06em; background: var(--tan);
  border-radius: 3px; padding: 3px 8px; white-space: nowrap;
}
.comp-note { margin: 10px 0 0; color: var(--cocoa-60); font-size: 1rem; }
.comp-rows { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.comp-rows li {
  display: flex; justify-content: space-between; gap: 12px;
  border-bottom: 1px dotted var(--tan); padding-bottom: 5px; font-size: 1rem;
}
.comp-rows li span:last-child { color: var(--cocoa-60); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chips[hidden] { display: none; }
.chips button {
  min-height: 44px; padding: 10px 18px; cursor: pointer; border-radius: 3px;
  font-size: 1rem; letter-spacing: 0.04em;
  background: var(--lift); color: var(--cocoa); border: 1px solid var(--tan);
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}
.chips button:hover { border-color: var(--cocoa); }
.chips button[aria-pressed="true"] { background: var(--cocoa); color: var(--lift); border-color: var(--cocoa); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; }
.price-chip {
  background: var(--tan); border-radius: 3px; padding: 10px 22px;
  min-width: 120px; text-align: center; font-size: 1.25rem;
}
.price-chip span { display: inline-block; animation: priceIn 220ms ease both; }
.hint { margin: -10px 0 0; text-align: center; color: var(--cocoa-60); font-size: 0.95rem; font-style: italic; }
.hint[hidden] { display: none; }

/* ---------- what's inside ---------- */
.inside-grid {
  max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 3vw, 36px); align-items: start;
}
.box-card {
  border: 1px solid var(--cocoa); border-radius: 4px; overflow: hidden;
  background: var(--lift); transition: transform 320ms var(--ease-out);
}
@media (hover: hover) { .box-card:hover { transform: translateY(-4px); } }
.box-head {
  background: var(--cocoa); color: var(--lift); padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 12px; letter-spacing: var(--ls);
}
.box-price { font-size: 1.1rem; letter-spacing: normal; }
.js .box-price[data-reveal] { transform: translateY(10px); }
.box-body { padding: 22px; }
.box-window {
  display: grid; gap: 12px; justify-items: center;
  border: 1px dotted var(--cocoa-60); border-radius: 3px; padding: 18px;
  background: var(--cream);
}
.box-window-6 { grid-template-columns: repeat(3, 1fr); }
.box-window-12 { grid-template-columns: repeat(4, 1fr); }
.box-window .cell { width: 56px; height: 56px; background-size: contain; background-repeat: no-repeat; }
.box-window-12 .cell { width: 46px; height: 46px; }
.js .box-window .cell[data-reveal] { transform: var(--scatter, translateY(20px)); }
.js .box-window .cell[data-reveal].in { transform: none; }
.guide-rows { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.guide-rows li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 1px dotted var(--tan); padding-bottom: 6px;
}
.js .guide-rows li[data-reveal] { transform: translateY(10px); }
.guide-rows .g-name { font-size: 1.05rem; }
.guide-rows .g-chip {
  font-size: 11px; letter-spacing: 0.14em; background: var(--tan);
  border-radius: 3px; padding: 3px 8px; white-space: nowrap;
}
.one-type-note { max-width: 980px; margin: 26px auto 0; text-align: center; color: var(--cocoa-60); font-size: 1rem; }

/* ---------- delivery & pickup ---------- */
.fulfil-grid { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; }
.fulfil-col {
  padding: 8px clamp(20px, 4vw, 44px);
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.fulfil-delivery { border-inline-end: 1px solid var(--tan); }
.fulfil-col h3 { margin: 0; font-size: 12px; letter-spacing: var(--ls); font-weight: 600; }
.slot {
  background: var(--tan); border-radius: 3px; padding: 6px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem;
}
.fulfil-ask { text-align: center; margin: 36px 0 0; }
.fulfil-ask a { font-size: 14px; letter-spacing: var(--ls); text-underline-offset: 6px; }
@media (max-width: 767px) {
  .fulfil-grid { grid-template-columns: 1fr; gap: 28px; }
  .fulfil-delivery { border-inline-end: none; border-block-end: 1px solid var(--tan); padding-block-end: 28px; }
}

/* ---------- story ---------- */
.story-grid {
  max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.story-body { margin: 0; max-width: 62ch; font-size: 1.2rem; }
.story-sign { margin: 16px 0 0; font-size: 1.7rem; color: var(--cocoa-60); }
html[lang="ar"] .story-sign { font-family: var(--font-script); font-style: normal; } /* brand sign-off stays Latin script */

/* ---------- photo placeholders ---------- */
.ph {
  margin: 0; border: 1px solid var(--cocoa); border-radius: 4px;
  background: repeating-linear-gradient(45deg, var(--cream) 0 10px, var(--lift) 10px 20px);
  display: flex; align-items: center; justify-content: center;
}
.ph figcaption {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem;
  color: var(--cocoa-60); background: var(--lift);
  border: 1px dotted var(--cocoa-60); padding: 6px 12px; border-radius: 3px;
}
.ph-baker { aspect-ratio: 4 / 5; max-width: 380px; justify-self: center; width: 100%; }
.ph-ig {
  aspect-ratio: 1; border-color: var(--tan);
  background: repeating-linear-gradient(45deg, var(--beige) 0 9px, var(--cream) 9px 18px);
}
.ph-ig figcaption { font-size: 0.7rem; border: none; background: none; }

/* ---------- instagram strip ---------- */
.ig { padding: clamp(48px, 7vw, 80px) clamp(16px, 5vw, 64px); }
.ig-inner { max-width: 980px; margin: 0 auto; }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ig-link { text-align: center; margin: 22px 0 0; }
.ig-link a { letter-spacing: 0.12em; font-size: 1rem; text-underline-offset: 6px; }

/* ---------- footer ---------- */
.site-foot {
  position: relative; z-index: 1; background: var(--cocoa); color: var(--lift);
  padding: clamp(56px, 8vw, 90px) clamp(16px, 5vw, 64px); text-align: center;
}
.foot-deer { width: 92px; margin-bottom: 18px; animation: floaty 5s ease-in-out infinite; }
.foot-sign { margin: 0; font-size: clamp(1rem, 2.6vw, 1.4rem); letter-spacing: 0.24em; text-indent: 0.24em; }
.foot-sign em { font-style: italic; letter-spacing: 0.24em; }
.foot-links {
  margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 34px; font-size: 1rem;
}
.foot-links a { color: var(--cream); text-underline-offset: 5px; }
.foot-links a:hover { color: var(--lift); }

/* ---------- WhatsApp FAB (the page's single shadow) ---------- */
.fab {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: var(--cocoa);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.9); pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  box-shadow: 0 6px 18px rgba(52, 34, 14, 0.25);
}
.fab.on { opacity: 1; transform: scale(1); pointer-events: auto; animation: fabPulse 900ms ease 600ms 2; }

/* ---------- keyframes ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes priceIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fabPulse { 50% { transform: scale(1.03); } }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes heroCookie { to { transform: translateY(140px) rotate(24deg) scale(0.94); opacity: 0.3; } }
@keyframes heroFade { to { transform: translateY(-48px); opacity: 0; } }
@keyframes crumbDrift { to { transform: translateY(-12px); } }
@keyframes driftA { to { transform: translateY(-180px) rotate(3deg); } }
@keyframes driftB { to { transform: translateY(-320px) rotate(-4deg); } }
@keyframes driftC { to { transform: translateY(-90px) rotate(2deg); } }
@keyframes driftD { to { transform: translateY(-240px) rotate(-2deg); } }
@keyframes driftE { to { transform: translateY(-140px) rotate(4deg); } }

/* ---------- scroll-driven animation (progressive enhancement ONLY)
     Guarded so browsers without animation-timeline never see fill:both
     zero-duration animations snap to their end state (invisible hero). */
.ambient { display: none; }
@supports (animation-timeline: scroll()) {
  .hero-cookie {
    animation: heroCookie linear both;
    animation-timeline: scroll();
    animation-range: 0 100vh;
  }
  .hero-inner {
    animation: heroFade linear both;
    animation-timeline: scroll();
    animation-range: 0 90vh;
  }
  .crumb { animation: crumbDrift linear both; animation-timeline: scroll(); }
  .crumb-1 { animation-range: 0 700px; }
  .crumb-2 { animation-range: 0 500px; }
  .crumb-3 { animation-range: 0 900px; }
  .crumb-4 { animation-range: 0 600px; }

  @media (min-width: 768px) {
    .ambient { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
    .amb { position: absolute; animation: driftA linear both; animation-timeline: scroll(); }
    .amb-a { top: 110vh; inset-inline-start: -70px; width: 200px; opacity: 0.35; }
    .amb-b { top: 230vh; inset-inline-end: -90px; width: 260px; opacity: 0.30; animation-name: driftB; }
    .amb-c { top: 340vh; inset-inline-start: -40px; width: 120px; opacity: 0.35; animation-name: driftC; }
    .amb-d { top: 430vh; inset-inline-end: -50px; width: 160px; opacity: 0.30; animation-name: driftD; }
    .amb-e { top: 520vh; inset-inline-start: -30px; width: 90px; opacity: 0.35; animation-name: driftE; }
  }
}

/* ---------- reduced motion: single-state calm ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  .ambient { display: none !important; }
  .hero-cookie, .hero-inner, .crumb { animation: none; }
}
