/* ═══════════════════════════════════════════════════════════════
   Libi's Sweet — 2026 design system
   Dark editorial canvas, drawn from the brand's own logo palette.
   ═══════════════════════════════════════════════════════════════ */

@import url('img/media.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── palette — every fill/foreground pairing below is contrast-checked ── */
  --ink:        #1C1A19;   /* canvas */
  --ink-2:      #232323;   /* logo field, cards */
  --ink-3:      #2E2A28;   /* raised surfaces */
  --coral:      #EBA391;   /* primary accent — 8.40:1 on --ink */
  --coral-deep: #D97D66;   /* hover — 5.84:1 on --ink */
  --cocoa:      #593320;   /* decorative only — 1.62:1 on --ink. Never text/icon/border/ring. */
  --cream:      #FDF6EF;   /* body text on dark */
  --sand:       #E8D9CB;   /* muted text on dark */
  --wa-green:   #25D366;   /* icon-only float, never a text fill */

  /* binding rule: any --coral / --coral-deep FILL takes --ink as its foreground */
  --on-coral:   var(--ink);

  --shadow-sm: 0 2px 14px rgba(0,0,0,.28);
  --shadow-md: 0 8px 32px rgba(0,0,0,.34);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.42);

  --radius:    18px;
  --radius-sm: 12px;

  --font-serif: 'Frank Ruhl Libre', Georgia, serif;
  --font-sans:  'Assistant', system-ui, sans-serif;

  --ease: cubic-bezier(.22,1,.36,1);
  --fast: .2s ease;
  --med:  .4s var(--ease);

  --photo-frame-bg: var(--ink-2);

  /* the ONLY fluid font-size in the system — everything else is rem/em so the
     a11y widget scales every element by the exact factor requested, instead
     of being partly absorbed by a vw term. --a11y-scale is a multiplier
     (not a `%` override) precisely so it always multiplies whatever this
     fluid baseline currently is, instead of fighting it against the
     unrelated UA-default base that a root `font-size: N%` would resolve
     against. */
  --a11y-scale: 1;
  font-size: calc(clamp(100%, 0.9rem + 0.4vw, 118%) * var(--a11y-scale));

  --header-h: 4.5rem;   /* overwritten by a ResizeObserver in app.js */
  --banner-h: 0px;      /* overwritten while the cookie banner is visible */

  scroll-padding-block-start: calc(var(--header-h) + 1rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* `hidden` (unlike `clip`) makes body a scroll container, which breaks
     position:sticky for every descendant — sticky needs its nearest such
     ancestor to be the real, viewport-scrolling one. `clip` still stops
     horizontal overflow without creating that container. Keep `hidden`
     first as a fallback for browsers predating `clip` support (~2022);
     the later declaration wins wherever both are understood. */
  overflow-x: hidden;
  overflow-x: clip;
}

img, picture { display: block; max-width: 100%; }
picture img { width: 100%; height: 100%; object-fit: cover; }

a { color: inherit; }

::selection { background: var(--coral); color: var(--ink); }

/* ── one motion gate, readable by CSS and JS ──────────────────────
   .a11y-no-motion is kept as an alias so the existing localStorage-driven
   class from the accessibility widget still works without a script change. */
html[data-motion="off"], html[data-motion="off"] *,
html[data-motion="off"] *::before, html[data-motion="off"] *::after,
html[data-motion="off"] *::backdrop,
html.a11y-no-motion, html.a11y-no-motion *,
html.a11y-no-motion *::before, html.a11y-no-motion *::after {
  animation: none !important;
  transition: none !important;
}
html[data-motion="off"], html.a11y-no-motion { scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ── focus ── */
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── skip link ── */
.skip-link {
  position: fixed;
  top: -100%;
  inset-inline-start: 1rem;
  z-index: 9999;
  background: var(--coral);
  color: var(--ink);
  font-weight: 700;
  padding: .8rem 1.4rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--fast);
}
.skip-link:focus { top: 1rem; }

/* ── container ── */
.container {
  width: 92%;
  max-width: 1240px;
  margin-inline: auto;
}

/* ── eyebrow — Hebrew gets no uppercase/letterspacing; those destroy word
   cohesion in Hebrew. Differentiate with weight + color + a small rule. ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: .75rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
}
[dir="rtl"] .eyebrow { flex-direction: row-reverse; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.9rem;   /* rem-only: sizes below vary by breakpoint, never by vw,
                          so the a11y text-size control scales every step exactly */
  color: var(--cream);
  margin-bottom: .6rem;
}
@media (min-width: 640px)  { .section-title { font-size: 2.3rem; } }
@media (min-width: 1024px) { .section-title { font-size: 2.9rem; } }
.section-subtitle { color: var(--sand); font-size: 1rem; max-width: 46ch; margin-inline: auto; }

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast), color var(--fast);
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  background: var(--coral);
  color: var(--on-coral);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--coral-deep); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(253,246,239,.35);
}
.btn-outline:hover { border-color: var(--coral); color: var(--coral); }

.btn-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-instagram:hover { opacity: .9; box-shadow: var(--shadow-md); }

.btn-large { padding: 1.1rem 2.6rem; font-size: 1.05rem; }
.btn-full  { width: 100%; justify-content: center; }

/* ── header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(253,246,239,.08);
  padding-block: 1.1rem;
  transition: padding-block var(--fast);
}
.header.shrink { padding-block: .6rem; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link { display: flex; align-items: center; text-decoration: none; }
.brand-mark {
  height: 2.6rem;
  width: auto;
  transition: height var(--fast);
}
.header.shrink .brand-mark { height: 2.1rem; }

.nav { display: flex; gap: 2rem; }
.nav a {
  text-decoration: none;
  color: var(--sand);
  font-size: .92rem;
  font-weight: 600;
  position: relative;
  padding-block: .3rem;
  transition: color var(--fast);
}
.nav a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transition: transform var(--fast);
}
.nav a:hover, .nav a.active { color: var(--cream); }
.nav a.active::after { transform: scaleX(1); }

.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--cream);
  padding: .25rem;
  line-height: 1;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--ink-2);
  padding: .5rem 1rem 1rem;
  gap: .25rem;
  border-bottom: 1px solid rgba(253,246,239,.08);
  position: sticky;
  top: var(--header-h);
  z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  color: var(--cream);
  font-size: 1rem;
  font-weight: 600;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  transition: background var(--fast);
}
.mobile-nav a:hover { background: var(--ink-3); }

/* ── photo frame — shared by hero / marquee / category / gallery / lightbox.
   No photo bleeds directly onto --ink; the vignette suppresses stray
   background (parking lots, tree canopy) at the frame edge. ── */
.photo-frame {
  position: relative;
  background: var(--photo-frame-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(232,217,203,.08);
}
.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px rgba(0,0,0,.35);
  pointer-events: none;
}
.photo-frame picture, .photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* blur-up: --lqip is stamped per photo by build-assets.py via media.css */
.gallery-item picture {
  background-image: var(--lqip);
  background-size: cover;
  background-position: center;
}

/* ── hero ── */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vh, 6rem) 4rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--coral) 30%, transparent), transparent 70%) 78% 12% / 55% 55% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--coral-deep) 22%, transparent), transparent 70%) 15% 82% / 45% 45% no-repeat;
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('img/grain-128.webp');
  background-repeat: repeat;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  text-align: center;
}

.hero-copy { max-width: 640px; margin-inline: auto; }
.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.4rem;   /* rem-only — see .section-title comment */
  line-height: 1.12;
  color: var(--cream);
  margin-bottom: 1.1rem;
}
@media (min-width: 640px)  { .hero-title { font-size: 3.2rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4.1rem; } }
.hero-title em { font-style: italic; color: var(--coral); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--sand);
  max-width: 42ch;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(320px, 52vw, 480px);
}

/* arch mask: rounded doorway shape over the rotating cake photo */
.hero-arch {
  position: relative;
  width: min(78vw, 320px);
  height: 100%;
  border-radius: 160px 160px 20px 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(253,246,239,.1);
  background: var(--photo-frame-bg);
  z-index: 2;
}
.hero-arch picture, .hero-arch img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}
.hero-arch picture.active, .hero-arch img.active { opacity: 1; }
.hero-arch .hero-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  padding: 1.4rem 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: .95rem;
  text-align: center;
}

.hero-side {
  position: absolute;
  width: clamp(84px, 15vw, 130px);
  aspect-ratio: .8;
  border-radius: 90px 90px 14px 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(253,246,239,.1);
  background: var(--photo-frame-bg);
  z-index: 1;
}
.hero-side img { width: 100%; height: 100%; object-fit: cover; }
.hero-side.left  { inset-inline-start: 2%; top: 12%; transform: rotate(-6deg); }
.hero-side.right { inset-inline-end: 2%; bottom: 10%; transform: rotate(5deg); }

html[data-motion="off"] .hero-side { transform: none; }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; text-align: start; }
  .hero-copy { margin-inline: 0; text-align: start; }
  .hero-subtitle { margin-inline-start: 0; }
  .hero-actions { justify-content: flex-start; }
  [dir="rtl"] .hero-grid { direction: rtl; }
}

/* ── marquee — 5 photos not used elsewhere, repeated enough times (by the
   inline script right after #marqueeTrack in index.html) to always exceed
   the viewport width, however wide it is ── */
.marquee-section { padding-block: 1.5rem; overflow: hidden; }
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  /* --marquee-shift is set by that inline script to the real measured
     pixel width of one set. A percentage here can't work in general: it's
     only exactly "one set's width" when the track holds precisely 2 sets,
     but the set count is now dynamic (as many as the viewport needs). */
  animation: marquee-scroll 32s linear infinite;
}
.marquee-section:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  width: clamp(110px, 16vw, 170px);
  aspect-ratio: .8;
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--marquee-shift, 920px))); }
}
[dir="rtl"] .marquee-track { animation-name: marquee-scroll-rtl; }
@keyframes marquee-scroll-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--marquee-shift, 920px)); }
}

/* ── why-us ── */
.why-section { padding-block: 5rem; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.why-card {
  background: var(--ink-2);
  border: 1px solid rgba(253,246,239,.06);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform var(--fast), border-color var(--fast);
}
.why-card:hover { transform: translateY(-4px); border-color: rgba(235,163,145,.3); }
.why-icon {
  width: 3rem; height: 3rem;
  margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--coral) 16%, transparent);
  color: var(--coral);
}
.why-icon svg { width: 1.5rem; height: 1.5rem; }
.why-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: .5rem;
  color: var(--cream);
}
.why-card p { color: var(--sand); font-size: .92rem; }

/* ── categories ── */
.categories-section { padding-block: 5rem; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem;
}
.category-card {
  position: relative;
  aspect-ratio: .85;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
  background: var(--photo-frame-bg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--fast), box-shadow var(--fast);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.category-card:hover img { transform: scale(1.06); }
.category-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
}
.category-label {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: 1rem .75rem;
  color: var(--cream);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

/* ── gallery — CSS-grid masonry (not `columns`, which orphans low-count
   filters at 4-column width) ── */
.gallery-section { padding-block: 5rem; }

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: .55rem 1.3rem;
  border-radius: 50px;
  border: 1.5px solid rgba(253,246,239,.18);
  background: transparent;
  color: var(--sand);
  font-family: var(--font-sans);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.filter-btn:hover { border-color: var(--coral); color: var(--coral); }
.filter-btn.active { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.filter-count { opacity: .7; font-size: .82em; margin-inline-start: .3em; }

.gallery-empty-note {
  text-align: center;
  color: var(--sand);
  font-size: .9rem;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}
.gallery-empty-note a { color: var(--coral); text-decoration: underline; }

/* A uniform grid, not variable-ratio masonry: 11 of 13 photos already share
   an identical 3:4 ratio, so true masonry (each tile its own intrinsic
   ratio) only had 1-2 outliers to work with — auto-placement drops each
   outlier into a single column, desyncing just that column's rhythm from
   the other three, which reads as a broken layout rather than organic
   variety. --gallery-ar is the DOMINANT ratio among the photos (computed by
   build-assets.py, not hardcoded), so the ~10 already-3:4 photos render
   completely uncropped and only the couple of true outliers get a mild
   crop to match — nowhere near the original all-forced-to-square bug this
   replaced, and the full uncropped photo still shows in the lightbox. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 42vw, 260px), 1fr));
  gap: 14px;
  justify-content: center;
}
.gallery-item {
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: start;
  width: 100%;
  display: block;
  background: none;
}
.gallery-item picture {
  width: 100%;
  aspect-ratio: var(--gallery-ar, 3/4);
  height: auto;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-item-label {
  padding-block: .6rem .2rem;
  font-family: var(--font-serif);
  font-size: .95rem;
  color: var(--cream);
}
.gallery-item-chip {
  display: inline-block;
  margin-top: .3rem;
  padding: .15rem .7rem;
  border-radius: 50px;
  background: color-mix(in srgb, var(--coral) 18%, transparent);
  color: var(--coral);
  font-size: .72rem;
  font-weight: 700;
}

.gallery-item.hidden { display: none; }
.gallery-item.fade-out { opacity: 0; transform: scale(.96); pointer-events: none; }
.gallery-item { transition: opacity var(--med), transform var(--med); }

.gallery-cta { text-align: center; margin-top: 3rem; }

/* ── lightbox — native <dialog> ── */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  margin: 0;
}
.lightbox::backdrop {
  background: rgba(10,9,8,.92);
  backdrop-filter: blur(6px);
}
.lightbox-inner {
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: .9rem;
  position: relative;
}
.lb-img-wrap {
  max-width: min(92vw, 900px);
  max-height: 70dvh;
  max-height: 70vh;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lb-img {
  max-width: 100%;
  max-height: 70dvh;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity var(--fast);
}
.lb-img.loading { opacity: 0; }

.lb-meta { text-align: center; color: var(--cream); }
.lb-meta .label { font-family: var(--font-serif); font-size: 1.1rem; }
.lb-meta .chip {
  display: inline-block;
  margin-top: .4rem;
  padding: .2rem .8rem;
  border-radius: 50px;
  background: color-mix(in srgb, var(--coral) 20%, transparent);
  color: var(--coral);
  font-size: .78rem;
  font-weight: 700;
}
.lb-counter { color: rgba(253,246,239,.55); font-size: .82rem; margin-top: .3rem; }

.lb-order-cta {
  margin-top: .4rem;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(253,246,239,.1);
  border: none;
  color: var(--cream);
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: background var(--fast), transform var(--fast);
  backdrop-filter: blur(6px);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(253,246,239,.22); transform: scale(1.08); }
.lb-close { top: 1.25rem; inset-inline-start: 1.25rem; }
.lb-prev  { top: 50%; transform: translateY(-50%); inset-inline-end: 1.25rem; }
.lb-next  { top: 50%; transform: translateY(-50%); inset-inline-start: 1.25rem; }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }
/* chevrons are drawn pointing the correct on-screen direction already;
   they must NOT auto-mirror the way Bidi_Mirrored characters (‹ ›) do */
.lb-prev svg, .lb-next svg { width: 22px; height: 22px; }

/* ── about ── */
.about-section { padding-block: 5rem; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.about-photo { aspect-ratio: 4/5; max-width: 420px; margin-inline: auto; }
.about-copy p { color: var(--sand); margin-bottom: 1rem; max-width: 56ch; }
.about-copy .location { color: var(--coral); font-weight: 700; }
@media (min-width: 860px) {
  .about-grid { grid-template-columns: .8fr 1.2fr; }
}

/* placeholder copy is hidden, never shipped visible, on a live indexed domain */
[data-todo] { display: none !important; }

/* ── process ── */
.process-section { padding-block: 5rem; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}
.process-step { text-align: center; position: relative; }
.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem; height: 2.6rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1.5px solid var(--coral);
  color: var(--coral);
  font-family: var(--font-serif);
  font-weight: 700;
}
.process-step h3 { font-family: var(--font-serif); font-size: 1.05rem; margin-bottom: .4rem; color: var(--cream); }
.process-step p { color: var(--sand); font-size: .88rem; }

/* ── order ── */
.order-section { padding-block: 5rem; }
.order-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 980px;
  margin-inline: auto;
}
.order-card {
  width: 100%;
  background: var(--ink-2);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(253,246,239,.06);
}
.order-desc { color: var(--sand); margin-bottom: 1.5rem; }

/* ── order inspiration card — playful companion beside the form ── */
.order-inspire {
  /* position:relative here (not sticky) is deliberate: at this width the
     grid is single-column, so the card and the form are separate full-width
     rows, not side-by-side — sticky would make it float over unrelated
     page content while you scroll past the form, rather than tagging along
     beside it. Sticky is scoped to the >=900px breakpoint below, where the
     two actually share a row. relative still anchors the absolute badge. */
  position: relative;
  background: var(--ink-2);
  border-radius: var(--radius);
  padding: 1.8rem;
  border: 1px solid rgba(253,246,239,.06);
  text-align: center;
}
.order-inspire .eyebrow { justify-content: center; margin-bottom: .3rem; }
.order-inspire h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 1.2rem;
}
.inspire-badge {
  position: absolute;
  top: -.9rem;
  inset-inline-end: 1.6rem;
  font-size: 1.8rem;
  filter: drop-shadow(0 4px 10px rgba(235,163,145,.35));
  animation: inspire-sparkle 3.2s ease-in-out infinite;
}
@keyframes inspire-sparkle {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%      { transform: rotate(8deg) scale(1.12); }
}
.inspire-card {
  position: relative;
  aspect-ratio: .8;
  margin-bottom: 1.4rem;
  transition: transform var(--med);
}
.order-inspire:hover .inspire-card { transform: rotate(-1deg) scale(1.015); }
.inspire-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
}
.inspire-card img.active { opacity: 1; }
.inspire-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: 1rem .75rem .8rem;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: .95rem;
}

@media (min-width: 900px) {
  .order-layout { grid-template-columns: 1.2fr .8fr; }
  .order-inspire {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.order-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .84rem; font-weight: 700; color: var(--cream); }
.label-optional { font-weight: 400; color: var(--sand); }

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: .65rem .95rem;
  border: 1.5px solid rgba(253,246,239,.16);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .92rem;
  color: var(--cream);
  background: var(--ink);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.form-group textarea { resize: vertical; min-height: 80px; }
/* Hebrew form, Latin-content fields: scoped LTR, not a blanket rule */
.form-group input[type="tel"], .form-group input[type="date"] { direction: ltr; text-align: end; }

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 22%, transparent);
}
.form-group input.invalid, .form-group select.invalid, .form-group textarea.invalid {
  border-color: #e57373;
  box-shadow: 0 0 0 3px rgba(229,115,115,.15);
}
.field-error {
  display: none;
  color: #e57373;
  font-size: .78rem;
}
.field-error.show { display: block; }

/* event type radio-chips */
.chip-group { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip-group input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-group label {
  padding: .5rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid rgba(253,246,239,.16);
  background: var(--ink);
  color: var(--sand);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}
.chip-group input:checked + label { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.chip-group input:focus-visible + label { outline: 2px solid var(--coral); outline-offset: 2px; }

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem 1rem;
  border: 1.5px dashed rgba(253,246,239,.25);
  border-radius: var(--radius-sm);
  background: var(--ink);
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast);
  text-align: center;
  position: relative;
}
.upload-area:hover, .upload-area:focus-within { border-color: var(--coral); background: var(--ink-3); }
.upload-area.has-file { border-style: solid; border-color: var(--coral); }
.upload-area input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 2rem; height: 2rem; color: var(--coral); }
.upload-text { font-size: .92rem; font-weight: 700; color: var(--cream); }
.upload-sub { font-size: .78rem; color: var(--sand); }
.upload-thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: none;
}
.upload-area.has-file .upload-thumb { display: block; }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* success panel */
.order-success {
  display: none;
  text-align: center;
  padding: 2rem 1.2rem;
}
.order-success.show { display: block; }
.order-success .icon { font-size: 2.6rem; margin-bottom: .8rem; }
.order-success h3 { font-family: var(--font-serif); color: var(--cream); margin-bottom: .5rem; }
.order-success p { color: var(--sand); margin-bottom: 1.2rem; }

/* ── FAQ ── */
.faq-section { padding-block: 5rem; }
.faq-list { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: .7rem; }
.faq-item {
  background: var(--ink-2);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(253,246,239,.06);
  overflow: hidden;
}
.faq-item summary {
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--cream);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--coral);
  transition: transform var(--fast);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.4rem 1.2rem; color: var(--sand); font-size: .92rem; }

/* ── footer ── */
.footer { background: var(--ink-2); color: var(--cream); padding: 4rem 5% 2.5rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.footer-brand .brand-mark { height: 2.4rem; }
.footer-brand p { color: var(--sand); font-size: .9rem; }
.footer-links { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-size: .9rem; color: var(--sand); transition: color var(--fast); }
.footer-links a:hover { color: var(--coral); }
.footer-icon { width: 18px; height: 18px; }
.footer-copy { color: rgba(253,246,239,.35); font-size: .78rem; padding-top: 1.5rem; border-top: 1px solid rgba(253,246,239,.08); width: 100%; }

/* ── floating layer — split corners; the cookie banner is centred, not
   cornered, so both floats read a measured --banner-h to clear it ── */
.wa-float, .a11y-widget { position: fixed; z-index: 990; }
.wa-float {
  inset-inline-end: 1.6rem;
  bottom: calc(1.6rem + env(safe-area-inset-bottom) + var(--banner-h, 0px));
  width: 3.4rem; height: 3.4rem;
  background: var(--wa-green);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(37,211,102,.4);
  transition: transform var(--fast), box-shadow var(--fast), bottom var(--med);
  animation: wa-pulse 2.8s ease-in-out infinite;
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.1); animation: none; }
.wa-float svg { width: 1.7rem; height: 1.7rem; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(37,211,102,.4); }
  50%      { box-shadow: 0 4px 26px rgba(37,211,102,.6), 0 0 0 9px rgba(37,211,102,.08); }
}

.a11y-widget {
  inset-inline-start: 1.6rem;
  bottom: calc(1.6rem + env(safe-area-inset-bottom) + var(--banner-h, 0px));
  transition: bottom var(--med);
}
.a11y-btn {
  width: 3.4rem; height: 3.4rem;
  border-radius: 50%;
  background: #1565c0;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(21,101,192,.4);
  transition: transform var(--fast);
}
.a11y-btn:hover { transform: scale(1.08); }
.a11y-btn svg { width: 1.8rem; height: 1.8rem; }
.a11y-panel {
  display: none;
  position: absolute;
  bottom: 4rem;
  inset-inline-start: 0;
  width: 210px;
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  color: #222;
}
.a11y-panel.open { display: block; }
.a11y-title { font-size: .82rem; font-weight: 700; color: #1565c0; margin-bottom: .7rem; text-align: center; }
.a11y-opt {
  display: block; width: 100%;
  padding: .5rem .75rem; margin-bottom: .3rem;
  background: #f5f7fa; border: 1.5px solid transparent; border-radius: 7px;
  font-size: .8rem; font-family: var(--font-sans); color: #222;
  cursor: pointer; text-align: start;
  transition: background .15s, border-color .15s;
}
.a11y-opt:hover { background: #e3f2fd; border-color: #1565c0; }
.a11y-opt.active { background: #1565c0; color: #fff; }
.a11y-reset-btn { background: #fce4ec; color: #b71c1c; margin-top: .4rem; }
.a11y-reset-btn:hover { background: #ef9a9a; }

/* ── accessibility state classes, applied to <html> ── */
.a11y-underline-links a { text-decoration: underline !important; }

/* high contrast: token override, not a root filter — a filter on <html>
   would become the containing block for every position:fixed element
   (unpinning the floats) and cannot reach a top-layer <dialog> at all */
html.a11y-high-contrast {
  --ink: #000000;
  --ink-2: #0a0a0a;
  --ink-3: #141414;
  --cream: #ffffff;
  --sand: #ffffff;
  --coral: #ffb199;
  --coral-deep: #ff8f6b;
}
html.a11y-high-contrast .btn-primary,
html.a11y-high-contrast .filter-btn.active,
html.a11y-high-contrast .chip-group input:checked + label {
  outline: 2px solid #000;
}

/* ── cookie banner — centred, not cornered ── */
.cookie-banner {
  position: fixed;
  bottom: -100px;
  inset-inline: 0;
  margin-inline: auto;
  width: min(94vw, 720px);
  background: color-mix(in srgb, var(--ink-2) 92%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(253,246,239,.1);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: .9rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9998;
  transition: bottom var(--med);
  padding-bottom: calc(.9rem + env(safe-area-inset-bottom));
}
.cookie-banner.show { bottom: 1.4rem; }
.cookie-icon { font-size: 1.3rem; flex-shrink: 0; }
.cookie-content { flex: 1; min-width: 0; }
.cookie-content p { font-size: .82rem; color: var(--sand); line-height: 1.5; }
.cookie-link { color: var(--coral); text-decoration: none; border-bottom: 1px solid rgba(235,163,145,.4); }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-btn { padding: .48rem 1.1rem; border-radius: 50px; font-size: .8rem; font-weight: 700; cursor: pointer; border: none; transition: transform .15s; white-space: nowrap; }
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-accept { background: var(--coral); color: var(--on-coral); }
.cookie-decline { background: transparent; color: var(--sand); border: 1.5px solid rgba(253,246,239,.2); }

.cookie-policy-dialog {
  max-width: 480px;
  border: none;
  border-radius: var(--radius);
  padding: 1.8rem;
  background: var(--ink-2);
  color: var(--cream);
}
.cookie-policy-dialog::backdrop { background: rgba(0,0,0,.7); }
.cookie-policy-dialog h3 { font-family: var(--font-serif); margin-bottom: 1rem; }
.cookie-policy-dialog p { color: var(--sand); font-size: .9rem; margin-bottom: .8rem; }

@media (max-width: 560px) {
  .cookie-banner { flex-wrap: wrap; padding: 1rem; bottom: -160px; }
  .cookie-actions { width: 100%; justify-content: flex-end; }
}

/* ── scroll reveal ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── responsive section padding ── */
@media (max-width: 768px) {
  .nav { display: none; }
  .menu-btn { display: block; }
}
