/* ============================================================
   TOGLO — RTL + Hebrew overrides for site.css / demo.css / destinations.css.
   Loaded LAST on /he/ pages only (<html lang="he" dir="rtl" data-lang="he">).
   Source of truth for the type swap and the --flip helper: Design System v2.0
   · tokens/i18n.css (+ guidelines/states-rtl.card.html). Webfonts: css/fonts-he.css.
   Rules: only [dir="rtl"] / [data-lang="he"] selectors; tokens, no new colours.
   ============================================================ */

/* ---------- 1 · Type: Hebrew uses Rubik for everything (DS v2.1 i18n tokens) ----------
   Bold Rubik headlines + Rubik UI, chosen by the founder (Oct 2026) over the
   v2.0 Frank Ruhl Libre / Heebo pair. Faces: css/fonts-he.css. Numerals keep
   --font-num (Nunito); the Latin TOGLO wordmark keeps Fraunces. */
:root[data-lang="he"] {
  --font-hebrew: 'Rubik', 'Rubik Hebrew', 'Rubik Fallback Ch', 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif;
  --font-hebrew-ui: 'Rubik', 'Rubik Hebrew', 'Rubik Fallback Ch', 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif;
  --font-display: 'Rubik', 'Rubik Hebrew', 'Rubik Fallback Ch', 'Noto Sans Hebrew', 'Arial Hebrew', system-ui, sans-serif;
  --font-ui: 'Rubik', 'Rubik Hebrew', 'Rubik Fallback Ch', 'Noto Sans Hebrew', 'Arial Hebrew', system-ui, sans-serif;
  --font-heading: var(--font-display);
  --font-body: var(--font-ui);
  --flip: -1; /* DS helper: +1 LTR, -1 RTL */
}
[dir="rtl"] { --flip: -1; }
/* Hebrew has no italics: the signature italic tagline stays upright, weight carries it */
[data-lang="he"] em, [data-lang="he"] i:not([data-icon]), [data-lang="he"] .vmap__note,
[data-lang="he"] blockquote { font-style: normal; }
/* tracked uppercase eyebrows: Hebrew has no case; tracking hurts legibility */
[data-lang="he"] .eyebrow, [data-lang="he"] .lds-eyebrow, [data-lang="he"] .vchip,
[data-lang="he"] .ht-eyebrow, [data-lang="he"] .ht-kind, [data-lang="he"] .footer__h { letter-spacing: 0; }
[data-lang="he"] body { line-height: 1.65; }
/* numbers, prices, ranges, scores read LTR inside RTL text (DS states-rtl) */
[dir="rtl"] [dir="ltr"] { unicode-bidi: isolate; }
[dir="rtl"] .price__amt, [dir="rtl"] .ht-xp, [dir="rtl"] .lds-xp, [dir="rtl"] .ldr-time,
[dir="rtl"] .ht-status, [dir="rtl"] .lds-status, [dir="rtl"] [data-count] { unicode-bidi: isolate; }
[dir="rtl"] .price__amt { direction: ltr; display: inline-block; }
[dir="rtl"] .price__amt { text-align: right; } /* LTR digits, but the line still starts on the reading side */
/* inputs that hold Latin data stay LTR (email) */
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="date"] { direction: ltr; text-align: right; }
[dir="rtl"] input[type="email"]::placeholder { text-align: right; }

/* ---------- 2 · Directional icons: arrows / chevrons point the reading way ---------- */
[dir="rtl"] [data-icon="arrowRight"] svg, [dir="rtl"] [data-icon="arrowLeft"] svg,
[dir="rtl"] [data-icon="chevronRight"] svg, [dir="rtl"] [data-icon="chevronLeft"] svg { transform: scaleX(var(--flip)); }

/* ---------- 3 · Global chrome ---------- */
[dir="rtl"] .skip-link { left: auto; right: 12px; }
[dir="rtl"] .scrollprog { transform-origin: 100% 50%; }
[dir="rtl"] .totop { right: auto; left: 22px; }
/* the language switch (.langsw) is styled in site.css and is always LTR */
/* nav: logo on the right, the rest pushed to the left */
[dir="rtl"] .nav__inner > .wordmark { margin-right: 0; margin-left: auto; }
/* the TOGLO wordmark is Latin: keep its letters + icons in LTR order */
[dir="rtl"] .wordmark { direction: ltr; }
[data-lang="he"] .wordmark { font-family: 'Fraunces', 'Fraunces Fallback', Georgia, serif; }
/* footer columns start on the right */
[dir="rtl"] .footer__brand, [dir="rtl"] .footer__col { align-items: flex-start; } /* flex-start = right in RTL */
/* accessibility panel */
[dir="rtl"] .a11y-panel { text-align: right; }
[dir="rtl"] .a11y-panel:not([hidden]) { transform-origin: top left; }
[dir="rtl"] .a11y-sw::after { left: auto; right: 3px; }
[dir="rtl"] .a11y-row input:checked + .a11y-sw::after { transform: translateX(-18px); }
/* consent banner (privacy choices) */
[dir="rtl"] .pchoice { text-align: right; }
@media (min-width: 761px) { [dir="rtl"] .pchoice { left: auto; right: 24px; } }
/* form consent line + validation messages */
[dir="rtl"] .consent { text-align: right; }
[dir="rtl"] .form-msg, [dir="rtl"] .waitlist__error, [dir="rtl"] .waitlist__success { text-align: right; }
[dir="rtl"] .waitlist__inner .form-msg, [dir="rtl"] .waitlist__inner .waitlist__error, [dir="rtl"] .waitlist__inner .waitlist__success { text-align: center; }
[dir="rtl"] .hp { left: auto; right: -9999px; }
[dir="rtl"] select.field { background-position: left 16px center; padding-right: 18px; padding-left: 44px; }

/* ---------- 4 · Home: hero, teaser, chat, marquee ---------- */
[dir="rtl"] .orb--gold { right: auto; left: -180px; }
[dir="rtl"] .orb--plum { left: auto; right: -160px; }
[dir="rtl"] .ai .orb--gold { right: auto; left: -200px; }
[dir="rtl"] .edges .orb--gold { right: auto; left: -200px; }
[dir="rtl"] .hero__mascot { right: auto; left: clamp(8px, 5vw, 90px); }
[dir="rtl"] .hero__teaser { right: auto; left: clamp(8px, 5vw, 84px); }
@media (min-width: 901px) and (max-width: 1440px) { [dir="rtl"] .hero__inner { padding-right: 0; padding-left: 300px; } }
[dir="rtl"] .ht-mascot { right: auto; left: -26px; transform: scaleX(-1); }
[dir="rtl"] .ht-pause { left: auto; right: -14px; }
@media (max-width: 1120px) { [dir="rtl"] .hero__teaser { right: auto; left: 2vw; } [dir="rtl"] .ht-mascot { right: auto; left: -4px; } }
@media (max-width: 900px) { [dir="rtl"] .hero__teaser { left: auto; } [dir="rtl"] .ht-mascot { left: auto; right: calc(50% + 84px); } }
/* chat bubbles: "me" sits on the left in RTL, the AI on the right */
[dir="rtl"] .bubble--ai { border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
[dir="rtl"] .bubble--me { margin-left: 0; margin-right: auto; border-bottom-right-radius: 16px; border-bottom-left-radius: 5px; }
/* marquee rows run in the reading direction (right → left content, moving right) */
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
[dir="rtl"] .dmarquee__track { animation-name: dmarquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes dmarquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
[dir="rtl"] .marquee::before { background: linear-gradient(90deg, var(--indigo-deep), transparent); }

/* ---------- 5 · Pricing, magic, cards ---------- */
[dir="rtl"] .price__cur { margin-right: 0; margin-left: 2px; }
[dir="rtl"] .exp__sparkle { right: auto; left: -14px; }
[dir="rtl"] .vchip { right: auto; left: 14px; }
[dir="rtl"] .vmap__note { text-align: right; }

/* ---------- 6 · Contact + legal ---------- */
[dir="rtl"] .contact__form .btn { align-self: flex-start; }
[dir="rtl"] .legal ul, [dir="rtl"] .legal ol { padding-left: 0; padding-right: 1.4em; }
[dir="rtl"] .legal th, [dir="rtl"] .legal td { text-align: right; }

/* ---------- 7 · Destinations ---------- */
[dir="rtl"] .dest__bar input { padding: 0 46px 0 18px; }
[dir="rtl"] .dest__bar i { left: auto; right: 16px; }

/* ---------- 8 · Creator wizard ---------- */
[dir="rtl"] .opt[aria-pressed="true"]::after, [dir="rtl"] .opt[aria-checked="true"]::after { right: auto; left: -7px; }
[dir="rtl"] .cdest .flag { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .cmode { text-align: right; }
[dir="rtl"] .cband b { text-transform: none; }
[dir="rtl"] .toggle::after { left: auto; right: 2px; }
[dir="rtl"] .cswitch input:checked + .toggle::after { transform: translateX(-20px); }
[dir="rtl"] .creview-row .v { text-align: left; }
[dir="rtl"] .cwiz__steps { padding-right: 0; padding-left: 150px; }
[dir="rtl"] .cwiz__steps .a11y { right: auto; left: 16px; }
[dir="rtl"] .cwiz__steps .langsw { right: auto; left: 66px; }

/* ---------- 9 · Spectator ---------- */
[dir="rtl"] .spec__head .a11y { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .spec__head .destpill { margin-left: 10px; margin-right: auto; }
[dir="rtl"] .avstack .av { margin-left: 0; margin-right: -8px; }
[dir="rtl"] .avstack .av:first-child { margin-right: 0; }

/* ---------- 10 · Living demo (demo.css) ---------- */
[dir="rtl"] .lds-opt, [dir="rtl"] .ldm-opt { text-align: right; }
[dir="rtl"] .ldr-chip { margin-left: 0; margin-right: auto; }
[dir="rtl"] .ldt-msg--me { border-bottom-right-radius: var(--radius-card); border-bottom-left-radius: var(--radius-sm); }
[dir="rtl"] .ldt-msg--them { border-bottom-left-radius: var(--radius-card); border-bottom-right-radius: var(--radius-sm); }
@keyframes ldShimmerRtl { to { transform: translateX(-100%); } }
[dir="rtl"] .ldp-secret::after { transform: translateX(100%); animation-name: ldShimmerRtl; }
[dir="rtl"] .ldemo__screen { text-align: right; }
@media (max-width: 900px) {
  [dir="rtl"] .ldnode:first-child { margin-left: 0; margin-right: auto; }
  [dir="rtl"] .ldnode:last-child { margin-right: 0; margin-left: auto; }
}

/* ---------- 11 · Home "why" (old way / TOGLO way) ---------- */
/* the arrow icon is already mirrored (section 2); on phones the column stacks, so turn it to point down */
@media (max-width: 900px) { [dir="rtl"] .contrast__arrow { transform: rotate(-90deg); } }

/* ---------- 12 · Passport Stamps (passport.css): /destinations game + home teaser ---------- */
[dir="rtl"] .pp-cover__word { direction: ltr; }
[dir="rtl"] .pp-cover--tilt { transform: rotate(4deg); }
@keyframes ppFloatRtl { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-6px); } }
[dir="rtl"] .pp-cover--tilt { animation-name: ppFloatRtl; }
[dir="rtl"] .pp-seg__opt > span { padding: 10px 42px 10px 14px; }
[dir="rtl"] .pp-seg__opt > span::before { left: auto; right: 14px; }
[dir="rtl"] .pp-hud .pp-textbtn { margin-left: 0; margin-right: auto; }
[dir="rtl"] .pp-timer__bar i { transform-origin: 100% 50%; }
[dir="rtl"] .pp-timer__t { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .pp-palette__sw { padding-left: 0; padding-right: 5px; }
[dir="rtl"] .pp-palette__sw span { margin-left: 0; margin-right: -5px; }
[dir="rtl"] .pp-clue__stamp { right: auto; left: 14px; }
[dir="rtl"] .pp-mini__stamp { right: auto; left: 8px; }
@media (max-width: 520px) { [dir="rtl"] .pp-clue__stamp { right: auto; left: 10px; } }
[dir="rtl"] .pp-opt__k { left: auto; right: 9px; }
[dir="rtl"] .pp-opt__mark { right: auto; left: 8px; }
[data-lang="he"] .pp-opt.is-picked .pp-opt__mark::before { content: 'הבחירה שלכם'; letter-spacing: 0; }
[data-lang="he"] .pp-opts--row .pp-opt.is-picked .pp-opt__mark::before { content: 'בחרתם'; }
[dir="rtl"] .pp-badge { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .pp-data__mrz { direction: ltr; text-align: left; }
[dir="rtl"] .pp-stamp text { direction: rtl; }
[data-lang="he"] .pp-seg legend, [data-lang="he"] .pp-data__k, [data-lang="he"] .pp-page__k,
[data-lang="he"] .pp-data__dl dt, [data-lang="he"] .pp-badge { letter-spacing: 0; }
/* the book: Hebrew books open the other way, so the cover leaf hinges on its right edge and flips to the right */
[dir="rtl"] .pp-book { text-align: right; }
@media (min-width: 721px) {
  [dir="rtl"] .pp-book__left { border-radius: 0 14px 14px 0; box-shadow: inset 22px 0 26px -22px rgba(33,27,78,.32); border-right: 1px solid var(--line); border-left: 0; }
  [dir="rtl"] .pp-book__right { border-radius: 14px 0 0 14px; box-shadow: inset -22px 0 26px -22px rgba(33,27,78,.32); border-left: 1px solid var(--line); border-right: 0; }
  [dir="rtl"] .pp-leaf { left: 0; transform-origin: 100% 50%; }
  [dir="rtl"] .pp-book.is-open .pp-leaf, html.motion-paused[dir="rtl"] .pp-book.is-open .pp-leaf { transform: rotateY(180deg); }
  [dir="rtl"] .pp-leaf__front, [dir="rtl"] .pp-leaf__front .pp-cover { border-radius: 14px 0 0 14px; }
  [dir="rtl"] .pp-leaf__back { transform: rotateY(-180deg); border-radius: 0 14px 14px 0; box-shadow: inset 22px 0 26px -22px rgba(33,27,78,.32); border-right: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 860px) { [dir="rtl"] .pp-start__setup { text-align: right; } }

/* ---------- 13 · Rubik parity with the English site (Oct 2026) ----------
   Hebrew has no capitals, so the tracked-uppercase labels that read as crisp
   12px caps in English look tiny in Hebrew: lift them a step and keep tracking off.
   Rubik 800 is heavier than Fraunces 900 per pixel, so headlines drop the
   negative tracking and take a touch more leading. Hebrew has no true italic
   either: every signature-italic line stands upright and leans on weight. */
:root[data-lang="he"] { --fw-black: 800; } /* Rubik's heaviest cut: no synthetic bold */
/* headlines: same sizes as English, tracking 0, comfortable leading, balanced lines */
[data-lang="he"] .hero__title { letter-spacing: 0; line-height: 1.1; }
[data-lang="he"] .page-hero h1 { letter-spacing: 0; line-height: 1.12; }
[data-lang="he"] .section__title, [data-lang="he"] .waitlist__title, [data-lang="he"] .ctaband h2 { letter-spacing: 0; line-height: 1.14; }
[data-lang="he"] .ctaband p { text-wrap: balance; }
/* eyebrows / kickers */
[data-lang="he"] .eyebrow { font-size: 0.875rem; }
[data-lang="he"] .dest__label { font-size: 0.875rem; letter-spacing: 0; }
[data-lang="he"] .footer__h { font-size: 0.8125rem; }
[data-lang="he"] .acard__k { font-size: 0.6875rem; letter-spacing: 0; }
[data-lang="he"] .edge__tag, [data-lang="he"] .road__when, [data-lang="he"] .scard__sci { font-size: 0.75rem; letter-spacing: 0; }
[data-lang="he"] .ht-eyebrow { font-size: 0.6563rem; }
[data-lang="he"] .ht-kind { font-size: 0.625rem; }
[data-lang="he"] .vchip { font-size: 0.6875rem; letter-spacing: 0; }
[data-lang="he"] .price__soon, [data-lang="he"] .price__best { font-size: 0.75rem; letter-spacing: 0; }
[data-lang="he"] .lds-eyebrow { font-size: 0.6875rem; letter-spacing: 0; }
[data-lang="he"] .pp-cover__k { font-size: 0.75rem; letter-spacing: .04em; }
[data-lang="he"] .pp-seg legend, [data-lang="he"] .pp-clue__k { font-size: 0.8125rem; letter-spacing: 0; }
[data-lang="he"] .pp-data__k, [data-lang="he"] .pp-page__k { font-size: 0.75rem; }
[data-lang="he"] .pp-data__dl dt { font-size: 0.6875rem; }
/* no faux-italic Hebrew: the tagline lines stand upright */
[data-lang="he"] .tagline, [data-lang="he"] .why__line, [data-lang="he"] .hero__sub em,
[data-lang="he"] .mission-card__kind, [data-lang="he"] .ht-card--artifact em, [data-lang="he"] .pp-cover__tag { font-style: normal; }
[data-lang="he"] .why__line { font-weight: 600; }
/* keep short link phrases whole ("לפרטים על המחירים") */
[data-lang="he"] .how__extra a { white-space: nowrap; }
/* the home "portal to the place" line carries its italic inline, so it needs the override */
[data-lang="he"] p[style*="font-style:italic"] { font-style: normal !important; font-weight: 600 !important; }
[data-lang="he"] .vmap__note { font-weight: 600; }
/* Hebrew card titles wrap short words onto a line of their own ("…דף אחר / דף"): balance them */
[data-lang="he"] main h2, [data-lang="he"] main h3, [data-lang="he"] .origin__quote, [data-lang="he"] .keepsake__title { text-wrap: balance; }
[data-lang="he"] main p, [data-lang="he"] main li { text-wrap: pretty; }
/* footer + nav: Hebrew words are short and x-height-light, so the links read a size smaller than Poppins */
[data-lang="he"] .footer__col a { font-size: 0.9375rem; }
[data-lang="he"] .footer__brand .footer__tag { font-size: 0.875rem; }
[data-lang="he"] .nav__links a:not(.btn) { font-size: 0.9688rem; }

/* home pricing note: keep price + unit together and balance the two lines */
[data-lang="he"] .how__extra { text-wrap: balance; }
