/* Asteria prototype, round 2 v11: the language button, its list, and direction fixes. */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; }
.lang-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-pop { position: fixed; z-index: 60; top: 72px; left: 8px; display: grid; min-width: 180px; padding: 6px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(47, 34, 27, 0.18); transform-origin: top; pointer-events: auto; }
.lang-pop button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 16px; background: transparent; font-size: 16px; color: var(--cocoa); text-align: start; transition: background 0.25s; }
.lang-pop [aria-checked="true"] { background: var(--cocoa); color: var(--paper); }


/* Language lists in the menu and the footer. */
.lang-list { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-list button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font-size: 14px; opacity: 0.75; }
.lang-list [aria-pressed="true"] { opacity: 1; background: var(--cream); color: var(--forest); border-color: var(--cream); }
.langs.lang-list { letter-spacing: 0; justify-content: center; }

/* Arrows point the way you read: flip them for left-to-right languages. */
#site[dir="ltr"] .sd-arrows svg, #site[dir="ltr"] .cl-cta svg { transform: scaleX(-1); }

/* Arabic letters join, so no letter spacing there (the Latin footer name keeps its own). */
#site[lang="ar"] *:not(.giant):not(.g-l) { letter-spacing: normal !important; }

/* Closed means closed, even before the page skeleton's own [hidden] rule. */
.lang-pop[hidden] { display: none; }

/* Latin and Cyrillic kickers are longer than the Hebrew one: tighter spacing keeps them on one line. */
#site:not([lang="he"]) .hero-title .kicker { letter-spacing: 0.12em; }

/* Hover and press in the language list: a soft fill slides in from the start side, the label
   steps in a little, and a press gives a small squeeze. */
.lang-pop button { position: relative; isolation: isolate; overflow: hidden; transition: color 0.3s, padding 0.35s var(--ease), scale 0.2s var(--ease); }
.lang-pop button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--sand); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
#site[dir="ltr"] .lang-pop button::before { transform-origin: left; }
.lang-pop button:hover::before { transform: scaleX(1); }
.lang-pop button:hover { padding-inline-start: 22px; }
.lang-pop button:active { scale: 0.96; }
.lang-pop [aria-checked="true"]::before { display: none; }
.lang-pop button:focus:not(:focus-visible) { outline: none; }
.lang-pop button:focus-visible { outline: 2px solid var(--clay); outline-offset: -2px; }

/* The main menu: links lift, a sage line grows under them, and a press squeezes. */
.menu a { position: relative; transition: color 0.3s, translate 0.35s var(--ease), scale 0.2s var(--ease); }
.menu a::after { content: ""; position: absolute; inset-inline: 32%; bottom: 0.06em; height: 3px; border-radius: 3px; background: var(--sage); transform: scaleX(0); transition: transform 0.45s var(--ease); }
.menu a:hover { color: var(--sage); translate: 0 -3px; }
.menu a:hover::after { transform: scaleX(1); }
.menu a:active { scale: 0.97; }

/* Pill buttons (menu, language, close) and the language chips. */
.pill-btn { transition: translate 0.25s var(--ease), scale 0.2s var(--ease), box-shadow 0.3s, background 0.3s; }
.pill-btn:hover { translate: 0 -1px; box-shadow: 0 8px 18px rgba(47, 34, 27, 0.14); }
.pill-btn:active { scale: 0.94; }
.lang-list button { transition: background 0.3s, color 0.3s, opacity 0.3s, scale 0.2s var(--ease); }
.lang-list button:hover { opacity: 1; background: rgba(239, 231, 216, 0.14); }
.lang-list [aria-pressed="true"]:hover { background: var(--cream); }
.lang-list button:active { scale: 0.94; }
