/* ==========================================================================
   Atlaso --- base.css
   Design tokens, fonts, reset, typography, buttons.
   Title font: Monopolitser (bundled). Body: clean system stack.
   NOTE: Google Sans was not present in /fonts, so a high-quality system
   sans-serif fallback is used for body text (see --font-body).
   ========================================================================== */

@font-face {
    font-family: 'Monopolitser';
    src: url('/assets/css/../fonts/FbMonopolitserHeb-Black.woff2?v=official-20260806') format('woff2'),
         url('/assets/css/../fonts/FbMonopolitserHeb-Black.woff?v=official-20260806') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Anton --- used ONLY for Latin (English) runs inside titles. A JS pass
   (type.js) wraps A---Z/0---9 runs inside title elements in <i class="lat">. */
@font-face {
    font-family: 'Anton';
    src: url('/assets/css/../fonts/Anton-Regular.woff2') format('woff2'), url('/assets/css/../fonts/Anton-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* Google Sans --- body/UI font (Latin). Hebrew glyphs fall back to the Hebrew
   stack in --font-body, since Google Sans does not include Hebrew. */
@font-face {
    font-family: 'GoogleSans';
    src: url('/assets/css/../fonts/GoogleSans-Regular.woff2') format('woff2'), url('/assets/css/../fonts/GoogleSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'GoogleSans';
    src: url('/assets/css/../fonts/GoogleSans-Medium.woff2') format('woff2'), url('/assets/css/../fonts/GoogleSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'GoogleSans';
    src: url('/assets/css/../fonts/GoogleSans-Bold.woff2') format('woff2'), url('/assets/css/../fonts/GoogleSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

/* ------ Display faces --- defined HERE (loaded site-wide + admin) so the font
      picker shows their real, distinct shapes everywhere. --------------------------------------------- */
@font-face { font-family: 'TelAvivBrutalist'; src: url('/assets/css/../fonts/TelAviv-BrutalistBold.woff2') format('woff2'), url('/assets/css/../fonts/TelAviv-BrutalistBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TelAvivModernist'; src: url('/assets/css/../fonts/TelAviv-ModernistBold.woff2') format('woff2'), url('/assets/css/../fonts/TelAviv-ModernistBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TelAvivEclectic'; src: url('/assets/css/../fonts/TelAviv-EclecticHebrewNo1.woff2') format('woff2'), url('/assets/css/../fonts/TelAviv-EclecticHebrewNo1.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'ReisingerMichal'; src: url('/assets/css/../fonts/Reisinger-Michal-Bold.woff2') format('woff2'), url('/assets/css/../fonts/Reisinger-Michal-Bold.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'ReisingerNeta'; src: url('/assets/css/../fonts/Reisinger-Neta-Bold.woff2') format('woff2'), url('/assets/css/../fonts/Reisinger-Neta-Bold.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'AmaticSC'; src: url('/assets/css/../fonts/AmaticSC-Bold.woff2') format('woff2'), url('/assets/css/../fonts/AmaticSC-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Gloock'; src: url('/assets/css/../fonts/Gloock-Regular.woff2') format('woff2'), url('/assets/css/../fonts/Gloock-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'GveretLevin'; src: url('/assets/css/../fonts/GveretLevin-Regular.ttf?v=20260814') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'LondrinaSolid'; src: url('/assets/css/../fonts/LondrinaSolid-Black.woff2') format('woff2'), url('/assets/css/../fonts/LondrinaSolid-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'LondrinaSolid'; src: url('/assets/css/../fonts/LondrinaSolid-Regular.woff2') format('woff2'), url('/assets/css/../fonts/LondrinaSolid-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
    /* Brand palette */
    --c-ink: #16161f;
    --c-ink-soft: #3a3a4a;
    --c-muted: #8a8a9a;
    --c-line: #e9e9f0;
    --c-bg: #f6f6fa;
    --c-card: #ffffff;
    --c-primary: #E8837E;   /* pastel coral --- softer than the old neon pink */
    --c-primary-d: #D96C66;
    --c-accent: #ffb703;
    --c-teal: #06a77d;
    --c-blue: #1d70b8;

    --grad-brand: linear-gradient(135deg, #E8837E 0%, #F2BE8D 100%); /* coral → pastel apricot */
    --grad-night: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);

    --font-title: 'Monopolitser', 'Arial Hebrew', sans-serif;
    --font-body: 'GoogleSans', 'Assistant', 'Arial Hebrew', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 8px rgba(20, 20, 40, 0.06);
    --shadow: 0 10px 30px rgba(20, 20, 40, 0.10);
    --shadow-lg: 0 24px 60px rgba(20, 20, 40, 0.18);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --site-nav-h: 76px;
    --flowbar-h: 42px;
    --topbar-h: var(--site-nav-h);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* --- Typography --------------------------------------------------------- */
.display {
    font-family: var(--font-title);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-size: clamp(2.6rem, 7vw, 5.6rem);
}
.display--sm { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.display .line { display: block; }
.display .accent {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Latin run inside a Hebrew title -> Anton. Inherits gradient/color. */
.lat {
    font-family: 'Anton', var(--font-title);
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.01em;
}
.eyebrow {
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #A94743;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.lead {
    color: var(--c-ink-soft);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    max-width: 46ch;
    line-height: 1.7;
}

/* Keep the Hebrew application geometry stable even when the browser UI is
   English or an extension attempts to infer a different writing direction. */
html, body, #site-root, .app-main { direction: rtl; }
input, textarea, select, button { direction: rtl; }
input[type="email"], input[type="tel"], input[type="url"], input[type="number"] { direction: ltr; text-align: right; }

/* --- Layout shell ------------------------------------------------------- */
.app-main { min-height: calc(100vh - var(--topbar-h)); }

.topbar {
    height: var(--site-nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 40px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar .brand-logo { height: clamp(42px, 4.2vw, 54px); }
.is-album-flow { --topbar-h: 64px; }
.topbar--flow { --site-nav-h: 64px; height: 64px; }
.topbar--flow .brand-logo { height: 38px; }
.topbar--flow .steps { margin-inline: auto; }
.topbar-nav { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 2.2vw, 30px); margin-inline: auto; font-weight: 800; color: rgba(22,22,31,.78); }
.topbar-nav a { white-space: nowrap; transition: color .2s, transform .2s var(--ease); }
.topbar-nav a:hover { color: var(--c-primary-d); transform: translateY(-1px); }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.topbar-account--wide { width: auto; min-width: 44px; padding: 0 13px; gap: 7px; border-radius: 999px; }
.topbar-account__label { font-size: .82rem; font-weight: 800; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.topbar-create { white-space: nowrap; }
.topbar-menu { display: none; position: relative; }
.topbar-menu summary { list-style: none; width: 44px; height: 44px; border-radius: 50%; background: var(--c-bg); display: grid; place-content: center; gap: 4px; cursor: pointer; }
.topbar-menu summary::-webkit-details-marker { display: none; }
.topbar-menu summary span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--c-ink); }
.topbar-menu > nav { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: min(280px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--c-line); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; }
.topbar-menu > nav a { min-height: 46px; display: flex; align-items: center; padding: 8px 12px; border-radius: 6px; font-weight: 800; }
.topbar-menu > nav a:hover { background: var(--c-bg); color: var(--c-primary-d); }
.brand {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}
.brand-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--grad-brand);
    box-shadow: 0 0 0 4px rgba(232, 131, 126, 0.15);
}
/* albook wordmark logo in the header */
.brand-logo { display: block; height: clamp(30px, 3.4vw, 40px); width: auto; }
/* Progress stepper (not a menu): numbered steps with connecting line. */
.steps { display: flex; align-items: center; gap: 0; }
.step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--c-muted);
    white-space: nowrap;
    padding: 0 10px;
}
/* connector line between steps */
.step::before {
    content: '';
    position: absolute;
    inset-inline-end: -10px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: var(--c-line);
    transform: translateY(-50%);
}
.step:first-child::before { display: none; }
.step__num {
    width: 24px; height: 24px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    background: var(--c-line);
    color: var(--c-muted);
    transition: all 0.3s var(--ease);
}
.step__label { transition: color 0.3s var(--ease); }
.step.is-done { color: #24708a; }
.step.is-done .step__num { background: #24708a; color: #fff; box-shadow: 0 0 0 4px #e3f0f4; }
.step.is-done::before { background: #24708a; }
.step.is-active { color: var(--c-ink); }
.step.is-active .step__num { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 12px rgba(232, 131, 126,0.4); transform: scale(1.08); }
.step.is-upcoming .step__label { color: var(--c-muted); }

/* Topbar account button */
.topbar-account { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--c-ink); background: var(--c-bg); transition: background 0.2s, transform 0.2s var(--ease); flex: none; }
.topbar-account:hover { background: var(--c-line); transform: translateY(-1px); }
.topbar-account__dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--c-teal); box-shadow: 0 0 0 2px #fff; }
/* On medium widths show only numbers to save space. */
@media (max-width: 1080px) {
    .step__label { display: none; }
    .step { padding: 0 8px; }
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
    will-change: transform;
    line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 20px rgba(232, 131, 126, 0.32); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(232, 131, 126, 0.42); }
.btn--ghost { background: #fff; color: var(--c-ink); box-shadow: var(--shadow-sm); border: 1px solid var(--c-line); }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--xl { padding: 17px 34px; font-size: 1.12rem; }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Admin-managed site banner */
.site-banner {
    background: var(--grad-brand); color: #fff; text-align: center;
    padding: 10px 16px; font-weight: 600; font-size: 0.95rem;
}
.site-banner a { text-decoration: underline; }

/* Visibility helpers */
[data-mobile-only] { display: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------ Micro-interactions (site-wide polish) --------------------------------------------------------------------------------------------- */
/* Pressed feel on every button. */
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.08s; }
/* CTA arrow nudges along the reading direction on hover. */
.btn svg { transition: transform 0.25s var(--ease, ease); }
.btn--primary:hover svg { transform: translateX(-4px); }
/* Word-reveal spans (global heading animation) --- keep natural spacing. */
.hw { will-change: transform, opacity; }

/* ------ Interactive range sliders (site-wide) --------------------------------------------------------------------------------------------- */
input[type="range"].rx {
    -webkit-appearance: none; appearance: none; width: 100%; height: 26px;
    background: transparent; cursor: pointer; --p: 50%;
}
input[type="range"].rx::-webkit-slider-runnable-track {
    height: 8px; border-radius: 999px;
    background: linear-gradient(to left, var(--c-primary, #E8837E) var(--p), #e8eaf2 var(--p));
}
input[type="range"].rx::-moz-range-track { height: 8px; border-radius: 999px; background: #e8eaf2; }
input[type="range"].rx::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--c-primary, #E8837E); }
input[type="range"].rx::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%;
    background: #fff; border: 2.5px solid var(--c-primary, #E8837E);
    box-shadow: 0 3px 10px rgba(20,23,40,0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"].rx::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%; background: #fff;
    border: 2.5px solid var(--c-primary, #E8837E); box-shadow: 0 3px 10px rgba(20,23,40,0.22);
    transition: transform 0.15s ease;
}
input[type="range"].rx:active::-webkit-slider-thumb, input[type="range"].rx:focus-visible::-webkit-slider-thumb {
    transform: scale(1.25); box-shadow: 0 5px 16px rgba(232, 131, 126,0.4);
}
input[type="range"].rx:active::-moz-range-thumb { transform: scale(1.25); }
.rx-bubble {
    position: fixed; z-index: 99; transform: translateX(-50%) translateY(6px);
    background: var(--c-ink, #16161f); color: #fff; font-size: 0.75rem; font-weight: 700;
    padding: 4px 9px; border-radius: 8px; pointer-events: none; opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease; direction: ltr;
}
.rx-bubble.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.rx-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: var(--c-ink, #16161f); }

/* ------ Accessibility: visible keyboard focus everywhere ------------------------------------------------------------ */
:focus-visible { outline: 3px solid rgba(232, 131, 126, 0.55); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible { outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-width: 2px; }
