/* ==========================================================================
   PravaPlus — one-page site design system
   Concept: the exam ticket ("bilet") — the actual unit the app is built
   around — as the visual language. Corner registration marks, a perforated
   stub, tabular-mono numerals for every count/price/score, dashed dividers
   standing in for lane markings / tear lines. Colour tokens mirror the
   mobile app's own palette exactly (mobile/src/utils/colors.js) so the site
   and the product feel like the same thing, in both themes.
   ========================================================================== */

:root {
    --paper: #F5F6FA;
    --paper-raised: #FFFFFF;
    --ink: #0E1420;
    --ink-soft: #4B5566;
    --ink-faint: #8891A3;
    --line: #DCE1EC;
    --line-strong: #C3CAD9;

    --accent: #2F6FED;
    --accent-ink: #1D4FD6;
    --accent-tint: #E7F0FF;

    /* Only Premium Plus survives here — Premium/Premium Pro's tokens went with the pricing
       section; this one's still used for the ticket mock's "correct answer"
       state. Fixed regardless of theme, like the rest of this block. */
    --tier-malibu: #16A34A;
    --tier-malibu-accent: #22C55E;
    --tier-malibu-tint: #DCFCE7;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Roboto Mono', 'Courier New', monospace;

    --radius: 20px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(14,20,32,0.04), 0 12px 32px -12px rgba(14,20,32,0.14);
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0B1120;
        --paper-raised: #141B2E;
        --ink: #F3F4F6;
        --ink-soft: #9CA3AF;
        --ink-faint: #6B7690;
        --line: #232B3E;
        --line-strong: #2E3750;

        --accent: #5B8DEF;
        --accent-ink: #8FB2FF;
        --accent-tint: #16213E;

        --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 20px 40px -16px rgba(0,0,0,0.55);
    }
}

:root[data-theme="dark"] {
    --paper: #0B1120;
    --paper-raised: #141B2E;
    --ink: #F3F4F6;
    --ink-soft: #9CA3AF;
    --ink-faint: #6B7690;
    --line: #232B3E;
    --line-strong: #2E3750;
    --accent: #5B8DEF;
    --accent-ink: #8FB2FF;
    --accent-tint: #16213E;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 20px 40px -16px rgba(0,0,0,0.55);
}

:root[data-theme="light"] {
    --paper: #F5F6FA;
    --paper-raised: #FFFFFF;
    --ink: #0E1420;
    --ink-soft: #4B5566;
    --ink-faint: #8891A3;
    --line: #DCE1EC;
    --line-strong: #C3CAD9;
    --accent: #2F6FED;
    --accent-ink: #1D4FD6;
    --accent-tint: #E7F0FF;
    --shadow: 0 1px 2px rgba(14,20,32,0.04), 0 12px 32px -12px rgba(14,20,32,0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* ---------- eyebrow / section label ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow::before {
    content: '';
    width: 16px;
    height: 1px;
    background: currentColor;
}

/* ---------- type scale ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 800; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.25rem, 4.4vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.05rem; line-height: 1.3; }

p { margin: 0; line-height: 1.65; }

.lede {
    font-size: 1.09rem;
    color: var(--ink-soft);
    max-width: 40ch;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-sm);
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--accent) 75%, transparent); }

.btn-ghost {
    background: transparent;
    color: var(--ink-faint);
    border-color: var(--line-strong);
}

.btn-ghost:hover { color: var(--ink-soft); border-color: var(--ink-faint); }

/* ---------- nav ---------- */
#site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease;
}

#site-nav.is-scrolled {
    background: color-mix(in srgb, var(--paper) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-mark { width: 32px; height: 32px; }

.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: 32px; }

.nav-links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--paper-raised);
    align-items: center;
    justify-content: center;
}

#mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

#mobile-menu a {
    padding: 10px 0;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px dashed var(--line);
}

#mobile-menu.is-open { display: flex; }

@media (max-width: 760px) {
    .nav-links, .nav-actions .btn-primary { display: none; }
    .menu-toggle { display: inline-flex; }
}

/* ---------- dashed divider (lane marking) ---------- */
.lane {
    border: none;
    border-top: 2px dashed var(--line-strong);
    margin: 0;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    padding: 152px 0 104px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}

.hero-copy > * + * { margin-top: 20px; }

/* Official Apple/Google badge artwork (unmodified SVGs, see
   _store_badges.html) — the badges already carry their own fixed dark
   colour, nothing here needs a theme-proof override the way the old
   hand-drawn version did. */
.store-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* Centred again. The row was pinned to flex-start while the Play badge
   carried a "Tez orada" caption under it and App Store did not — with both
   listings live the caption is gone and so is the reason (see
   _store_badges.html). */
.store-badges-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

/* Nothing left inside a badge but the artwork. */
.store-badge { display: block; }

/* Width/height set explicitly in the HTML too (not just here) — Apple's SVG
   carries its own width/height attributes, Google's carries only a viewBox,
   and relying on `width: auto` to derive one consistent aspect ratio from
   two differently-authored SVGs rendered inconsistently across engines.
   Explicit pixel values on both sidesteps that entirely. */
.store-badge-img {
    height: 46px;
    display: block;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.store-badge-img:hover { transform: translateY(-1px); opacity: 0.88; }

.cta .store-badges { align-items: center; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-stats { display: flex; gap: 28px; margin-top: 40px; }

.hero-stat .num { display: block; font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.hero-stat span:last-child { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- ticket (hero visual) ---------- */
.ticket {
    position: relative;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 360px;
    margin: 0 auto;
}

.ticket-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--line-strong);
}

.ticket-corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.ticket-corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.ticket-corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.ticket-corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: 6px; }

.ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.ticket-head .num { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.06em; }

.ticket-pass {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--tier-malibu);
    background: var(--tier-malibu-tint);
    border-radius: 999px;
    padding: 3px 10px;
}

.ticket-body { padding: 0 20px 20px; }

.ticket-question {
    height: 92px;
    border-radius: var(--radius-sm);
    background: var(--paper);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--ink-faint);
    margin-bottom: 16px;
}

.ticket-line { height: 8px; border-radius: 999px; background: var(--line); margin-bottom: 8px; }
.ticket-line.w-full { width: 100%; }
.ticket-line.w-2\/3 { width: 66%; margin-bottom: 18px; }

.ticket-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}

.ticket-option.is-correct { border-color: var(--tier-malibu-accent); background: var(--tier-malibu-tint); }

.ticket-badge {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-faint);
    flex-shrink: 0;
}

.ticket-option.is-correct .ticket-badge { background: var(--tier-malibu-accent); border-color: var(--tier-malibu-accent); color: #fff; }
.ticket-option.is-correct .ticket-line { background: color-mix(in srgb, var(--tier-malibu-accent) 35%, transparent); }

.ticket-stub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    position: relative;
}

.ticket-stub::before {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px;
    border-top: 2px dashed var(--line-strong);
}

.ticket-qr {
    display: grid;
    grid-template-columns: repeat(5, 4px);
    grid-template-rows: repeat(5, 4px);
    gap: 2px;
}

.ticket-qr i { background: var(--line-strong); border-radius: 1px; }
.ticket-qr i:nth-child(3n) { background: var(--ink-faint); }

.ticket-serial { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ---------- stats strip ---------- */
.stats {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-cell {
    padding: 36px 20px;
    text-align: center;
    border-left: 2px dashed var(--line);
}

.stat-cell:first-child { border-left: none; }

.stat-cell .num { display: block; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; color: var(--accent); }
.stat-cell .stat-label { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

@media (max-width: 640px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-cell:nth-child(3) { border-left: none; }
}

/* ---------- section shells ---------- */
.section { padding: 108px 0; }

.section-head { max-width: 46ch; margin: 0 auto 56px; text-align: center; }
.section-head .lede { max-width: none; margin: 14px auto 0; }

/* ---------- features ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--line);
    gap: 1px;
}

@media (max-width: 860px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.feature {
    background: var(--paper-raised);
    padding: 32px 28px;
    transition: background 0.2s ease;
}

.feature:hover { background: var(--accent-tint); }

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    border: 1.5px solid var(--ink);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    color: var(--ink);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.feature:hover .feature-icon { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.feature p { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

/* ---------- instructor + video showcase ---------- */
.instructor-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
    align-items: stretch;
}

@media (max-width: 860px) { .instructor-grid { grid-template-columns: 1fr; } }

.instructor-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-raised);
    padding: 36px;
    display: flex;
    flex-direction: column;
}

.instructor-portrait {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: var(--ink);
    color: var(--paper);
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.instructor-role {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.instructor-name { margin-top: 6px; font-size: 1.4rem; }

.instructor-bio { margin-top: 14px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; }

.instructor-badges { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }

.badge-pill {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-soft);
    border: 1px dashed var(--line-strong);
    border-radius: 999px;
    padding: 5px 12px;
}

.video-frame {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-raised);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-thumb {
    position: relative;
    flex: 1;
    min-height: 220px;
    background:
        repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 2px, transparent 2px 14px),
        linear-gradient(160deg, var(--accent-tint), var(--paper));
    display: grid;
    place-items: center;
}

.video-play {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--accent) 65%, transparent);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.video-frame:hover .video-play { transform: scale(1.08); }

.video-progress {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
    overflow: hidden;
}

.video-progress i { display: block; width: 38%; height: 100%; background: var(--accent); }

.video-meta { padding: 20px 22px; border-top: 1px solid var(--line); }
.video-meta .num { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.05em; }
.video-meta h4 { margin: 6px 0 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 2px dashed var(--line-strong); }

.faq-item { border-bottom: 2px dashed var(--line-strong); }

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .num { color: var(--accent); font-size: 0.85rem; flex-shrink: 0; }

.faq-item summary .faq-q { flex: 1; }

.faq-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--ink-faint);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: #fff; }

.faq-item p {
    margin: 0 0 22px;
    padding-left: 40px;
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.7;
    max-width: 62ch;
}

/* ---------- final CTA ---------- */
.cta { text-align: center; }
.cta .lede { margin: 14px auto 0; max-width: 42ch; }
.cta .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); }
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 40px 0;
    font-size: 13px;
    color: var(--ink-faint);
}

.footer-links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ---------- legal / document pages ---------- */
.doc-page { padding: 148px 0 96px; }

.doc { max-width: 68ch; margin: 0 auto; }

.doc-meta {
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper-raised);
    display: grid;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-soft);
}

.doc-meta strong { color: var(--ink); font-weight: 700; }

.doc-intro { margin-top: 28px; }

.doc section { margin-top: 48px; }

.doc h2 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.doc h2 .doc-index {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.doc h3 { margin-top: 24px; font-size: 0.95rem; }

.doc p, .doc ul, .doc ol { margin-top: 14px; color: var(--ink-soft); font-size: 15px; }

.doc ul, .doc ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc li::marker { color: var(--ink-faint); }

.doc strong { color: var(--ink); }

.doc a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.doc a:hover { text-decoration-color: var(--accent); }

.doc hr.lane { margin: 40px 0; }

/* ---------- reveal-on-scroll ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

[data-reveal-group] > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal-group].is-visible > * { opacity: 1; transform: translateY(0); }

[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 70ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 350ms; }

/* ---------- hero load-in sequence ---------- */
@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes settle {
    from { opacity: 0; transform: translateY(24px) rotate(-3deg) scale(0.97); }
    to { opacity: 1; transform: translateY(0) rotate(-2deg) scale(1); }
}

.hero-copy .eyebrow { animation: rise 0.6s ease both; }
.hero-copy h1 { animation: rise 0.6s ease 0.08s both; }
.hero-copy .lede { animation: rise 0.6s ease 0.16s both; }
.hero-copy .hero-actions { animation: rise 0.6s ease 0.24s both; }
.hero-copy .hero-stats { animation: rise 0.6s ease 0.32s both; }
.ticket-wrap { animation: settle 0.7s cubic-bezier(.2,.8,.2,1) 0.2s both; }
.ticket { transform: rotate(-2deg); transition: transform 0.4s ease; }
.ticket-wrap:hover .ticket { transform: rotate(0deg); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-reveal], [data-reveal-group] > *,
    .hero-copy .eyebrow, .hero-copy h1, .hero-copy .lede, .hero-copy .hero-actions, .hero-copy .hero-stats,
    .ticket-wrap {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
