/* ─── Prositive Base CSS ─── */

/* ─── ספיר אסייג — Confectionery Design Tokens (default; refined by styles/sapir.css) ─── */
:root {
  /* Brand palette */
  --cocoa:         #4A2E1C;   /* deep chocolate — primary brand */
  --cocoa-2:       #6B4226;   /* mid cocoa */
  --espresso:      #2C1A10;   /* dark sections / footer */
  --berry:         #B23A5B;   /* raspberry accent — key CTAs, prices */
  --berry-hover:   #8E2B47;
  --gold:          #C49A4A;   /* caramel gold — fine details */
  --cream:         #FBF6EE;   /* warm ivory page bg */
  --cream-2:       #F4EADB;   /* soft warm sand section */
  --cream-3:       #EFE2CE;   /* muted warm */

  /* Functional aliases (used across components) */
  --primary:       #4A2E1C;
  --primary-hover: #2C1A10;
  --accent:        #B23A5B;
  --accent-hover:  #8E2B47;
  --dark:          #2C1A10;
  --dark-alt:      #3D2415;
  --bg:            #FBF6EE;
  --bg-soft:       #F4EADB;
  --bg-muted:      #EFE2CE;
  --text:          #3A2A1E;
  --text-muted:    #8B7A68;
  --border:        #E9DCC9;
  --radius:        14px;
  --radius-lg:     22px;
  --radius-pill:   50px;

  --font-body:    'Fredoka', system-ui, sans-serif;
  --font-heading: 'Fredoka', system-ui, sans-serif;
  --font-script:  'Fredoka', system-ui, sans-serif;

  --shadow-sm:  0 2px 8px rgba(74,46,28,.06), 0 8px 24px rgba(74,46,28,.06);
  --shadow-md:  0 10px 34px rgba(74,46,28,.12);
  --shadow-hover: 0 16px 44px rgba(74,46,28,.16);
  --transition: all .25s ease;

  --container: 1240px;
  --section-pad: clamp(3.5rem, 7vw, 6.5rem);
  --header-h: 76px;

  /* Spacing scale — כל מרווח באתר נבחר מכאן */
  --sp-1:.25rem; --sp-2:.5rem; --sp-3:.75rem; --sp-4:1rem;
  --sp-5:1.5rem; --sp-6:2rem; --sp-7:3rem; --sp-8:4.5rem;
}

/* ─── Fonts ─── */
/* Fredoka נטען מ-Google Fonts ב-functions.php (preconnect + css2, display=swap).
   פונט עברי מלא + משקלים אמיתיים. אין self-hosted woff2 — הקבצים הקודמים היו
   שבורים (regular ו-bold זהים, subset לטיני) ולכן עברית לא נטענה. */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  direction: rtl;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--cocoa);
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { max-width: 68ch; }

::selection { background: var(--berry); color: #fff; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.section {
  padding-block: var(--section-pad);
}

.section--dark  { background: var(--dark);    color: #fff; }
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }
.section--dark p  { color: rgba(255,255,255,.75); }

.section--soft  { background: var(--bg-soft); }
.section--muted { background: var(--bg-muted); }

/* ─── Grid helpers ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Section header ─── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}
.section-header h2 { margin-bottom: 1rem; }
.section-header p  { color: var(--text-muted); margin-inline: auto; }

/* ─── Reveal animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Admin bar compensation ─── */
.admin-bar .site-header { top: 32px; }
.admin-bar .mobile-overlay { top: calc(var(--header-h) + 32px); }

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .mobile-overlay { top: calc(var(--header-h) + 46px); }
}

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

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── Utility ─── */
.text-center { text-align: center; }
.text-center p { margin-inline: auto; }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
