/* ==========================================================================
   Base: reset, typography, layout helpers, accessibility.
   Uses logical properties (inline-start/end) so RTL and LTR both work.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
/* Large screens scale up the whole design (rem-based) instead of leaving it small in the middle */
@media (min-width: 1441px) { html { font-size: min(100vw / 90, 28px); } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + var(--space-4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: var(--text-base); line-height: var(--line-height-body); -webkit-font-smoothing: antialiased; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--weight-bold); line-height: var(--line-height-heading); margin-block: 0 var(--space-4); color: var(--color-text); }
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
p { margin-block: 0 var(--space-4); }
a { color: var(--color-primary); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--container-max)); margin-inline: auto; }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-gap); }
.section--surface { background: var(--color-surface); }
.text-center { text-align: center; }
.page-header { padding-block: var(--space-7) var(--space-5); }

/* Block content from the editor */
.entry-content > :where(:not(.alignfull):not(.alignwide)) { width: min(100% - 2 * var(--gutter), var(--container-narrow)); margin-inline: auto; }
.entry-content > .alignwide { width: min(100% - 2 * var(--gutter), var(--container-max)); margin-inline: auto; }
.entry-content > .alignfull { width: 100%; }

/* Buttons */
.btn, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: var(--space-3) var(--space-6); border: var(--border-width) solid transparent; border-radius: var(--radius-pill); font-weight: var(--weight-bold); text-decoration: none; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out); }
.btn--primary, .wp-block-button__link { background: var(--color-primary); color: var(--color-primary-contrast); }
.btn--primary:hover, .wp-block-button__link:hover { background: color-mix(in srgb, var(--color-primary) 85%, black); }
.btn--outline { border-color: currentColor; color: var(--color-primary); background: transparent; }
.btn:active { transform: translateY(1px); }

/* Accessibility */
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
.visually-hidden, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: var(--space-4); top: -100px; z-index: 1000; padding: var(--space-3) var(--space-5); background: var(--color-primary); color: var(--color-primary-contrast); border-radius: var(--radius-sm); font-weight: var(--weight-bold); }
.skip-link:focus { top: var(--space-4); }
.site-main:focus { outline: none; }

/* Simple post list (blog/archive fallback) */
.post-list { display: grid; gap: var(--space-6); }
.post-card__title { font-size: var(--text-xl); }

/* ==========================================================================
   Shared UI: gradient text, button variants, tags, reveal animations
   ========================================================================== */
.text-gradient { background: var(--gradient-brand, var(--color-secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-accent { color: var(--color-secondary); }

/* Hebrew letters sit ~0.15em below the middle of the line box: drop the arrow to their visual center */
.btn__arrow { flex: none; width: 14px; height: 14px; translate: 0 0.15em; transition: transform var(--duration-base) var(--ease-out); }
.btn:hover .btn__arrow { transform: translate(-3px, -3px); }
.btn--gradient { background: var(--gradient-brand) border-box; border-color: transparent; color: var(--color-primary); box-shadow: 0 8px 30px -10px color-mix(in srgb, var(--color-secondary) 70%, transparent); }
.btn--gradient:hover { box-shadow: 0 12px 40px -8px color-mix(in srgb, var(--color-secondary) 90%, transparent); }
.btn--ghost-light { color: var(--color-bg); border-color: color-mix(in srgb, var(--color-bg) 45%, transparent); background: color-mix(in srgb, var(--color-bg) 6%, transparent); backdrop-filter: blur(6px); }
.btn--ghost-light:hover { background: color-mix(in srgb, var(--color-bg) 14%, transparent); border-color: var(--color-bg); }
.btn--outline:hover { background: var(--color-primary); color: var(--color-bg); border-color: var(--color-primary); }

.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tag { padding: 0.35em 1em; border: var(--border-width) solid color-mix(in srgb, currentColor 35%, transparent); border-radius: var(--radius-pill); font-size: var(--text-sm); white-space: nowrap; }
a.tag { display: inline-block; color: inherit; text-decoration: none; transition: color var(--duration-fast), border-color var(--duration-fast), background-color var(--duration-fast); }
a.tag:hover { border-color: var(--color-secondary); background: color-mix(in srgb, var(--color-secondary) 10%, transparent); color: var(--color-secondary); }

.section-title { font-size: var(--text-3xl); font-weight: var(--weight-heavy, 900); line-height: 0.95; letter-spacing: -0.01em; margin-block-end: var(--space-7); }
.section-title__line { display: block; overflow: hidden; padding-block-end: 0.08em; }
.section-title__line > span { display: inline-block; }
.section-title--light { color: var(--color-bg); }

/* Reveal on scroll (JS adds .is-visible). Without JS everything stays visible. */
.js [data-reveal]:not([data-reveal="lines"]) { opacity: 0; transform: translateY(32px); filter: blur(6px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out); transition-delay: calc(var(--d, 0) * 120ms); }
.js [data-reveal].is-visible:not([data-reveal="lines"]) { opacity: 1; transform: none; filter: none; }
.js [data-reveal="lines"] .section-title__line > span { transform: translateY(105%); transition: transform 1s var(--ease-out); }
.js [data-reveal="lines"] .section-title__line:nth-child(2) > span { transition-delay: 0.08s; }
.js [data-reveal="lines"] .section-title__line:nth-child(3) > span { transition-delay: 0.16s; }
.js [data-reveal="lines"] .section-title__line:nth-child(4) > span { transition-delay: 0.24s; }
.js [data-reveal="lines"].is-visible .section-title__line > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
	.js [data-reveal], .js [data-reveal="lines"] .section-title__line > span { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* Soft brand glows used as section decoration */
.glow { position: absolute; width: 420px; aspect-ratio: 1; border-radius: 50%; filter: blur(90px); opacity: 0.5; pointer-events: none; z-index: -1; }
.glow--pink { background: var(--color-accent); }
.glow--purple { background: var(--color-secondary); }

/* Floating WhatsApp button */
.wa-float { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 90; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.35); transition: transform var(--duration-base) var(--ease-out); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08) rotate(-6deg); }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25d366; animation: wa-pulse 2.4s var(--ease-out) infinite; }
@keyframes wa-pulse { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wa-float::after { animation: none; } }
[hidden] { display: none !important; }
html, body { overflow-x: clip; }

/* Sparkle stars: buttons that are not gradient-filled throw little stars on hover (as on the live site).
   The star spans are added by main.js. */
.btn--sparkle { position: relative; overflow: visible; }
.btn--sparkle:hover, .btn--sparkle:focus-visible { border-color: transparent; background: linear-gradient(var(--color-primary), var(--color-primary)) padding-box, var(--gradient-brand) border-box; color: var(--color-bg); }
.star { position: absolute; z-index: 5; width: 14px; opacity: 0; pointer-events: none; transition: top 0.8s var(--ease-out), left 0.8s var(--ease-out), opacity 0.8s var(--ease-out); }
.star svg { display: block; width: 100%; height: auto; fill: #fffdef; }
.btn--outline .star svg { fill: var(--color-secondary); }
.star-1 { top: 20%; left: 20%; width: 14px; }
.star-2 { top: 50%; left: 50%; width: 10px; }
.star-3 { top: 40%; left: 40%; width: 6px; }
.star-4 { top: 20%; left: 60%; width: 8px; }
.star-5 { top: 30%; left: 70%; width: 12px; }
.star-6 { top: 10%; left: 80%; width: 6px; }
.btn--sparkle:is(:hover, :focus-visible) .star { opacity: 1; }
.btn--sparkle:is(:hover, :focus-visible) .star-1 { top: -40%; left: -10%; }
.btn--sparkle:is(:hover, :focus-visible) .star-2 { top: -20%; left: 10%; }
.btn--sparkle:is(:hover, :focus-visible) .star-3 { top: 80%; left: 20%; }
.btn--sparkle:is(:hover, :focus-visible) .star-4 { top: 40%; left: 100%; }
.btn--sparkle:is(:hover, :focus-visible) .star-5 { top: 20%; left: 112%; }
.btn--sparkle:is(:hover, :focus-visible) .star-6 { top: -10%; left: 70%; }
@media (prefers-reduced-motion: reduce) { .star { display: none; } }

/* Intro screen: the logo letters rise one by one, a light sweeps over them, then the screen lifts away.
   Shown once per visit; skipped without JS and with reduced motion (class no-splash on <html>). */
.splash { display: none; }
.js:not(.no-splash) .splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--color-primary); animation: splash-out 0.9s cubic-bezier(0.76, 0, 0.24, 1) 2.1s forwards; }
.splash::before { content: ""; position: absolute; width: min(70vw, 560px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--color-secondary) 45%, transparent), transparent 65%); filter: blur(30px); opacity: 0; animation: splash-glow 2.2s var(--ease-out) 0.2s forwards; }
.splash__logo { position: relative; width: clamp(220px, 32vw, 460px); }
.splash__svg { display: block; width: 100%; height: auto; overflow: visible; }
.splash__svg path { opacity: 0; transform: translateY(70%) scale(0.85); transform-box: fill-box; transform-origin: 50% 100%; filter: blur(8px); animation: splash-letter 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; animation-delay: calc(var(--n) * 70ms + 250ms); }
.splash__logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgb(255 255 255 / 0.95) 50%, transparent 65%) 100% 0 / 300% 100% no-repeat; -webkit-mask: url("../img/logo-light.svg") center / 100% 100% no-repeat; mask: url("../img/logo-light.svg") center / 100% 100% no-repeat; opacity: 0; animation: splash-shine 1s var(--ease-out) 1.2s forwards; }
@keyframes splash-letter { to { opacity: 1; transform: none; filter: none; } }
@keyframes splash-shine { 0% { opacity: 1; background-position: 100% 0; } 85% { opacity: 1; } 100% { opacity: 0; background-position: 0% 0; } }
@keyframes splash-glow { 40% { opacity: 1; } 100% { opacity: 0.6; transform: scale(1.15); } }
@keyframes splash-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
/* Page intro animations wait for the intro screen */
.js:not(.no-splash) { --intro-delay: 2.4s; }

/* Long-form text (legal pages etc.) */
.prose { padding-block: var(--space-7) var(--section-gap); }
.prose > * { max-width: 72ch; }
.prose p, .prose li { color: var(--color-text); line-height: 1.6; }
.prose h2, .prose h3 { margin-block: var(--space-6) var(--space-3); font-size: var(--text-xl); }
.prose strong { font-weight: var(--weight-bold); }
.prose a { color: var(--color-link); }
.prose .page-updated { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Cookie notice: small card at the bottom, leaves room for the WhatsApp button */
.cookie-notice { position: fixed; z-index: 95; bottom: 20px; inset-inline-start: 20px; display: flex; align-items: center; gap: var(--space-4); max-width: min(560px, calc(100vw - 120px)); padding: var(--space-4) var(--space-5); border: var(--border-width) solid color-mix(in srgb, var(--color-secondary) 40%, transparent); border-radius: var(--radius-lg); background: var(--color-primary); color: var(--color-bg); box-shadow: 0 20px 50px -20px rgb(0 0 0 / 0.5); font-size: var(--text-sm); line-height: 1.4; animation: cookie-in 0.6s var(--ease-out) both; }
.cookie-notice[hidden] { display: none; }
.cookie-notice__text { margin: 0; }
.cookie-notice a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; font-weight: var(--weight-bold); }
.cookie-notice a:hover { color: var(--color-secondary); }
.cookie-notice__btn { flex: none; min-height: 44px; padding-inline: var(--space-5); }
.cookie-notice__actions { display: flex; flex: none; gap: var(--space-2); }
.cookie-notice__actions .btn--ghost-light { color: var(--color-bg); }
.site-footer__consent { padding: 0; border: 0; background: none; color: inherit; font: inherit; opacity: 0.85; cursor: pointer; } /* a footer menu item, looks like its links */
.site-footer__consent:hover { color: var(--color-secondary); opacity: 1; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 600px) { .cookie-notice { inset-inline: 12px 84px; bottom: 12px; max-width: none; flex-direction: column; align-items: stretch; text-align: center; } .cookie-notice__actions { justify-content: center; } }
