/* ===== AIdemica — Landing v3 (editorial, real product, no AI-slop) ===== */
body { background: var(--cream); color: var(--ink); }

/* ───── NAVBAR ───── */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 6%;
    background: rgba(250, 246, 238, 0.78);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    position: sticky; top: 0; z-index: 100;
    transition: var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--border); background: rgba(250, 246, 238, 0.95); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a:not(.btn) {
    font-size: 13.5px; font-weight: 500; color: var(--text-2);
    padding: 8px 12px; border-radius: 8px; transition: var(--transition);
}
.nav-links a:not(.btn):hover { background: rgba(15,61,46,0.06); color: var(--primary); }
.nav-links .nav-divider { width: 1px; height: 18px; background: var(--border); margin: 0 6px; }
.lang-switch {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 10px; border-radius: 8px; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--text-2);
    background: transparent; border: 1px solid var(--border);
    transition: var(--transition); font-family: 'JetBrains Mono', monospace;
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.lang-switch i { font-size: 10px; opacity: 0.6; margin-left: 2px; }

/* Dropdown menu under the lang plate */
.lang-wrap { position: relative; display: inline-flex; }
.lang-menu {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 4px; min-width: 170px;
    display: none; z-index: 200;
}
.lang-menu.on { display: block; animation: langFade .15s ease both; }
@keyframes langFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lang-menu button {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    background: none; border: none; cursor: pointer; font-size: 13px;
    color: var(--text); border-radius: 7px; font-family: inherit; transition: .1s;
    font-weight: 500;
}
.lang-menu button:hover { background: rgba(16,185,129,.1); color: var(--primary); }
.curr-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(15,61,46,0.04); }
.curr-switch button {
    border: none; background: transparent; padding: 5px 9px; border-radius: 6px;
    font-size: 11.5px; font-weight: 700; color: var(--text-light); cursor: pointer;
    font-family: 'JetBrains Mono', monospace; transition: var(--transition);
}
.curr-switch button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.curr-switch button:not(.active):hover { color: var(--text); }
.btn-login { font-size: 13.5px; font-weight: 600; color: var(--primary); padding: 8px 14px; }
.btn-login:hover { color: var(--accent-2); }

/* ───── HERO ───── */
.hero {
    padding: 70px 6% 80px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(15,61,46,0.08) 1.2px, transparent 0);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
    pointer-events: none; z-index: 0;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
    background: rgba(45,212,191,0.1); border: 1px solid rgba(45,212,191,0.3);
    border-radius: 99px; font-size: 11.5px; font-weight: 700;
    color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 22px;
}
.hero-eyebrow .dot-live { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 0 var(--accent); animation: tagPulse 2s infinite; }
.hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--primary);
    margin-bottom: 22px;
    font-variation-settings: "opsz" 144;
}
.hero h1 em {
    font-style: italic;
    color: var(--accent-2);
    font-variation-settings: "opsz" 144;
}
.hero h1 .underline {
    background: linear-gradient(180deg, transparent 65%, rgba(45,212,191,0.35) 65%, rgba(45,212,191,0.35) 95%, transparent 95%);
    padding: 0 4px;
}
/* min-height reserves layout space before i18n.js swaps text (different
   languages have different lengths → without reservation, the hero block
   below shifts on first paint, triggering CLS). Values calibrated for
   longest locale (typically RU/KK) to prevent ANY downward shift. */
.hero h1 { min-height: 3.2em; }
.hero-sub { font-size: 18px; color: var(--text-2); line-height: 1.55; max-width: 540px; margin-bottom: 32px; min-height: max(170px, 7em); }
.hero-cta { display: flex; gap: 14px; align-items: center; margin-bottom: 36px; flex-wrap: wrap; min-height: 60px; }
.hero-cta .btn { padding: 14px 26px; font-size: 14.5px; }
.hero-cta .btn-ghost-arrow {
    background: transparent; border: none; color: var(--text); padding: 14px 8px; font-size: 14.5px;
    font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit; transition: var(--transition);
}
.hero-cta .btn-ghost-arrow:hover { color: var(--accent-2); gap: 12px; }
.hero-cta .btn-ghost-arrow i { font-size: 11px; }

.hero-stats {
    display: flex; gap: 36px; padding-top: 24px;
    border-top: 1px solid var(--border);
    min-height: 76px;
}
.hero-stats .stat { }
.hero-stats .num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 32px; font-weight: 700;
    color: var(--primary); line-height: 1;
    letter-spacing: -0.02em;
}
.hero-stats .lbl { font-size: 11.5px; color: var(--text-light); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ───── HERO chat preview (right column — replaces illustration) ───── */
.chat-preview {
    background: #fff; border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15,61,46,0.12), 0 4px 12px rgba(15,61,46,0.04);
    padding: 0; overflow: hidden;
    transform: rotate(0.5deg);
}
.chat-preview .cp-head {
    padding: 12px 16px; display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border); background: var(--bg);
}
.chat-preview .cp-head .dots { display: flex; gap: 5px; }
.chat-preview .cp-head .dots span { width: 10px; height: 10px; border-radius: 50%; }
.chat-preview .cp-head .dots span:nth-child(1) { background: #fb7185; }
.chat-preview .cp-head .dots span:nth-child(2) { background: #fbbf24; }
.chat-preview .cp-head .dots span:nth-child(3) { background: #34d399; }
.chat-preview .cp-head .title { font-size: 12px; color: var(--text-light); margin-left: auto; font-family: 'JetBrains Mono', monospace; }
.chat-preview .cp-body { padding: 18px 16px 14px; min-height: 380px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, #fafafa 0%, #fff 100%); }
.cp-msg { display: flex; gap: 10px; max-width: 90%; animation: cpSlide 0.4s ease backwards; }
.cp-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.cp-msg .av { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.cp-msg .av-ai { background: rgba(45,212,191,0.15); }
.cp-msg .av-ai img { width: 22px; height: 22px; object-fit: contain; }
.cp-msg .av-user { background: var(--accent-soft); overflow: hidden; padding: 0; }
.cp-msg .av-user img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-msg .bub {
    background: #fff; border: 1px solid var(--border);
    padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5;
    color: var(--text);
}
.cp-msg.user .bub { background: var(--primary); color: #fff; border-color: transparent; border-top-right-radius: 3px; }
.cp-msg.ai .bub { border-top-left-radius: 3px; }
.cp-msg .bub strong { color: var(--accent-2); font-weight: 600; }
.cp-msg .bub code { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: rgba(15,61,46,0.06); padding: 1px 5px; border-radius: 4px; color: var(--primary); }

@keyframes cpSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cp-msg:nth-child(1) { animation-delay: 0.1s; }
.cp-msg:nth-child(2) { animation-delay: 0.6s; }
.cp-msg:nth-child(3) { animation-delay: 1.2s; }
.cp-msg:nth-child(4) { animation-delay: 2.0s; }
.cp-msg:nth-child(5) { animation-delay: 2.6s; }

/* Activity chip mid-chat */
.cp-activity {
    align-self: flex-start; display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: rgba(45,212,191,0.08); border: 1px solid rgba(45,212,191,0.2);
    border-radius: 10px; font-size: 11.5px; color: var(--text-2);
    animation: cpSlide 0.4s ease 1.7s backwards;
}
.cp-activity .spin {
    width: 12px; height: 12px; border: 2px solid rgba(45,212,191,0.25);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cp-typing { padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 12px; border-top-left-radius: 3px; align-self: flex-start; animation: cpSlide 0.4s ease 3s backwards; }
.cp-typing span { display: inline-block; width: 5px; height: 5px; background: var(--text-light); border-radius: 50%; margin: 0 1px; animation: tDot 1.4s infinite; }
.cp-typing span:nth-child(2) { animation-delay: 0.15s; }
.cp-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes tDot { 0%,60%,100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Sticker on chat-preview corner */
.cp-sticker {
    position: absolute; top: -16px; right: -16px;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 99px;
    font-size: 11.5px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18); transform: rotate(8deg);
}
.cp-sticker .accent { color: var(--accent); }
.chat-preview { position: relative; }

/* ───── TRUST STRIP ───── */
.trust-strip {
    padding: 36px 6%; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.5);
    display: flex; align-items: center; gap: 36px; flex-wrap: wrap; justify-content: center;
}
.trust-label {
    font-size: 11px; color: var(--text-light); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em; font-family: 'JetBrains Mono', monospace;
    margin-right: 16px;
}
.trust-strip .uni {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700; font-size: 16px; color: var(--text-light);
    opacity: 0.75; transition: var(--transition); cursor: default;
    letter-spacing: -0.01em; white-space: nowrap;
}
.trust-strip .uni:hover { opacity: 1; color: var(--primary); }

/* ───── SECTIONS ───── */
.section { padding: 100px 6%; }
.section-dark {
    background: var(--ink); color: #fff;
    position: relative; overflow: hidden;
}
.section-dark::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 24px 24px;
}
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; position: relative; z-index: 1; }
.section-head .eyebrow {
    display: inline-block; padding: 5px 12px; border-radius: 99px;
    background: rgba(15,61,46,0.06); color: var(--primary);
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    font-family: 'JetBrains Mono', monospace; margin-bottom: 18px;
}
.section-dark .section-head .eyebrow { background: rgba(45,212,191,0.15); color: var(--accent); }
.section-head h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.08; letter-spacing: -0.02em;
    color: var(--primary); margin-bottom: 14px;
}
.section-dark .section-head h2 { color: #fff; }
.section-head h2 em { font-style: italic; color: var(--accent-2); }
.section-dark .section-head h2 em { color: var(--accent); }
.section-head p { font-size: 16px; color: var(--text-2); max-width: 540px; margin: 0 auto; line-height: 1.55; }
.section-dark .section-head p { color: rgba(255,255,255,0.7); }

/* ───── BENTO FEATURES ───── */
.bento {
    display: grid; grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(180px, auto); gap: 16px;
    max-width: 1280px; margin: 0 auto; position: relative; z-index: 1;
}
.bento-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: 18px; padding: 28px; position: relative; overflow: hidden;
    transition: var(--transition);
}
.bento-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.bento-card .icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 18px; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    margin-bottom: 18px;
}
.bento-card .title { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 22px; color: var(--primary); margin-bottom: 8px; line-height: 1.2; letter-spacing: -0.015em; }
.bento-card .desc { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.bento-card.span-3 { grid-column: span 3; }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.row-2 { grid-row: span 2; }
.bento-card.dark { background: var(--ink); color: #fff; border-color: transparent; }
.bento-card.dark .title { color: #fff; }
.bento-card.dark .desc { color: rgba(255,255,255,0.7); }
.bento-card.accent { background: linear-gradient(135deg, var(--accent-soft), #d1fae5); border-color: rgba(45,212,191,0.3); }

.bento-bignum { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 96px; line-height: 0.9; color: var(--accent-2); letter-spacing: -0.04em; margin-bottom: 12px; }
.bento-card.dark .bento-bignum { color: var(--accent); }

.lang-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.lang-chips .chip { padding: 6px 12px; background: var(--accent-soft); border: 1px solid rgba(45,212,191,0.3); border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; font-family: 'JetBrains Mono', monospace; }
.bento-card.dark .lang-chips .chip { background: rgba(45,212,191,0.12); border-color: rgba(45,212,191,0.3); color: var(--accent); }

.style-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.style-chips .chip { padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 11.5px; font-weight: 600; color: var(--text-2); font-family: 'JetBrains Mono', monospace; }
.bento-card.dark .style-chips .chip { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }

.quote-card { display: flex; flex-direction: column; justify-content: space-between; }
.quote-card blockquote {
    font-family: 'Fraunces', Georgia, serif; font-style: italic;
    font-size: 18px; line-height: 1.4; color: var(--primary); margin-bottom: 14px;
}
.quote-card cite {
    display: flex; align-items: center; gap: 10px; font-style: normal;
    font-size: 12px; color: var(--text-light);
}
.quote-card cite .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #cbd5e1, #94a3b8); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }

/* ───── HOW IT WORKS — 3 step rows ───── */
.steps { display: flex; flex-direction: column; gap: 40px; max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.step-row { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 36px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--border); }
.step-row:last-child { border-bottom: none; }
.step-num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 80px; font-weight: 700; line-height: 1;
    color: var(--accent-2); letter-spacing: -0.04em;
    font-variation-settings: "opsz" 144;
}
.step-text h3 { font-family: 'Fraunces', Georgia, serif; font-size: 28px; line-height: 1.15; color: var(--primary); margin-bottom: 10px; letter-spacing: -0.015em; }
.step-text p { font-size: 15px; color: var(--text-2); line-height: 1.55; max-width: 460px; }
/* Dark section overrides — step text must stay readable on ink bg */
.section-dark .step-text h3 { color: #fff; }
.section-dark .step-text p { color: rgba(255,255,255,0.7); }
.section-dark .step-row { border-bottom-color: rgba(255,255,255,0.08); padding: 40px 0; }
.section-dark .step-num { color: var(--accent); }
.step-visual {
    background: #fff;
    border: 1px solid var(--border); border-radius: 16px; padding: 24px;
    min-height: 180px; display: flex; align-items: center; justify-content: center;
    color: var(--text-light); font-family: 'JetBrains Mono', monospace; font-size: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.section-dark .step-visual { box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.step-visual .visual-mock {
    width: 100%; padding: 20px; background: #fff; border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15,61,46,0.06); text-align: left; color: var(--text);
    font-family: inherit; font-size: 13px;
}

/* ───── CALCULATOR ───── */
.calc-shell {
    max-width: 880px; margin: 0 auto; background: #fff;
    border: 1px solid var(--border); border-radius: 22px;
    overflow: hidden; box-shadow: var(--shadow);
}
.calc-body { padding: 36px 40px; }
.calc-row { margin-bottom: 24px; }
.calc-label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 10px; font-family: 'JetBrains Mono', monospace; }
/* Work-type chips. Desktop: wrap to 2 rows so all 10 fit. Mobile: horizontal
 * scroll with snap (Gemini-recommended). Active chip stays solid green. */
.calc-segments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    background: var(--bg);
    border-radius: 12px;
}
.calc-segments button {
    flex: 1 0 auto;          /* shrink-to-content but allow growth */
    min-width: 90px;
    max-width: 180px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}
.calc-segments button.active { background: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(15,61,46,0.2); }
.calc-segments button:not(.active):hover { background: rgba(15,61,46,0.06); color: var(--primary); }
@media (max-width: 720px) {
    .calc-segments {
        flex-wrap: wrap;
        gap: 5px;
        padding: 5px;
    }
    .calc-segments button {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
        max-width: none;
        padding: 9px 8px;
        font-size: 11.5px;
    }
}
@media (max-width: 380px) {
    .calc-segments button { flex: 1 1 100%; }
}

.calc-slider { display: flex; align-items: center; gap: 16px; }
.calc-slider input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; background: var(--border); border-radius: 99px; outline: none; }
.calc-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; background: var(--primary); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(15,61,46,0.3); transition: var(--transition); }
.calc-slider input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.calc-slider .value { min-width: 64px; padding: 6px 14px; background: var(--accent-soft); border-radius: 8px; font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--primary); text-align: center; font-size: 14px; }

.calc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.calc-chips button {
    padding: 9px 16px; border: 1.5px solid var(--border); background: #fff; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; transition: var(--transition);
    font-family: inherit;
}
.calc-chips button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.calc-chips button:not(.active):hover { border-color: var(--primary); color: var(--primary); }

.calc-price-card {
    margin-top: 32px; padding: 28px 32px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; border-radius: 16px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.calc-price-card .price-label { font-size: 12px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.08em; font-family: 'JetBrains Mono', monospace; margin-bottom: 6px; }
.calc-price-card .price-value { font-family: 'Fraunces', Georgia, serif; font-size: 60px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.calc-price-card .price-value .currency { color: var(--accent); }
.calc-price-card .price-breakdown { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: rgba(255,255,255,0.65); margin-top: 8px; }
.calc-price-card .btn { padding: 14px 26px; }

.calc-footer { padding: 16px 40px; background: var(--bg); font-size: 12px; color: var(--text-light); display: flex; gap: 18px; flex-wrap: wrap; }
.calc-footer span { display: inline-flex; align-items: center; gap: 6px; }
.calc-footer i { color: var(--accent-2); }

/* ───── REVIEWS ───── */
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.review-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.review-card .stars { color: var(--warm); font-size: 14px; margin-bottom: 14px; letter-spacing: 1px; }
.review-card blockquote { font-family: 'Fraunces', Georgia, serif; font-size: 17px; line-height: 1.45; color: var(--primary); margin-bottom: 18px; font-style: italic; }
.review-card cite { display: flex; align-items: center; gap: 12px; font-style: normal; font-size: 13px; color: var(--text-2); }
.review-card cite .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.review-card cite strong { color: var(--text); font-weight: 600; display: block; }
.review-card cite .meta { font-size: 11.5px; color: var(--text-light); margin-top: 1px; }

/* ───── FAQ ───── */
.faq-grid { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.faq-grid details {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 4px 22px; transition: var(--transition);
}
.faq-grid details[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.faq-grid summary {
    list-style: none; cursor: pointer; padding: 18px 0;
    font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 500;
    color: var(--primary); display: flex; justify-content: space-between; align-items: center;
    letter-spacing: -0.01em;
}
.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary::after { content: '+'; font-size: 24px; font-weight: 300; color: var(--text-light); transition: var(--transition); }
.faq-grid details[open] summary::after { transform: rotate(45deg); color: var(--accent-2); }
.faq-grid .faq-body { padding: 0 0 18px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }

/* ───── BOTTOM CTA BANNER ───── */
.cta-banner {
    margin: 80px 6% 60px;
    padding: 70px 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 28px; color: #fff; position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.cta-banner::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse at 80% 50%, #000 30%, transparent 75%);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: 1.05; letter-spacing: -0.02em; color: #fff; margin-bottom: 14px; }
.cta-banner h2 em { font-style: italic; color: var(--accent); }
.cta-banner p { font-size: 16px; color: rgba(255,255,255,0.75); max-width: 480px; line-height: 1.55; margin-bottom: 24px; }
.cta-banner .actions { display: flex; gap: 12px; }
.cta-banner .btn-accent { background: var(--accent); color: var(--ink); font-weight: 700; }
.cta-banner .btn-accent:hover { background: #fff; }
.cta-banner .btn-ghost-light {
    background: transparent; border: 1px solid rgba(255,255,255,0.25); color: #fff;
    padding: 14px 26px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: var(--transition);
}
.cta-banner .btn-ghost-light:hover { background: rgba(255,255,255,0.08); border-color: #fff; }
.cta-mascot {
    text-align: center;
}
.cta-mascot img { width: 200px; height: 200px; object-fit: contain; }

/* ───── FOOTER ───── */
.footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 60px 6% 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; max-width: 1280px; margin: 0 auto 40px; }
.footer-brand h4 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 20px; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand h4 img { width: 32px; height: 32px; background: rgba(255,255,255,0.08); border-radius: 8px; padding: 2px; }
.footer-brand h4 .ai { color: var(--accent); }
.footer-brand p { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.5); max-width: 320px; }
.footer-col h5 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #fff; margin-bottom: 14px; font-family: 'JetBrains Mono', monospace; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13.5px; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.08); flex-wrap: wrap; gap: 18px; max-width: 1280px; margin: 0 auto; }
.footer-bottom .copy { font-size: 12px; color: rgba(255,255,255,0.4); font-family: 'JetBrains Mono', monospace; }
.footer-switchers { display: flex; gap: 10px; }
.footer-switchers .lang-switch, .footer-switchers .curr-switch { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.footer-switchers .curr-switch button { color: rgba(255,255,255,0.5); }
.footer-switchers .curr-switch button.active { background: rgba(255,255,255,0.1); color: var(--accent); }

/* ───── RESPONSIVE ───── */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 50px; }
    .chat-preview { transform: none; max-width: 540px; margin: 0 auto; }
    .bento { grid-template-columns: repeat(2, 1fr); }
    .bento-card.span-3, .bento-card.span-2, .bento-card.span-4 { grid-column: span 2; }
    .step-row { grid-template-columns: 80px 1fr; }
    .step-visual { grid-column: 1 / -1; }
    .reviews-grid { grid-template-columns: 1fr; }
    .cta-banner { grid-template-columns: 1fr; padding: 50px 40px; }
    .cta-mascot { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    html, body { overflow-x: hidden; max-width: 100vw; }
    .hero, .section, .navbar, .footer, .cta-banner, .hero-grid, .hero-text, .chat-preview { max-width: 100%; min-width: 0; box-sizing: border-box; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .navbar { padding: 10px 14px; gap: 6px; flex-wrap: nowrap; }
    .nav-links { gap: 6px; flex: 0 0 auto; }
    .nav-links a:not(.btn):not(.btn-login), .curr-switch, .nav-divider, .auth-guest .btn-login, .auth-user .btn-login { display: none !important; }
    /* Keep lang switcher visible as compact chip in header */
    .nav-links .lang-wrap { display: inline-flex; margin: 0; }
    .nav-links .lang-switch { padding: 6px 10px; font-size: 12px; background: rgba(15,61,46,0.06); border-radius: 8px; }
    .nav-links .lang-menu { right: 0; top: 100%; }
    .nav-toggle { display: block; margin-left: auto; order: 2; }
    .auth-guest, .auth-user { order: 1; }
    .navbar .btn-primary, .navbar a.btn { padding: 7px 11px; font-size: 12px; white-space: nowrap; }
    .navbar .btn-primary i, .navbar a.btn i { display: none; }
    .navbar .logo { font-size: 17px; gap: 6px; }
    .navbar .logo-mascot { width: 26px; height: 26px; }
    .hero { padding: 36px 4% 48px; }
    .hero h1 { font-size: clamp(22px, 6.5vw, 28px) !important; line-height: 1.2; letter-spacing: -0.015em; overflow-wrap: anywhere; word-break: normal; hyphens: auto; max-width: 100%; font-variation-settings: "opsz" 36; }
    .hero-eyebrow { font-size: 10.5px; letter-spacing: 0.12em; padding: 6px 12px; }
    .hero-sub { font-size: 14px; max-width: 100%; line-height: 1.55; word-wrap: break-word; }
    .hero-cta { flex-wrap: wrap; gap: 10px; }
    .hero-cta .btn, .hero-cta .btn-lg { width: 100%; justify-content: center; padding: 14px 18px; font-size: 14.5px; }
    .hero-cta .btn-ghost-arrow { width: 100%; justify-content: center; }
    .section { padding: 56px 4%; }
    .section-eyebrow { font-size: 11px; }
    .section-title, h2 { font-size: 26px !important; line-height: 1.18; word-wrap: break-word; }
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; padding-top: 20px; }
    .hero-stats .num { font-size: 24px; }
    .hero-stats .lbl { font-size: 10.5px; }
    .bento { grid-template-columns: 1fr; }
    .bento-card.span-3, .bento-card.span-2, .bento-card.span-4 { grid-column: span 1; }
    .calc-body { padding: 22px 18px; }
    .calc-price-card { grid-template-columns: 1fr; padding: 22px; }
    .calc-price-card .price-value { font-size: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .cta-banner { margin: 50px 4% 40px; padding: 36px 22px; border-radius: 18px; }
    .cta-banner h2 { font-size: 24px; }
    .cta-banner .actions { flex-direction: column; gap: 10px; }
    .cta-banner .actions .btn, .cta-banner .actions .btn-ghost-light { width: 100%; justify-content: center; text-align: center; }
    .cta-mascot { display: none !important; }
    .chat-preview { transform: none; max-width: 100%; }
    .step-row { grid-template-columns: 56px 1fr; gap: 16px; }
    .step-num { font-size: 32px; }
    .reviews-grid { gap: 16px; }
    .review-card { padding: 22px 20px; }
    .footer { padding: 40px 4% 30px; }
    img, video, iframe { max-width: 100%; height: auto; }
}

.nav-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--primary); cursor: pointer; }

/* ─── Step-3 file rows (Lucide icons, editorial palette) ─── */
.step-file {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; background: var(--bg);
    border-radius: 8px; transition: .15s;
}
.step-file:hover { background: rgba(15,61,46,.06); }
.step-file-ic {
    width: 30px; height: 30px; border-radius: 7px;
    background: rgba(15,61,46,.08); color: var(--primary);
    display: grid; place-items: center; flex-shrink: 0;
}
.step-file-ic svg { width: 16px; height: 16px; stroke-width: 1.75; }
.step-file-name {
    font-size: 12.5px; flex: 1; min-width: 0;
    color: var(--text); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-file-dl { color: var(--accent-2); width: 16px; height: 16px; flex-shrink: 0; }
.step-file-dl svg { width: 16px; height: 16px; stroke-width: 1.75; }

/* Calculator inputs (number/date/discipline) */
.calc-body .calc-num {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 14px; outline: none; background: #fff;
    font-family: inherit; transition: var(--transition);
    color: var(--text);
}
.calc-body .calc-num:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15,61,46,.06); }
.calc-body .ac-wrap { position: relative; }
.calc-body .ac-wrap .ac-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 11px; pointer-events: none; }
.calc-body .ac-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    background: #fff; border: 1px solid var(--border); border-radius: 11px;
    box-shadow: 0 12px 32px rgba(15,61,46,.12);
    z-index: 100; max-height: 280px; overflow-y: auto;
    display: none; padding: 4px;
}
.calc-body .ac-list.on { display: block; }
.calc-body .ac-list .ac-opt {
    padding: 9px 12px; font-size: 13px; color: var(--text);
    cursor: pointer; border-radius: 7px;
}
.calc-body .ac-list .ac-opt:hover, .calc-body .ac-list .ac-opt.on { background: rgba(16,185,129,.1); color: var(--primary); }
.calc-body .ac-list .ac-opt mark { background: rgba(16,185,129,.25); color: var(--primary); font-weight: 700; padding: 0 2px; border-radius: 3px; }
.calc-body .ac-list .ac-empty { padding: 14px; text-align: center; color: var(--text-light); font-size: 12px; font-style: italic; }

/* CTA banner — surround central celebrate mascot with writing (left) + working (right, mirrored) */
.cta-mascot {
    position: relative; min-width: 460px; min-height: 200px;
    display: flex; align-items: flex-end; justify-content: center; gap: 0;
}
.cta-mascot .mascot-main {
    position: relative; width: 200px; height: auto;
    z-index: 2; flex-shrink: 0;
}
.cta-mascot .mascot-side {
    position: relative;
    width: 150px; height: auto;            /* slightly smaller than central (200px) */
    z-index: 1; flex-shrink: 0;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,.15));
    align-self: flex-end;
    margin-bottom: 12px;
}
.cta-mascot .mascot-left  { margin-right: -40px; transform: rotate(-10deg); }
.cta-mascot .mascot-right { margin-left:  -40px; transform: scaleX(-1) rotate(-10deg); }
@media (max-width: 900px) {
    .cta-mascot { min-width: 320px; }
    .cta-mascot .mascot-side { width: 110px; }
    .cta-mascot .mascot-main { width: 150px; }
    .cta-mascot .mascot-left  { margin-right: -30px; }
    .cta-mascot .mascot-right { margin-left:  -30px; }
}
@media (max-width: 600px) {
    .cta-mascot .mascot-side { display: none; }
}

/* ──── Session-aware nav (auth-skeleton + auth-guest + auth-user) ────
 * Initial state in <head>: nothing visible (pulse skeleton only).
 * After /api/auth/me resolves, js/landing.js puts class on <body>:
 *   body.authed     → show .auth-user, hide .auth-guest + skeleton
 *   body.unauthed   → show .auth-guest, hide .auth-user + skeleton
 * Avoids FOUC of "Увійти/Почати" for already-logged-in users.
 */
.auth-guest, .auth-user { display: none; }
.auth-skeleton {
    display: inline-block;
    width: 110px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
    background-size: 200% 100%;
    animation: auth-skeleton-pulse 1.4s linear infinite;
    vertical-align: middle;
}
.auth-skeleton-lg { width: 200px; height: 56px; }
@keyframes auth-skeleton-pulse {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
body.authed   .auth-skeleton { display: none; }
body.authed   .auth-user     { display: inline-flex; gap: 10px; align-items: center; }
body.unauthed .auth-skeleton { display: none; }
body.unauthed .auth-guest    { display: inline-flex; gap: 10px; align-items: center; }
/* Hero CTA button variants (block-level) */
.hero-cta a.auth-guest, .hero-cta a.auth-user { display: none; }
body.authed   .hero-cta a.auth-user  { display: inline-flex; }
body.unauthed .hero-cta a.auth-guest { display: inline-flex; }
.cta-banner .actions a.auth-guest, .cta-banner .actions a.auth-user { display: none; }
body.authed   .cta-banner .actions a.auth-user  { display: inline-flex; }
body.unauthed .cta-banner .actions a.auth-guest { display: inline-flex; }

/* ──── Pure-CSS fail-safe for skeleton/guest blocks ────
 * If JS never lands (CSP block / extension / network) the auth-skeleton would
 * hang forever and the page would look "loading". Solution: a 3.5-second CSS
 * animation that hides the skeleton and reveals the GUEST block by default.
 * If JS does run, body.authed/.unauthed override these animations because
 * those rules win on specificity (class on body > pseudo-state).
 */
body:not(.authed):not(.unauthed) .auth-skeleton {
    animation:
        auth-skeleton-pulse 1.4s linear infinite,
        auth-skeleton-failsafe 3.5s linear forwards;
}
@keyframes auth-skeleton-failsafe {
    0%, 95% { opacity: 1; max-width: 200px; }
    100%    { opacity: 0; max-width: 0; padding: 0; margin: 0; overflow: hidden; }
}
body:not(.authed):not(.unauthed) .auth-guest,
body:not(.authed):not(.unauthed) .hero-cta a.auth-guest,
body:not(.authed):not(.unauthed) .cta-banner .actions a.auth-guest {
    animation: auth-guest-failsafe 3.5s linear forwards;
}
@keyframes auth-guest-failsafe {
    0%, 95% { display: none; opacity: 0; }
    100%    { display: inline-flex; opacity: 1; }
}
