/* ═══════════════════════════════════════════════════════════
   מיכל עוגות מעוצבות — Dark Chocolate Atelier
   Palette: warm near-black chocolate · champagne gold · cream
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0d0906;
  --bg-soft: #171009;
  --surface: rgba(26, 18, 12, 0.72);
  --surface-solid: #1a120c;
  --gold: #d4af7a;
  --gold-bright: #e8cfa0;
  --gold-deep: #a8854f;
  --cream: #f5eee3;
  --muted: #b3a48f;
  --line: rgba(212, 175, 122, 0.25);
  --line-soft: rgba(212, 175, 122, 0.12);
  --font-display: "Frank Ruhl Libre", "David Libre", Georgia, serif;
  --font-body: "Assistant", "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: auto; /* smooth-scroll would fight the scrub lerp */
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--cream);
  background: var(--bg);
  line-height: 1.75; /* Hebrew needs air */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.js body.loading, .js.loading body { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--cream);
}

p { margin: 0 0 1em; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: var(--bg); }

/* Cinematic grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── Fixed video backdrop ───────── */
#hero-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  z-index: -2;
  background: var(--bg);
}

.video-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to bottom,
      rgba(13, 9, 6, 0.55) 0%,
      rgba(13, 9, 6, 0.15) 30%,
      rgba(13, 9, 6, 0.35) 65%,
      rgba(13, 9, 6, 0.88) 100%
    );
}

/* Once past the hero track, deepen the scrim so content stays WCAG-readable */
.past-track .video-scrim {
  background: rgba(13, 9, 6, 0.82);
  transition: background 0.6s ease;
}

/* Video failed → hide it, warm gradient stage instead */
.video-failed #hero-video { display: none; }
.video-failed .video-scrim {
  background:
    radial-gradient(120% 90% at 50% 0%, #241708 0%, var(--bg) 60%),
    var(--bg);
}

/* ───────── Preloader ───────── */
#preloader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.js #preloader { display: flex; }
#preloader.done { opacity: 0; visibility: hidden; }

.preloader-inner { text-align: center; }

.monogram {
  width: 84px;
  height: 84px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
}
.monogram::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
}

.preloader-label {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.preloader-bar {
  width: 180px;
  height: 2px;
  margin: 1.4rem auto 0.6rem;
  background: var(--line-soft);
  overflow: hidden;
  border-radius: 2px;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 0.25s ease;
}
.preloader-bar.indeterminate span {
  width: 40%;
  animation: shimmer 1.2s ease-in-out infinite alternate;
}
@keyframes shimmer {
  from { transform: translateX(220%); }
  to   { transform: translateX(-80%); }
}

.preloader-pct {
  font-size: 0.85rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-height: 1.4em;
}

.preloader-skip {
  margin-top: 1.2rem;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.45rem 1.4rem;
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.preloader-skip:hover { color: var(--cream); border-color: var(--gold); }

/* ───────── Header ───────── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  transition: background 0.45s ease, box-shadow 0.45s ease, backdrop-filter 0.45s ease;
}
.site-header.solid {
  background: rgba(13, 9, 6, 0.78);
  box-shadow: 0 1px 0 var(--line-soft);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header.solid { backdrop-filter: blur(14px); background: rgba(13, 9, 6, 0.55); }
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.brand:hover { color: var(--gold-bright); }
.brand-sep { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.header-link { font-size: 0.95rem; color: var(--muted); }
.header-link:hover { color: var(--cream); }

.header-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.4rem 1.1rem;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.header-cta:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }

/* ───────── Hero track (scrollytelling) ───────── */
#hero-track {
  position: relative;
  height: 100vh;
  height: 100svh;
}
.js #hero-track {
  height: 400vh;
  height: 400svh;
}
.js.video-failed #hero-track,
.js.reduced-motion #hero-track {
  height: 100vh;
  height: 100svh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-caption {
  grid-area: 1 / 1;
  text-align: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  max-width: 60rem;
  will-change: opacity, transform;
}

/* Caption B hidden until the scrub drives it; without JS it's removed entirely */
.js #caption-b { opacity: 0; pointer-events: none; }
html:not(.js) #caption-b { display: none; }
html:not(.js) .scroll-cue { display: none; }
.js.video-failed #caption-b, .js.reduced-motion #caption-b { display: none; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

#caption-a h1 {
  font-weight: 900;
  font-size: clamp(2.2rem, 6.5vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 0.4em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--cream);
  max-width: 42rem;
  margin-inline: auto;
}
.hero-sub-2 {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 38rem;
  margin-inline: auto;
}

.hero-cta-row {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.4rem;
}

.rating-badge {
  font-size: 0.95rem;
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.45rem 1.1rem;
  background: rgba(13, 9, 6, 0.45);
}

.hero-caption-mid .mid-line {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.6vw, 2.4rem);
  color: var(--cream);
  margin: 0;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.hero-caption-mid .mid-line-strong {
  font-weight: 900;
  color: var(--gold-bright);
  margin-top: 0.3em;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  transition: opacity 0.5s ease;
}
.scroll-cue.hidden { opacity: 0; }
.chevron {
  width: 12px;
  height: 12px;
  border-inline-end: 1px solid var(--gold);
  border-block-end: 1px solid var(--gold);
  transform: rotate(45deg);
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50%      { transform: rotate(45deg) translate(5px, 5px); opacity: 0.4; }
}

/* ───────── Buttons ───────── */
.btn-gold {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  border: none;
  border-radius: 99px;
  padding: 0.85rem 2.1rem;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(212, 175, 122, 0.45);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), filter 0.25s;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -10px rgba(212, 175, 122, 0.6);
  filter: brightness(1.06);
  color: var(--bg);
}
.btn-gold:active { transform: translateY(0); }

/* ───────── Sections & cards ───────── */
main { position: relative; z-index: 1; }

.section {
  padding: clamp(3.5rem, 9vh, 7rem) clamp(1.1rem, 5vw, 2.5rem);
  max-width: 72rem;
  margin-inline: auto;
}

.glass-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--shadow-card);
}
@supports (backdrop-filter: blur(1px)) {
  .glass-card { backdrop-filter: blur(14px); }
}

#about .glass-card { max-width: 46rem; margin-inline: auto; }
#about h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
#about p { color: var(--muted); font-size: 1.05rem; }
#about .about-closer {
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0;
}

.gold-rule {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.2rem 0 1.6rem;
  position: relative;
}
.gold-rule::after {
  content: "";
  position: absolute;
  top: -3px;
  inset-inline-start: calc(50% - 3px);
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.section-head { text-align: center; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.section-head .gold-rule { margin-inline: auto; }
#about .gold-rule { margin-inline: 0; }

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1.35rem; color: var(--gold-bright); }
.product-card p { color: var(--muted); flex: 1; }

.card-num {
  position: absolute;
  top: -1.4rem;
  inset-inline-end: 0.4rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 7rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-soft);
  pointer-events: none;
  user-select: none;
}

.card-link {
  font-weight: 700;
  color: var(--gold);
  transition: color 0.2s;
}
.card-link:hover { color: var(--gold-bright); }

.products-extra {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2.2rem;
}

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  padding: 1.6rem clamp(1.1rem, 5vw, 2.5rem);
  border-block: 1px solid var(--line-soft);
  max-width: 72rem;
  margin-inline: auto;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.trust-item strong { color: var(--cream); font-size: 1.05rem; }
a.trust-item:hover strong { color: var(--gold-bright); }
.trust-divider { width: 1px; height: 34px; background: var(--line-soft); }

/* ───────── Form ───────── */
.form-card { max-width: 46rem; margin-inline: auto; }
.form-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.form-sub { color: var(--muted); }

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: rgba(13, 9, 6, 0.55);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(179, 164, 143, 0.6); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 122, 0.15);
}
.field select { appearance: none; cursor: pointer; }
.field input[aria-invalid="true"] { border-color: #c96f5e; }
.field-error { color: #e8a294; font-size: 0.85rem; margin: 0.35rem 0 0; }

.field input[type="date"] { color-scheme: dark; }
textarea { resize: vertical; min-height: 96px; }

.btn-submit { width: 100%; margin-top: 0.4rem; }

.privacy-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.9rem 0 0;
}

.nojs-contact {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.8rem 0 0;
}
.js .nojs-contact { display: none; }

.form-thanks { text-align: center; padding: 1rem 0; }
.thanks-emoji { font-size: 3rem; line-height: 1; margin-bottom: 0.6rem; }
.form-thanks h3 { font-size: 1.8rem; color: var(--gold-bright); }
.form-thanks p { color: var(--muted); margin-bottom: 1.4rem; }

/* ───────── Footer ───────── */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(to bottom, transparent, rgba(13, 9, 6, 0.6));
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1.1rem, 5vw, 2.5rem) 1.6rem;
  text-align: center;
}
.monogram-sm { width: 56px; height: 56px; font-size: 1.6rem; }
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0.9rem 0 0.2rem;
}
.footer-tag { color: var(--muted); font-size: 0.9rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  max-width: 56rem;
  margin: 2.2rem auto;
  text-align: center;
}
.footer-col h4 {
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.footer-col p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.35rem; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--gold-bright); }
.footer-rating { letter-spacing: 0.15em; }

.footer-legal {
  color: rgba(179, 164, 143, 0.5);
  font-size: 0.8rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.3rem;
  margin-top: 1rem;
}

/* ───────── Floating WhatsApp FAB ───────── */
#whatsapp-fab {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem; /* left in RTL — the Israeli convention */
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #1fb355;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.2rem;
  border-radius: 99px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s var(--ease-out), opacity 0.45s ease, visibility 0.45s;
}
#whatsapp-fab:hover { transform: translateY(-3px) scale(1.03); color: #fff; }
.js #whatsapp-fab { opacity: 0; visibility: hidden; transform: translateY(12px); }
.js #whatsapp-fab.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ───────── Fade-in reveals ───────── */
.js .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 120ms);
}
.js .fade-in.in-view { opacity: 1; transform: translateY(0); }

/* ───────── Responsive ───────── */
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
  .trust-strip { gap: 1rem 3.5rem; }
}

@media (max-width: 480px) {
  .header-link { display: none; }
  #whatsapp-fab span { display: none; }
  #whatsapp-fab { padding: 0.85rem; }
}

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .fade-in { opacity: 1; transform: none; }
  .scroll-cue { display: none; }
}
.reduced-motion .fade-in { opacity: 1 !important; transform: none !important; }
