/* ============================================================================
   מערכת העיצוב של אתר הלקוחות — קייטרינג ברמץ
   ============================================================================

   קובץ אחד לשלושת העמודים (בית, הזמנה, ראש השנה). קודם לכן לכל עמוד היה
   בלוק <style> משלו עם טוקנים משלו, ולכן הם נראו כמו שלושה אתרים שונים.

   השפה זהה למערכת הניהול: יין כצבע המותג, זהב לקישוט, שמנת חמה כרקע העמוד,
   כרטיסים לבנים, וארבעה גוונים (יין/זהב/ירוק/טורקיז) לסימון קטגוריות.
   ========================================================================= */

:root {
  /* משטחים */
  --bg: #fdfaf3;
  --cream: #fdfaf3;
  --surface: #ffffff;
  --surface-soft: #fbf6ec;
  --line: rgba(178, 138, 62, 0.24);
  --line-strong: rgba(178, 138, 62, 0.42);

  /* טקסט */
  --text: #2a2018;
  --muted: #6a6053;
  --text-on-wine: #ffffff;

  /* מותג */
  --wine: #7d1015;
  --wine-deep: #6d0d12;
  --wine-soft: #9b2c2c;
  --gold: #c08a1e;
  --gold-light: #e3c069;
  --gold-deep: #8a5f10;
  --gold-wash: #fbeed4;

  /* גוונים תומכים */
  --green: #5f7d4a;
  --green-wash: #f1f6ea;
  --teal: #3d7a8a;
  --teal-wash: #eef6f8;
  --rose-wash: #fdf1ee;

  /* מצבים */
  --danger: #bb3a33;
  --success: #2f7d57;

  /* צורה */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(95, 72, 38, 0.06);
  --shadow: 0 2px 4px rgba(95, 72, 38, 0.05), 0 12px 28px -16px rgba(95, 72, 38, 0.28);
  --shadow-lg: 0 8px 20px -10px rgba(95, 72, 38, 0.3), 0 30px 60px -30px rgba(95, 72, 38, 0.4);
  --container: 1180px;

  /* טיפוגרפיה */
  --font-body: "Heebo", "Assistant", "Segoe UI", Arial, sans-serif;
  --font-display: "Rubik", "Heebo", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  /* נגיעות צבע רכות בפינות — נותנות עומק בלי להכהות את העמוד */
  background:
    radial-gradient(circle at 100% 0, rgba(217, 154, 43, 0.09), transparent 30rem),
    radial-gradient(circle at 0 22rem, rgba(125, 16, 21, 0.045), transparent 28rem),
    repeating-linear-gradient(90deg, rgba(74, 49, 24, 0.012) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #fffefb 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: min(var(--container), calc(100% - 32px)); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ── כותרת האתר ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 247, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 32px -28px rgba(45, 20, 12, 0.55);
}

.site-header .nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { width: 53px; height: 53px; flex: none; }
.brand-text { line-height: 1.2; min-width: 0; }
.brand-text b { display: block; font-family: var(--font-display); font-size: 19px; }
.brand-text span { display: block; font-size: 12.5px; color: var(--muted); }

.brand-watermark {
  position: fixed;
  z-index: 10;
  left: 24px;
  bottom: 22px;
  width: 118px;
  height: 118px;
  object-fit: contain;
  opacity: .07;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 640px) {
  .site-header .nav { min-height: 70px; }
  .brand img { width: 44px; height: 44px; }
  .brand-text b { font-size: 17px; }
  .brand-watermark { display: none; }
}

.nav-links { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 15px; }
.nav-links a { color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--wine); }

/* ── ניווט במובייל ──────────────────────────────────────────────────────
   קודם `.nav-links{display:none}` מתחת ל-640px פשוט מחק את הניווט: גולש
   בטלפון — הרוב המכריע כאן — איבד את הדרך לאודות, להמלצות ולעמוד החג,
   ונשאר רק עם כפתור ההזמנה. עכשיו יש כפתור המבורגר שפותח את אותם קישורים.
   ─────────────────────────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; flex: none;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink, inherit); cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ── שדה שחוסם המשך ─────────────────────────────────────────────────────
   סימון עדין: מסגרת דקה בגוון היין וטקסט רמז זעיר. בלי רקע אדום מלא ובלי
   אנימציית רעידה — המטרה להסביר, לא להאשים. ראו markInvalid ב-shared.js.
   ───────────────────────────────────────────────────────────────────────── */
.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid,
/* `.input` מגדיר `border` כ-shorthand; הסלקטורים המשולבים כאן מבטיחים
   ניצחון גם בלי להישען על !important בלבד. */
.input.is-invalid,
select.input.is-invalid,
textarea.input.is-invalid {
  border-color: #b3373b !important;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(179, 55, 59, 0.12);
}
.is-invalid:focus,
.is-invalid:focus-visible,
.input.is-invalid:focus,
.input.is-invalid:focus-visible {
  outline: none;
  border-color: #b3373b !important;
  box-shadow: 0 0 0 3px rgba(179, 55, 59, 0.22);
}
.region-invalid {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(179, 55, 59, 0.35);
}
.field-hint {
  display: flex; align-items: center; gap: 5px;
  margin: 5px 0 0;
  color: #a8302f; font-size: 12.5px; font-weight: 700; line-height: 1.4;
}
.field-hint::before { content: "!"; flex: none;
  display: inline-grid; place-items: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: #a8302f; color: #fff; font-size: 10.5px;
}

/* ── כפתורים ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--wine);
  color: var(--text-on-wine);
  box-shadow: 0 10px 22px -10px rgba(125, 16, 21, 0.7);
}
.btn-primary:hover { background: var(--wine-deep); box-shadow: 0 14px 28px -10px rgba(125, 16, 21, 0.8); }

.btn-gold {
  background: linear-gradient(115deg, var(--gold-deep), var(--gold));
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(192, 138, 30, 0.75);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--wine); color: var(--wine); }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--wine); }

.btn-on-wine { background: #fff; color: var(--wine); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.14); }

/* ── כרטיסים ומשטחים ────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card,
.promise,
.photo,
.wine-band {
  transform: translateZ(0);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--gold-wash);
  border: 1px solid var(--line);
  color: var(--gold-deep);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--gold-wash);
  color: var(--gold-deep);
}
.badge-wine { background: var(--rose-wash); border-color: #e8c4bd; color: #a83c33; }
.badge-green { background: var(--green-wash); border-color: #cfdfc0; color: #4d6a39; }
.badge-teal { background: var(--teal-wash); border-color: #c3dde3; color: #2f6472; }

/* ── מקטעים וכותרות ─────────────────────────────────────────────────────── */

main > section, body > section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }

/* פס גוון מתחת לכותרת — אותו סימון כמו במערכת הניהול */
.accent-rule { height: 4px; width: 88px; border-radius: 999px; background: linear-gradient(90deg, var(--wine), var(--gold)); margin-top: 14px; }

/* ── באנר יין ───────────────────────────────────────────────────────────── */

.wine-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, var(--wine-deep) 0%, #8a1a1f 55%, var(--wine-soft) 100%);
  color: var(--text-on-wine);
  padding: 40px;
}
.wine-band h1, .wine-band h2 { color: #fff; }
.wine-band p { color: rgba(255, 255, 255, 0.9); }
/* סימן המים של הלוגו על הבאנר */
.wine-band .band-mark {
  position: absolute;
  bottom: -38px;
  left: 24px;
  width: 210px;
  opacity: 0.12;
  pointer-events: none;
}
.wine-band > * { position: relative; }

/* ── תמונות אמיתיות ─────────────────────────────────────────────────────── */

/* מסגרת תמונה אחידה: יחס קבוע, פינות מעוגלות, והצללה עדינה שמפרידה מהרקע */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft) center/cover no-repeat;
  box-shadow: var(--shadow);
}
.photo::after {
  /* שכבת חמימות דקה — מאחדת תמונות ממקורות שונים לאותה פלטה */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(70, 30, 12, 0.42));
  pointer-events: none;
}
.photo-caption {
  position: absolute;
  inset-inline: 16px;
  bottom: 14px;
  z-index: 1;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.ratio-1x1 { aspect-ratio: 1 / 1; }

/* ── רשתות ──────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── שדות טופס ──────────────────────────────────────────────────────────── */

.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 700; }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(192, 138, 30, 0.16);
}
textarea.input { min-height: 96px; resize: vertical; }

/* ── ציור אווירה בתחתית העמוד ───────────────────────────────────────────── */

.ambient { display: flex; justify-content: center; padding: 8px 0 4px; }
.ambient img { width: 190px; opacity: 0.28; }

/* ── כותרת תחתונה ───────────────────────────────────────────────────────── */

.footer {
  margin-top: 40px;
  padding: 40px 0 32px;
  background: linear-gradient(115deg, var(--wine-deep), #8a1a1f);
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

/* שכבת ליטוש משותפת לעמודי הלקוחות */
.site-header .brand-text b { letter-spacing: .015em; }
.site-header .nav-links a { position: relative; padding-block: 6px; }
.site-header .nav-links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--wine);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.site-header .nav-links a:hover::after { transform: scaleX(1); }

@media (hover: hover) {
  .card { transition: border-color .18s ease, box-shadow .18s ease; }
  .card:hover { border-color: var(--line-strong); }
}
.footer img { width: 96px; margin: 0 auto 14px; }
.footer a { color: var(--gold-light); font-weight: 700; }

/* ── רספונסיביות ────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wine-band { padding: 30px 24px; }
  .wine-band .band-mark { display: none; }
}

@media (max-width: 640px) {
  main > section, body > section { padding: 40px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .site-header .nav { min-height: 64px; flex-wrap: wrap; }
  .brand img { width: 40px; height: 40px; }

  .nav-toggle { display: inline-flex; order: 3; }
  /* הקישורים יורדים לשורה שנייה מלאה מתחת ללוגו, ונפתחים רק בלחיצה. */
  .nav-links {
    order: 4; flex-basis: 100%; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0 0 10px; border-top: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  /* `.site-header .nav-links a` למעלה קובע padding-block:6px וגובר בסלקטיביות,
     ולכן הכלל כאן חייב את אותה סלקטיביות — אחרת יעד המגע יוצא 39px בלבד,
     מתחת למינימום של 44px. */
  .site-header .nav-links a {
    padding: 14px 4px; font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a::after { display: none; }
  /* כפתור ההזמנה נשאר גלוי תמיד — הוא הפעולה העיקרית של הדף. */
  .site-header .nav > .btn { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
