/* home.css - home page (index.html) sections. The menu itself is on
   menu.html. Load after style.css. Hero/carousel, how-it-works, FAQ band,
   photo gallery, call-me-back form, testimonials, follow us.

   Contents - search for the marker, e.g. "== HOME: hero ==":
     == HOME: hero ==  top banner + photo carousel
     == HOME: how it works ==  the three steps strip
     == HOME: photo gallery ==  changing photos from the panel
     == HOME: FAQ band ==  "before you order" link to the FAQ
     == HOME: lead form ==  "call me back" form
     == HOME: testimonials ==  customer reviews strip
     == HOME: follow us ==  Instagram / Facebook above the footer
*/

/* == HOME: hero == */
/* The photo on top, clean, with the title and button under it on the page
   background - so the text never hides the food. */
.hero {
  --hero-photo-h: 42vh;
  position: relative;
  background: var(--bg);
  color: var(--ink);
  text-align: center;
  /* Carousel (see "Hero carousel" below): clip the slides, allow horizontal swipe. */
  overflow: hidden;
  touch-action: pan-y;
}

.hero-inner { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 20px 20px 24px; }

.hero-logo-corner {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  /* 120px on a phone, growing with the screen up to 230px on a computer. */
  width: clamp(120px, 18vw, 230px);
  height: clamp(120px, 18vw, 230px);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  border: 3px solid rgba(255,255,255,0.85);
}

.hero-title {
  /* The topbar's handwriting font (Gveret Levin, Hebrew and Latin letters).
     The only size rule for the hero title: one line from a 320px phone up -
     above 3rem it wraps inside .hero-inner's 520px. */
  font-family: "Gveret Levin", cursive;
  font-size-adjust: none; /* not the headings' Bellefair enlargement (style.css) */
  font-size: clamp(1.75rem, 9vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  font-weight: 400;
  margin: 0;
}

.hero p { color: var(--muted); margin: 6px 0 16px; font-size: 1rem; }

/* "By number of guests" next to the menu button - not active yet, so a quiet
   white button with a "coming soon" badge on its corner. */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 12px; }
.hero-soon {
  position: relative;
  padding: 10.5px 24px; /* + the border = the menu button's height */
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: default;
}
button.hero-soon:hover { filter: none; }
/* Turned on in the panel (setupGuestCalc): a working outlined button. */
.hero-soon.is-live { border-color: var(--accent); color: var(--accent-dark); cursor: pointer; }
button.hero-soon.is-live:hover { filter: brightness(0.96); }
/* The two buttons above, floating under the topbar once they're scrolled past
   (setupHeroFloat in app-home.js): smaller, a shadow of their own, no bar. */
.hero-float {
  position: fixed;
  top: 80px;
  inset-inline: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.hero-float.is-shown { opacity: 1; transform: none; visibility: visible; transition: opacity 0.2s ease, transform 0.2s ease; }
.hero-float > * { pointer-events: auto; }
.hero-float .hero-cta { padding: 9px 22px; font-size: 0.95rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.hero-float .hero-soon { padding: 7.5px 18px; font-size: 0.95rem; box-shadow: 0 6px 18px rgba(58, 53, 47, 0.22); }
@media (max-width: 639.98px) {
  .hero-float { top: 76px; gap: 8px; padding: 0 12px; }
  .hero-float .hero-cta { padding: 8px 16px; font-size: 0.88rem; }
  .hero-float .hero-soon { padding: 6.5px 12px; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) { .hero-float, .hero-float.is-shown { transition: none; } }
.hero-soon-badge {
  position: absolute;
  top: -11px;
  inset-inline-end: -10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Hero carousel (business.heroImages). A plain dark box until the first
   photo loads - not the old fallback photo, which flashed on every refresh
   (it is only used when the panel has no hero photos, setupHeroCarousel). */
.hero-slides {
  position: relative;
  height: var(--hero-photo-h);
  background: #19120a;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background: center 35% / cover no-repeat;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-slide.active { opacity: 1; }
body.a11y-no-motion .hero-slide { transition: none; }
.hero-controls { position: absolute; inset: 0 0 auto; height: var(--hero-photo-h); z-index: 1; pointer-events: none; }
.hero-controls.hidden { display: none; }
.hero-controls > * { pointer-events: auto; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
#hero-prev { inset-inline-start: 10px; }
#hero-next { inset-inline-end: 10px; }
.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
/* 24px tap target around an 8px dot. */
.hero-dot {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hero-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dot[aria-current="true"]::before { background: #fff; transform: scale(1.25); }

/* == HOME: how it works == */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 32px 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.how-step {
  position: relative;
  text-align: center;
  padding: 20px 10px;
}
.how-num {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Bellefair", serif;
  font-size: 3.2rem;
  font-weight: 400;
  color: var(--accent-dark);
  line-height: 1;
  z-index: 0;
}
/* The same orange stroke as under the section titles. */
.how-num::after { content: ""; display: block; width: 28px; height: 3px; margin: 4px auto 0; border-radius: 3px; background: var(--accent-warm); }
.how-step h3 {
  position: relative;
  margin: 40px 0 6px;
  font-size: 1rem;
  font-family: "Rubik", sans-serif;
}
.how-step p {
  position: relative;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.how-icon { display: none; }

/* Phone: the three steps stay in one row - an icon and a title each - so
   they take little height above the menu. */
@media (max-width: 639.98px) {
  .how-it-works { gap: 6px; padding: 16px 10px; }
  .how-step { padding: 0 2px; }
  .how-num, .how-step p { display: none; }
  .how-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: rgba(201, 112, 47, 0.14);
    color: var(--accent);
  }
  .how-icon svg { width: 22px; height: 22px; }
  .how-step h3 { margin: 0; font-size: 0.85rem; }
}

/* == HOME: photo gallery == */
/* The shown photo in the middle, its neighbours peeking at the sides;
   setupGallery (app-home.js) slides the track. cqw = % of .gallery-view. */
.gallery { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; }
.gallery[hidden], .gallery-bar[hidden] { display: none; }
.gallery .category-title { text-align: center; margin-top: 8px; }
.gallery .category-title::after { inset-inline-start: calc(50% - 24px); }
.gallery-view { overflow: hidden; container-type: inline-size; touch-action: pan-y; }
.gallery-track {
  --slide-w: 78cqw; /* GALLERY_PHOTO_SIZES in app-home.js follows these widths */
  display: flex;
  gap: 12px;
  padding-inline: calc((100cqw - var(--slide-w)) / 2);
  transition: transform 0.6s ease;
}
@media (min-width: 900px) { .gallery-track { --slide-w: 46cqw; } }
.gallery-slide {
  flex: 0 0 var(--slide-w);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tan);
  opacity: 0.45;
  transform: scale(0.94);
  transition: opacity 0.6s ease, transform 0.6s ease;
  cursor: pointer;
}
.gallery-slide.active { opacity: 1; transform: none; box-shadow: 0 8px 24px rgba(0,0,0,0.16); cursor: default; }
.gallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-bar { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; }
.gallery-dots { display: flex; flex-wrap: wrap; justify-content: center; }
/* 24px tap target around an 8px dot, like the hero's. */
.gallery-dot { width: 24px; height: 24px; padding: 0; border: none; background: none; display: grid; place-items: center; cursor: pointer; }
.gallery-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-dot[aria-current="true"]::before { background: var(--accent); transform: scale(1.4); }
.gallery-pause {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.gallery-pause svg { width: 16px; height: 16px; fill: currentColor; }
/* Reduced motion (device setting or the accessibility menu): nothing moves by
   itself, so no pause button; the dots and swipe still work, without sliding. */
@media (prefers-reduced-motion: reduce) {
  .gallery-track, .gallery-slide { transition: none; }
  .gallery-pause { display: none; }
}
body.a11y-no-motion .gallery-track, body.a11y-no-motion .gallery-slide { transition: none; }
body.a11y-no-motion .gallery-pause { display: none; }

/* == HOME: FAQ band == */
.faq-band { max-width: 720px; width: calc(100% - 32px); margin: 8px auto 28px; text-align: center; }
.faq-band[hidden] { display: none; }
.faq-band h2 { margin: 0 0 6px; font-size: 1.35rem; }
.faq-band p { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.faq-band a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
/* The first three questions, opening in place (filled by showFaqLinkIfFilled). */
.faq-band-list { text-align: start; background: var(--card); border-radius: 18px; overflow: hidden; margin: 6px 0 16px; box-shadow: 0 12px 30px rgba(138, 74, 28, 0.1); }
.faq-band-list details + details { border-top: 1px solid var(--border); }
.faq-band-list summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-band-list summary::-webkit-details-marker { display: none; }
.faq-band-list summary::after { content: "+"; flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(201, 112, 47, 0.14); color: var(--accent-dark); font-weight: 700; }
.faq-band-list [open] summary { color: var(--accent-dark); }
.faq-band-list [open] summary::after { content: "−"; background: var(--accent-warm); color: #2a1d08; }
.faq-band-list p { margin: 0; padding: 0 20px 18px; font-size: 0.93rem; line-height: 1.6; white-space: pre-line; }

/* == HOME: lead form == */
/* "Call me back" lead form: a centred title, three steps (what happens after
   sending) on a dashed line, then the form in a white card. */
.lead-section { max-width: 760px; margin: 0 auto; padding: 8px 16px 12px; scroll-margin-top: 120px; text-align: center; }
.lead-section .category-title::after { inset-inline-start: calc(50% - 24px); }
.lead-section > p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0 0 12px; }
.lead-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; list-style: none; margin: 20px 0 24px; padding: 0; }
.lead-steps::before { content: ""; position: absolute; top: 30px; inset-inline: 16%; border-top: 2px dashed var(--tan); }
.lead-steps li { position: relative; }
.lead-step-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent-warm); color: var(--accent-dark); }
.lead-step-icon svg { width: 28px; height: 28px; }
.lead-steps b { display: block; font-size: 0.95rem; }
.lead-steps small { color: var(--muted); font-size: 0.82rem; }
#lead-form { text-align: start; background: var(--card); border-top: 5px solid var(--accent-warm); border-radius: 18px; padding: 14px 28px 8px; box-shadow: 0 12px 30px rgba(138, 74, 28, 0.1); }
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#lead-form label { display: block; margin: 10px 0 0; font-size: 0.88rem; font-weight: 600; }
@media (max-width: 639.98px) {
  .lead-steps { gap: 4px; }
  .lead-steps::before { top: 23px; }
  .lead-step-icon { width: 46px; height: 46px; }
  .lead-step-icon svg { width: 22px; height: 22px; }
  .lead-steps b { font-size: 0.85rem; }
  .lead-steps small { font-size: 0.75rem; }
  #lead-form { padding: 6px 16px 4px; }
  .lead-row { grid-template-columns: 1fr; gap: 0; }
}
#lead-form input, #lead-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--card);
  color: var(--ink);
}
#lead-form textarea { min-height: 70px; resize: vertical; }
#lead-form .hero-cta { display: block; width: 100%; margin-top: 14px; border: none; cursor: pointer; font-family: inherit; font-size: 1rem; }
#lead-form .hero-cta:disabled { opacity: 0.6; cursor: wait; }
.lead-status { min-height: 1.2em; margin: 10px 0 0; font-size: 0.9rem; text-align: center; }
.lead-status a { color: var(--accent-dark); font-weight: 600; }

/* == HOME: testimonials == */
#testimonials { padding: 8px 16px 4px; max-width: 720px; margin: 0 auto; }
#testimonials .category-title { margin: 24px 0 14px; }

.testimonial-scroll {
  overflow: hidden;
  padding-bottom: 8px;
  /* Forced LTR so the duplicated track lays out predictably (card 1 at
     x:0, extending right) - card text stays RTL via dir="rtl" per card. */
  direction: ltr;
}
.testimonial-track {
  display: flex;
  gap: 12px;
  width: max-content;
  touch-action: pan-y;
  -webkit-user-select: none; /* Safari still needs the prefix */
  user-select: none;
  cursor: grab;
}
.testimonial-track.dragging { cursor: grabbing; }

.testimonial-card {
  flex: 0 0 auto;
  width: min(78vw, 300px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
}
.testimonial-card::before {
  content: "\201C";
  font-family: "Bellefair", serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent-warm);
  opacity: 0.35;
  position: absolute;
  top: 4px;
  right: 12px;
}
.testimonial-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 20px 0 10px;
  position: relative;
}
.testimonial-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--accent-dark);
  font-weight: 700;
}
.testimonial-name .icon { width: 15px; height: 15px; flex-shrink: 0; }
.testimonial-source-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.testimonial-date { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--muted); }

/* == HOME: follow us == */
.follow-band {
  max-width: 720px;
  width: calc(100% - 32px);
  margin: 28px auto 32px;
  padding: 22px 16px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.follow-band h2 { margin: 0 0 6px; font-size: 1.35rem; }
.follow-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}
.follow-handle .icon { width: 18px; height: 18px; }
/* Like an Instagram profile: 3 across on a phone, 6 in one row from 640px. */
.follow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
}
.follow-grid[hidden] { display: none; }
@media (min-width: 640px) { .follow-grid { grid-template-columns: repeat(6, 1fr); } }
.follow-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.follow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.follow-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.follow-links a:hover { border-color: var(--accent); color: var(--accent-dark); }
.follow-links .icon { width: 22px; height: 22px; color: var(--accent); }
.follow-links .follow-main { background: var(--accent); border-color: var(--accent); color: #fff; }
.follow-links .follow-main:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.follow-links .follow-main .icon { color: #fff; }
