/* =====================================================================
   The GPS Within — Hebrew (RTL) overrides.  Loaded ONLY by /he/ pages, AFTER styles.css.
   The English styles.css is untouched: every rule here is scoped to html[dir="rtl"] and simply
   swaps a left/right from styles.css (line refs in comments) so the Hebrew page is a mirror image.
   The road/roundabout mirror is done in main.js (RTL block at the top of road()).
   ===================================================================== */

/* ---------- Fonts: Hebrew faces (chosen by Rivka, 25 Nov 2026) ----------
   Titles = "GPS Amatic Heavy" (Amatic SC Bold, made slightly wider + thicker for us; digits included).
   Subheadings/buttons/menu = Fredoka SemiBold (its @font-face is in styles.css: the English language menu uses it too).
   Body = Assistant, Hebrew letters at 98%.
   SIZES are matched to English by how big the drawn letters look (height, width, stroke), not by px (25 Nov 2026):
   titles = 1.19 x the English title size at every screen width; Fredoka = 107% (size-adjust, in styles.css).
   English words + digits inside Hebrew text keep the brand's own faces: Scripter in titles, Montserrat Alternates in subheads.
   All are free to use (SIL Open Font License, see assets/fonts/OFL.txt) except Scripter (licensed). */
@font-face {
  font-family: "GPS Amatic Heavy"; src: url("../assets/fonts/AmaticHeavy-Hebrew.woff2") format("woff2");
  font-weight: 700; font-display: swap; unicode-range: U+0020-0040, U+0590-05FF, U+2013;
}
@font-face {   /* Scripter at 84% (= 1 / 1.19), so English words in a title are the same size as on the English site */
  font-family: "Scripter Small"; src: url("../assets/fonts/Scripter-Regular.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; size-adjust: 84%;
}
@font-face {
  font-family: "GPS Montserrat Alternates"; src: url("../assets/fonts/MontserratAlternates-Latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "GPS Assistant"; src: url("../assets/fonts/Assistant-Hebrew.woff2") format("woff2");
  font-weight: 200 800; font-display: swap; size-adjust: 98%; unicode-range: U+0590-05FF;
}
html[dir="rtl"] {
  --font-display:    "GPS Amatic Heavy", "Scripter Small", "Assistant", sans-serif;
  --font-heading:    "GPS Fredoka", "GPS Montserrat Alternates", "Assistant", sans-serif;   /* = Montserrat Alternates' job in English: */
  --font-subheading: "GPS Fredoka", "GPS Montserrat Alternates", "Assistant", sans-serif;   /* subheadings, buttons, menu, pull-quotes */
  --font-body:       "GPS Assistant", "Assistant", sans-serif;
  --tracking-heading: 0;
  /* Amatic is a narrow hand face: 1.19 x the English size gives it the same width + weight as Scripter */
  --text-h2: clamp(2.38rem, 4.76vw, 2.975rem);
}
html[dir="rtl"] h1, html[dir="rtl"] h2 { letter-spacing: 0; line-height: 1.08; font-weight: 700; word-spacing: -.06em; }
html[dir="rtl"] .hero-title { font-size: clamp(2.62rem, 5.83vw, 4.52rem); letter-spacing: 0; line-height: 1.08; }
html[dir="rtl"] .scroll-hint { letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
html[dir="rtl"] .col-head { letter-spacing: 0; font-size: 14px; }
html[dir="rtl"] .contact-methods dt { letter-spacing: 0; font-size: 14.5px; }
/* Fredoka only comes in SemiBold, so where the English is semi-bold (600) it already looks heavier: grow it less (net 103%) */
html[dir="rtl"] .footer-tagline { font-size: 1.11rem; }
html[dir="rtl"] #about .about-refined .route-seq { font-size: 19.25px; }
@media (min-width: 1200px) { html[dir="rtl"] .hero-sub { font-size: 1.69rem; } }
/* small bold Fredoka (menu, buttons, text links): a touch more, net 110% */
html[dir="rtl"] .btn, html[dir="rtl"] .text-cta, html[dir="rtl"] .lang-menu summary, html[dir="rtl"] .site-nav > a:not(.btn) { font-size: 15.5px; }
html[dir="rtl"] .btn-nav, html[dir="rtl"] .btn-small, html[dir="rtl"] .legal-back { font-size: 14.5px; }
/* phone numbers / email stay left-to-right inside the Hebrew text */
html[dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Mirror the fixed left/right positions from styles.css ---------- */
html[dir="rtl"] .skip-link { left: auto; right: 12px; }                                   /* :76 */
html[dir="rtl"] .hero-title { left: auto; right: 15px; }                                  /* :231 */
html[dir="rtl"] .hero-lower { left: auto; right: 15px; }                                  /* :238 */

/* list bullets sit on the right; text padding moves to the left side */
html[dir="rtl"] .check-list li, html[dir="rtl"] .plain-list li, html[dir="rtl"] .quote-list li { padding: 6px 34px 6px 0; }   /* :276 */
html[dir="rtl"] .check-list li::before { left: auto; right: 4px; }                         /* :278 (a ✓ is not mirrored in Hebrew) */
html[dir="rtl"] .quote-list li { padding-left: 0; padding-right: 20px; }                  /* :283 */
html[dir="rtl"] .quote-list li::before { left: auto; right: 0; }                          /* :284 */
html[dir="rtl"] .plain-list li { padding-left: 0; padding-right: 20px; }                  /* :285 */
html[dir="rtl"] .plain-list li::before { left: auto; right: 0; content: "\2190"; }        /* :286 — arrow points left */
html[dir="rtl"] #problem .feel-list li,
html[dir="rtl"] #problem .check-list li { padding: 4px 32px 4px 0; }                      /* :453 */
html[dir="rtl"] #reframe .check-list li,
html[dir="rtl"] #method .method-refined .check-list li,
html[dir="rtl"] #working .working-minimal .check-list li { padding-left: 0; padding-right: 32px; }   /* :470 :493 :529 */
/* compass-arrow bullet: same marker, mirrored so it points into the (right-to-left) text */
html[dir="rtl"] .compass-marker { left: auto; right: 4px; transform: scaleX(-1) rotate(-135deg); }  /* :475 */
html[dir="rtl"] .brand-ring { left: auto; right: 3px; }                                   /* :480 */
html[dir="rtl"] #cta .cta-minimal .cta-ring { left: auto; right: 0; }                     /* :536 */

html[dir="rtl"] .contact-loc .loc-icon { margin-right: 0; margin-left: 0.3em; }           /* :342 */
html[dir="rtl"] .footer-cta { text-align: right; }                                        /* :357 */
html[dir="rtl"] .cert-lightbox__close { right: auto; left: -16px; }                       /* :371 */
html[dir="rtl"] .footer-copyright { margin-left: 0; margin-right: auto; }                 /* :412 */

@media (min-width: 1200px) {
  html[dir="rtl"] #about .about-photo { right: auto; left: 0; }                           /* :563 */
}
@media (max-width: 680px) {
  html[dir="rtl"] .cert-lightbox__close { right: auto; left: -10px; }                     /* :375 */
  html[dir="rtl"] .footer-copyright { margin-right: 0; }                                  /* :629 */
  /* mobile road runs down the LEFT gutter on the Hebrew page, so the content inset swaps sides */
  html[dir="rtl"] .section .wrap { padding-right: 15px; padding-left: 62px; }             /* :634 */
  html[dir="rtl"] .hero-lower { padding-right: 0; padding-left: 62px; }                   /* :654 */
  html[dir="rtl"] .hero-sub { margin-right: 0; margin-left: -62px; }                      /* :658 */
  html[dir="rtl"] .hero-sub::before { float: left; shape-outside: polygon(0 0, 80% 0, 28% 100%, 0 100%); }   /* :660 */
  html[dir="rtl"] .hero-title { font-size: clamp(2.5rem, 13vw, 3.7rem); }   /* as big as two lines allow */
  html[dir="rtl"] .btn-primary { padding-inline: 18px; }
}
@media (min-width: 681px) and (max-width: 1199px) {
  html[dir="rtl"] .hero-title { font-size: clamp(3.21rem, 7.85vw, 4.28rem); }   /* styles.css tablet h1 x 1.19 */
}
@media (max-width: 560px) {
  html[dir="rtl"] .cookie-note { align-items: flex-start; }                               /* :670 (flex-start already follows dir) */
}

/* ---------- small Hebrew touch-ups ---------- */
html[dir="rtl"] main p, html[dir="rtl"] main li { text-wrap: pretty; }   /* no single word alone on a last line */
html[dir="rtl"] #method .thought-outline { transform: scaleX(-1); }   /* thought-bubble tail sits bottom-right (mirrors English bottom-left) */
html[dir="rtl"] .contact-methods dt { text-transform: none; }         /* keep "WhatsApp" / "Signal" in their normal case */
/* phone numbers / email: Montserrat Alternates throughout, as in English (otherwise Fredoka would supply the + @ . and spaces) */
html[dir="rtl"] .contact-methods dd a { font-family: "GPS Montserrat Alternates", "Assistant", sans-serif; }
@media (max-width: 389px) {   /* narrow phones: the email must stay clear of the road, which eases inward here */
  html[dir="rtl"] .contact-methods dd a { font-size: min(1.3rem, calc(7.5vw - 7.8px)); }
}

/* ---------- Hebrew legal pages ---------- */
html[dir="rtl"] .legal-page h2 { font-size: calc(var(--text-h2) * .7); }
@media (max-width: 680px) { html[dir="rtl"] .legal-page h2 { font-size: calc(var(--text-h2) * .75); } }
html[dir="rtl"] .legal-page .updated { font-style: normal; }                 /* Hebrew has no true italics */
