/* ===== 90 MINUTES A WEEK — EVENING DESIGN SYSTEM =====
   The site is set in the hour after the day is done: indigo night, lamplight
   amber, the brand's rose. Loaded LAST on every page (after styles.css and any
   page stylesheet), so it re-themes the older styles rather than replacing them:
   it remaps their colour tokens to the night palette and restyles the shared
   pieces (header, menu drawer, footer, buttons, forms, cookie banner).
   Page families add their own evening-*.css after this file.
   Removing the evening*.css links returns a page to the previous design. */

:root {
  /* Evening palette */
  --night: #1A1630;
  --night-2: #221C3D;
  --night-3: #2C2550;
  --line: rgba(185, 174, 214, 0.18);
  --candle: #FFF3E4;    /* text on night: 16.6:1 */
  --haze: #B9AED6;      /* secondary text on night: 8.2:1 */
  --ember: #FFB066;     /* lamplight; readable on night */
  --ember-soft: #FFD6A8;
  --rose: #F0668C;      /* brand rose, lifted for the dark ground: 5.0:1 on night */
  --lamp: #D7A86E;      /* the original brand tan, used for one lamplit section */
  --ink: #2D1F10;       /* text on tan / on paper */

  /* Lamplit: the one warm section on a page (founder story, free guide).
     A deep dusk ground with a lamp glowing from the upper corner; it fades
     into the night above and below instead of sitting as a flat block. */
  --lamplit-bg:
    radial-gradient(46% 72% at 10% 6%, rgba(255, 184, 110, 0.30), transparent 70%),
    radial-gradient(30% 46% at 10% 6%, rgba(255, 214, 168, 0.16), transparent 70%),
    radial-gradient(40% 60% at 94% 100%, rgba(240, 102, 140, 0.10), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, #2B1E2E 16%, #2B1E2E 84%, var(--night) 100%);
  --lamplit-text: #F4E6D6;   /* 13:1 on the dusk ground */
  --lamplit-muted: #D9C4AF;  /* 9:1 */

  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hdr-h: 72px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* The previous design's tokens (styles.css), remapped so every older rule
     that reads them picks up the evening palette. */
  --bg: var(--night);
  --bg-light: var(--night-2);
  --bg-dark: #15122A;
  --bg-cream: var(--night-2);
  --bg-cream-alt: var(--night-3);
  --accent-gold: var(--ember);
  --accent-gold-light: var(--ember-soft);
  --accent-gold-border: var(--line);
  --link-on-bg: var(--ember);
  --link-on-cream: var(--ember);
  --accent-pink: var(--rose);
  --accent-pink-dark: #D94F78;
  --accent-pink-soft: rgba(240, 102, 140, 0.14);
  --text: var(--candle);
  --text-muted: var(--haze);
  --text-light: #FFFFFF;
  --text-on-dark: var(--candle);
  --border: var(--line);
  --border-strong: rgba(185, 174, 214, 0.36);
  --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-medium: 0 18px 44px -16px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

/* ===== BASE LAYOUT =====
   The header, footer and container basics, repeated from styles.css so pages
   that don't load styles.css (the homepage) still lay them out. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; 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; top: -100%; left: 1rem; z-index: 10001; padding: 0.75rem 1.5rem; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 0.5rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; text-decoration: none; }
.nav { display: flex; align-items: center; }
.nav a { text-decoration: none; position: relative; }
.lang-switcher { display: flex; align-items: center; border-radius: 999px; overflow: hidden; }
.lang-switcher-btn { background: none; border: none; cursor: pointer; line-height: 1; }
.nav-toggle { display: none; cursor: pointer; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.footer-links { display: flex; }
.footer-links a { text-decoration: none; }

/* ===== BASE ===== */
html, body {
  background: var(--night);
  color: var(--candle);
  font-family: var(--sans);
}
body { font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(255, 176, 102, 0.35); color: var(--candle); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
h3, h4 { font-family: var(--sans); }
a { color: var(--ember); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.skip-link { background: var(--candle); color: var(--night); }

.section { background: var(--night); }
.section-cream { background: var(--night-2); }
.section-warm { background: var(--night-2); }

/* Section headings: a serif headline; the little label above it becomes a
   quiet italic line instead of a tracked-out capitals eyebrow. */
.section-header h2 { font-family: var(--serif); font-weight: 400; color: var(--candle); }
.section-header p { color: var(--haze); }
.section-label {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: 0; font-size: 1.05rem;
  color: var(--ember);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  min-height: 50px; padding: 0 26px;
  border-radius: 999px; border: 0;
  font-family: var(--sans); font-weight: 500; font-size: 1rem;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s, color 0.25s;
}
.btn-primary, .btn-ember {
  color: #2A1406;
  background: linear-gradient(180deg, #FFC488, var(--ember));
  border: 0;
  box-shadow: 0 0 0 1px rgba(255, 196, 136, 0.5) inset, 0 10px 34px -10px rgba(255, 160, 80, 0.7);
}
.btn-primary:hover, .btn-ember:hover {
  color: #2A1406;
  background: linear-gradient(180deg, #FFCB95, #FFB875);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 196, 136, 0.6) inset, 0 16px 44px -10px rgba(255, 160, 80, 0.9);
}
.btn-secondary, .btn-light, .btn-quiet {
  color: var(--candle);
  background: transparent;
  border: 0;
  box-shadow: 0 0 0 1px var(--border-strong) inset;
  backdrop-filter: none;
}
.btn-secondary:hover, .btn-light:hover, .btn-quiet:hover {
  color: var(--candle);
  background: rgba(255, 243, 228, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 243, 228, 0.45) inset;
}

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26, 22, 48, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
/* On the homepage the header floats over the opening scene. */
.header.header-float { position: fixed; inset: 0 0 auto; }
.header-inner { min-height: var(--hdr-h); padding-top: 0; padding-bottom: 0; gap: 20px; }
.logo { color: var(--candle); gap: 10px; }
/* the icon never gives up its size when the header is tight (it was squeezed
   to 17px wide on 360px phones); the name gives way instead */
.logo picture, .logo-icon { flex: none; }
.logo-icon { width: 36px; height: 36px; min-width: 36px; max-width: none; border-radius: 50%; object-fit: cover; }
.logo { min-width: 0; }
.logo-text { font-family: var(--sans); font-weight: 500; font-size: 1rem; letter-spacing: 0; unicode-bidi: plaintext; white-space: nowrap; }
.nav { gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 999px;
  color: var(--haze); font-size: 0.95rem; font-weight: 400;
  transition: color 0.2s, background-color 0.2s;
}
.nav a::after { display: none; }
.nav a:hover { color: var(--candle); background: rgba(255, 243, 228, 0.06); }
.nav a[aria-current="page"] { color: var(--candle); }
.lang-switcher { border: 0; padding: 3px; gap: 0; box-shadow: 0 0 0 1px var(--line) inset; margin-inline-start: 8px; margin-left: 0; margin-right: 0; }
.lang-switcher-btn { color: var(--haze); font-family: var(--sans); font-weight: 500; font-size: 0.8rem; padding: 6px 10px; border-radius: 999px; text-decoration: none; }
.lang-switcher-btn.active { background: rgba(255, 243, 228, 0.12); color: var(--candle); }
.lang-switcher-btn:hover:not(.active) { background: rgba(255, 243, 228, 0.06); color: var(--candle); }
.nav-toggle {
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 243, 228, 0.08); color: var(--candle);
  font-size: 1.15rem; line-height: 1;
  align-items: center; justify-content: center;
}

/* Hebrew: the header mirrors naturally (logo on the right). The previous
   design forced the English order with row-reverse; undo that. */
[dir="rtl"] .header-inner, [dir="rtl"] .logo { flex-direction: row; }
@media (min-width: 1121px) { [dir="rtl"] .nav { flex-direction: row; } }
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 0; }

/* ===== MENU DRAWER (≤1120px) =====
   Opened by nav-drawer.js, which injects .nav-close and .nav-backdrop.
   Seven links don't fit beside the logo below ~1120px, so the drawer takes
   over there (it used to start at 700px). */
@media (max-width: 1120px) {
  html { overflow-x: clip; }
  .nav-toggle { display: inline-flex; }
  .header-inner > .nav-toggle { margin-inline-start: 0; }
  .lang-switcher { margin-inline-start: auto; }
  .nav {
    position: fixed; top: 0; right: 0; left: auto;
    height: 100vh; height: 100dvh;
    width: min(84vw, 340px); max-width: 340px;
    z-index: 200;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: 84px 22px 28px;
    background: #1E1937;
    border-inline-start: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    /* The closed drawer stays INSIDE the screen and is wiped away with
       clip-path. Parking it off-screen with translateX(100%) made phones lay
       every page out wider than the screen (360px phones rendered at 662px),
       so pages scrolled sideways and fixed bottom bars sat off-screen. */
    transform: none;
    clip-path: inset(0 0 0 100%);
    visibility: hidden; pointer-events: none;
    overflow-y: auto; overscroll-behavior: contain;
    transition: clip-path 0.4s var(--ease-out), visibility 0s linear 0.4s;
  }
  .nav.nav-open { clip-path: inset(0 0 0 0); visibility: visible; pointer-events: auto; transition: clip-path 0.4s var(--ease-out), visibility 0s linear 0s; }
  .nav a { display: block; width: 100%; padding: 15px 4px; border-radius: 0; font-size: 1.1rem; color: var(--candle); border-bottom: 1px solid var(--line); background: none; }
  .nav a:hover { background: none; color: var(--ember); }
  .nav a:last-of-type { border-bottom: 0; }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 199; background: rgba(10, 8, 22, 0.6); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s, visibility 0s linear 0.3s; }
  .nav-backdrop.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s, visibility 0s linear 0s; }
  .nav-close {
    display: inline-flex; position: absolute; top: 16px; inset-inline-end: 16px;
    width: 42px; height: 42px; align-items: center; justify-content: center;
    background: rgba(255, 243, 228, 0.08); border: 0; border-radius: 50%;
    color: var(--candle); font-size: 1.4rem; line-height: 1; cursor: pointer;
  }
  body.nav-locked { overflow: hidden; }
  body.nav-locked .header { z-index: 300; }
  [dir="rtl"] .nav { flex-direction: column; }
}
@media (min-width: 1121px) {
  .nav-toggle, .nav-close, .nav-backdrop { display: none !important; }
}
@media (max-width: 480px) {
  .logo-text { font-size: 0.95rem; }
  .header-inner { gap: 10px; }
  .lang-switcher-btn { padding: 6px 8px; }
}
@media (max-width: 374px) {
  .logo-text { font-size: 0.88rem; }
}

/* Hebrew: the lamp hangs in the upper right */
[dir="rtl"] { --lamplit-bg:
    radial-gradient(46% 72% at 90% 6%, rgba(255, 184, 110, 0.30), transparent 70%),
    radial-gradient(30% 46% at 90% 6%, rgba(255, 214, 168, 0.16), transparent 70%),
    radial-gradient(40% 60% at 6% 100%, rgba(240, 102, 140, 0.10), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, #2B1E2E 16%, #2B1E2E 84%, var(--night) 100%); }

/* ===== FORMS ===== */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], textarea, select {
  background: rgba(255, 243, 228, 0.05);
  color: var(--candle);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--sans);
}
input::placeholder, textarea::placeholder { color: rgba(185, 174, 214, 0.7); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ember); background: rgba(255, 243, 228, 0.08); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ember); }

/* ===== FOOTER ===== */
.footer { background: var(--night-2); border-top: 1px solid var(--line); color: var(--haze); padding: 32px 0 40px; }
.footer-inner { color: var(--haze); flex-wrap: wrap; }
/* keep "90 Minutes a Week" in English order inside the Hebrew footer */
bdi { unicode-bidi: isolate; }
/* the copyright line takes its direction from its own text: English brand
   name reads left to right, the Hebrew name on the static -he pages right to left */
.footer-inner > span:first-child { unicode-bidi: plaintext; }
.footer-links { flex-wrap: wrap; gap: 8px 20px; }
.footer-links a, .footer-link-btn { color: var(--haze); font-family: var(--sans); }
.footer-links a:hover, .footer-link-btn:hover { color: var(--candle); }

/* ===== COOKIE BANNER (cookie-consent.css) ===== */
.cookie-banner { background: #211B3B; border-top: 1px solid var(--line); box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5); color: var(--candle); }
.cookie-banner-title, .cookie-category-name { color: var(--candle); font-family: var(--sans); }
.cookie-banner-text p, .cookie-category-desc { color: var(--haze); }
.cookie-banner-text a { color: var(--ember); }
.cookie-category:hover { background: rgba(255, 243, 228, 0.05); }
.cookie-category-pill { background: rgba(255, 176, 102, 0.18); color: var(--candle); }
.cookie-btn { font-family: var(--sans); border-radius: 999px; }
.cookie-btn-accept { background: var(--ember); border-color: var(--ember); color: #2A1406; }
.cookie-btn-accept:hover { background: #FFC488; border-color: #FFC488; color: #2A1406; }
.cookie-btn-reject, .cookie-btn-manage, .cookie-btn-save { background: transparent; color: var(--candle); border-color: var(--border-strong); }
.cookie-btn-reject:hover, .cookie-btn-manage:hover, .cookie-btn-save:hover { background: rgba(255, 243, 228, 0.07); color: var(--candle); }

/* ===== LONG-FORM PAGES (legal, policies, simple content) ===== */
.back-link { color: var(--ember); }
main .section h1 { font-family: var(--serif); font-weight: 400; color: var(--candle); }
main .section h2 { color: var(--candle); }
main .section h3 { color: var(--candle); }
main .section p, main .section li { color: #DCD3EC; }
main .section strong { color: var(--candle); }
main .section table { border-color: var(--line); }
main .section th, main .section td { border-color: var(--line); color: #DCD3EC; }
main .section hr { border-color: var(--line); }

@media (prefers-reduced-motion: reduce) {
  .btn, .nav { transition: none !important; }
}
