/* ════════════════════════════════════════════════════════════════
   LuckyJetInfo — homepage styles
   ════════════════════════════════════════════════════════════════ */

@import url('./design-tokens.css');

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

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: var(--type-body);
    line-height: 1.55;
    color: var(--fg-1);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(230,57,70,0.25); color: var(--fg-1); }

/* ── containers ─────────────────────────────────────────────── */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 28px; }
.container--narrow { max-width: 720px; }
.container--base { max-width: 1080px; }

@media (min-width: 768px) { .container { padding-inline: 40px; } }

/* ── eyebrow ─────────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-2);
}
.eyebrow::before {
    content: ""; width: 24px; height: 1px;
    background: currentColor;
    opacity: 0.5;
}
.eyebrow--on-dark { color: rgba(255,255,255,0.62); }

/* ── buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    border: 1px solid transparent;
    transition: background 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out), transform 200ms var(--ease-out);
    cursor: pointer;
    white-space: nowrap;
}
.btn--primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 32px rgba(230,57,70,0.4);
    animation: primaryGlowPulse 3s var(--ease-out) infinite;
}
@keyframes primaryGlowPulse {
    0%, 100% { box-shadow: 0 0 32px rgba(230,57,70,0.4); }
    50%      { box-shadow: 0 0 44px rgba(230,57,70,0.7); }
}
.btn--primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}
.btn--primary:active { transform: scale(0.98); }
.btn--ghost {
    background: transparent;
    color: var(--fg-on-dark);
    border-color: rgba(255,255,255,0.25);
}
.btn--ghost:hover {
    border-color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.05);
}
.btn--ghost-light {
    background: transparent;
    color: var(--fg-1);
    border-color: var(--border-2);
}
.btn--ghost-light:hover {
    border-color: var(--fg-1);
    background: rgba(26,26,46,0.04);
}
.btn--magnetic {
    transform: translate(var(--mx,0px), var(--my,0px));
}

/* ── site header ─────────────────────────────────────────────── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    transition: background 300ms var(--ease-out), border-color 300ms var(--ease-out);
    border-bottom: 1px solid transparent;
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1280px; margin-inline: auto;
    padding: 22px 28px;
    transition: padding 300ms var(--ease-out);
}
@media (min-width: 768px) { .site-header__inner { padding: 22px 40px; } }
.site-header.is-scrolled {
    background: rgba(15,31,54,0.62);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: rgba(255,255,255,0.08);
}
.site-header.is-scrolled .site-header__inner { padding-block: 14px; }
.site-header.over-light.is-scrolled {
    background: rgba(250,248,244,0.78);
    border-bottom-color: var(--border-1);
}
.site-header__brand {
    display: inline-flex; align-items: center; gap: 12px;
    color: #FAF8F4;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}
.site-header.over-light .site-header__brand { color: var(--fg-1); }
.site-header__brand svg { flex: 0 0 auto; }
.site-header__brand-plane {
    animation: planeIntro 600ms var(--ease-out) both;
    transform-origin: 50% 50%;
}
@keyframes planeIntro {
    from { transform: rotate(-45deg); opacity: 0; }
    to   { transform: rotate(0); opacity: 1; }
}
.site-header__brand-tail { color: rgba(255,255,255,0.55); font-weight: 500; }
.site-header.over-light .site-header__brand-tail { color: var(--fg-2); }

.site-header__nav { position: relative; display: flex; gap: 4px; }
.site-header__nav a {
    position: relative; z-index: 1;
    padding: 8px 14px;
    font-size: 14px; font-weight: 500;
    color: rgba(255,255,255,0.72);
    transition: color 200ms var(--ease-out);
}
.site-header__nav a:hover { color: #fff; }
.site-header__nav a.is-active { color: #fff; }
.site-header.over-light .site-header__nav a { color: var(--fg-2); }
.site-header.over-light .site-header__nav a:hover,
.site-header.over-light .site-header__nav a.is-active { color: var(--fg-1); }
.site-header__nav-indicator {
    position: absolute;
    bottom: -2px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: left 350ms var(--ease-spring), width 350ms var(--ease-spring), opacity 200ms var(--ease-out);
    pointer-events: none;
    opacity: 0;
}
.site-header__nav.has-indicator .site-header__nav-indicator { opacity: 1; }

.site-header__burger {
    display: none;
    width: 44px; height: 44px;
    border: 0; background: transparent;
    color: #fff;
    align-items: center; justify-content: center;
    border-radius: 12px;
}
.site-header.over-light .site-header__burger { color: var(--fg-1); }
.site-header__burger:hover { background: rgba(255,255,255,0.08); }
.site-header.over-light .site-header__burger:hover { background: rgba(0,0,0,0.05); }

@media (max-width: 880px) {
    .site-header__nav { display: none; }
    .site-header__burger { display: inline-flex; }
}

/* Mobile overlay */
.mobile-menu {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(15,31,54,0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0; pointer-events: none;
    transition: opacity 300ms var(--ease-out);
    display: flex; flex-direction: column;
    padding: 28px;
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu__top {
    display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu__close {
    width: 44px; height: 44px;
    border: 0; background: transparent;
    color: #fff;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.mobile-menu__nav {
    display: flex; flex-direction: column;
    gap: 8px;
    margin-top: 64px;
}
.mobile-menu__nav a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 36px;
    letter-spacing: -0.02em;
    color: #FAF8F4;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.mobile-menu.is-open .mobile-menu__nav a {
    opacity: 1; transform: translateY(0);
}
.mobile-menu.is-open .mobile-menu__nav a:nth-child(1) { transition-delay: 100ms; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(2) { transition-delay: 180ms; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(3) { transition-delay: 260ms; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(4) { transition-delay: 340ms; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(5) { transition-delay: 420ms; }
.mobile-menu.is-open .mobile-menu__nav a:nth-child(6) { transition-delay: 500ms; }

/* ── hero ─────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: min(100vh, 920px);
    padding-top: 140px;
    padding-bottom: 100px;
    background: linear-gradient(180deg, #1D3557 0%, #0F1F36 60%, #060E1C 100%);
    color: var(--fg-on-dark);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.hero__canvas {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 0;
}
.hero__trajectory {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
    transform: translate(calc(var(--mx, 0) * 1px), calc(var(--my, 0) * 1px));
    transition: transform 600ms var(--ease-out);
    overflow: visible;
}
.hero__trail ellipse {
    transition: opacity 200ms linear;
    mix-blend-mode: screen;
}

/* Figure overlay — undistorted pixel-space layer */
.hero__figure-host {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    transform: translate(calc(var(--mx, 0) * 1px), calc(var(--my, 0) * 1px));
    transition: transform 600ms var(--ease-out);
}
.hero__figure {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: top left;
    filter: drop-shadow(0 0 14px rgba(230, 57, 70, 0.55));
}
.hero__sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero__spark {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 4px rgba(230, 57, 70, 0.8);
    filter: blur(0.5px);
    pointer-events: none;
    transform: translate(0, 0);
    animation: heroSparkFly 800ms cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
    will-change: transform, opacity;
}
@keyframes heroSparkFly {
    0%   { transform: translate(0, 0)             scale(1);    opacity: 0.95; }
    60%  { opacity: 0.55; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.4); opacity: 0; }
}
.hero__inner {
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero__eyebrow {
    color: rgba(255,255,255,0.65);
    animation: fadeUp 700ms var(--ease-out) both;
}
.hero__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 8.5vw, 7.5rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-top: 24px;
    max-width: 14ch;
    color: #FAF8F4;
}
.hero__title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(50%);
    animation: heroWordIn 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
    margin-right: 0.22em;
}
.hero__title-word--accent { color: var(--color-primary-light); }
@keyframes heroWordIn {
    from { opacity: 0; transform: translateY(50%); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero__lede {
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    line-height: 1.55;
    color: rgba(255,255,255,0.78);
    margin-top: 32px;
    max-width: 56ch;
    opacity: 0;
    animation: fadeUp 800ms var(--ease-out) 600ms both;
}
.hero__cta {
    display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 800ms var(--ease-spring) 800ms both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Trust bar — inside hero, slide-in from right */
.hero__trust {
    margin-top: 56px;
    position: relative; z-index: 3;
    display: flex; flex-wrap: wrap;
    gap: 6px 28px;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.hero__trust-item {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,0.72);
    opacity: 0;
    transform: translateX(40px);
    animation: trustIn 700ms var(--ease-out) both;
}
.hero__trust-item:nth-child(1) { animation-delay: 1100ms; }
.hero__trust-item:nth-child(2) { animation-delay: 1220ms; }
.hero__trust-item:nth-child(3) { animation-delay: 1340ms; }
.hero__trust-item:nth-child(4) { animation-delay: 1460ms; }
.hero__trust-item svg {
    flex: 0 0 auto;
    color: var(--color-success);
}
@keyframes trustIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    transition: opacity 400ms var(--ease-out);
    pointer-events: none;
}
.hero__scroll.is-hidden { opacity: 0; }
.hero__scroll-arrow {
    animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ── reveal-on-scroll utility ─────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
[data-reveal-stagger] > * {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
[data-reveal-stagger].is-revealed > * {
    opacity: 1; transform: translateY(0);
}
[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 100ms; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 200ms; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 300ms; }
[data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: 400ms; }
[data-reveal-stagger].is-revealed > *:nth-child(6) { transition-delay: 500ms; }

/* ── cinematic sections ─────────────────────────────────────── */
.cinema {
    position: relative;
    background: var(--bg-cinema);
    color: var(--fg-on-dark);
    overflow: hidden;
    padding: clamp(80px, 12vw, 192px) 0;
}
.cinema::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}
.cinema__aurora {
    position: absolute;
    width: 60%; height: 80%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.cinema__aurora--red {
    left: -8%; bottom: -30%;
    background: radial-gradient(ellipse at center, rgba(230,57,70,0.35), transparent 60%);
}
.cinema__aurora--blue {
    right: -10%; top: -30%;
    background: radial-gradient(ellipse at center, rgba(69,97,133,0.55), transparent 60%);
}
.cinema__bg-plane {
    position: absolute;
    z-index: 0;
    opacity: 0.04;
    color: #fff;
    pointer-events: none;
    transform: translate(calc(var(--py, 0) * -1px), 0);
}
.cinema__inner { position: relative; z-index: 1; }
.cinema__head { margin-bottom: 80px; max-width: 760px; }
.cinema__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 5.5vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: #FAF8F4;
    margin-top: 20px;
}
.cinema__title-narrow { max-width: 16ch; }

/* ── numbered facts ─────────────────────────────────────────── */
.facts {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
    position: relative;
}
.facts::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 1px;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.18) 0 6px, transparent 6px 12px);
    display: none;
}
@media (max-width: 880px) {
    .facts { grid-template-columns: 1fr; gap: 80px; padding-left: 28px; }
    .facts::before { display: block; }
}
.fact {
    position: relative;
    transform: scale(0.5);
    opacity: 0;
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-spring);
}
[data-reveal-facts].is-revealed .fact { transform: scale(1); opacity: 1; }
[data-reveal-facts].is-revealed .fact:nth-child(1) { transition-delay: 0ms; }
[data-reveal-facts].is-revealed .fact:nth-child(2) { transition-delay: 160ms; }
[data-reveal-facts].is-revealed .fact:nth-child(3) { transition-delay: 320ms; }

.fact__num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(5rem, 12vw, 11rem);
    line-height: 0.85;
    letter-spacing: -0.05em;
    background: linear-gradient(180deg, #E63946 0%, rgba(230,57,70,0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 24px;
}
.fact__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.25rem, 1.8vw, 1.65rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #FAF8F4;
}
.fact__body {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
    margin-top: 16px;
    max-width: 36ch;
}

/* ── topic cards (bento) ─────────────────────────────────────── */
.topics {
    padding: clamp(80px, 12vw, 192px) 0;
    position: relative;
    overflow: hidden;
}
.topics::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(15,31,54,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}
.topics__inner { position: relative; }
.topics__head { max-width: 720px; margin-bottom: 64px; }
.topics__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    margin-top: 18px;
}
.topics__lede {
    font-size: clamp(1.05rem, 1.25vw, 1.25rem);
    line-height: 1.55;
    color: var(--fg-2);
    margin-top: 18px;
    max-width: 50ch;
}
.topics__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.topic-card {
    grid-column: span 2;
    perspective: 1000px;
    display: block;
    cursor: pointer;
}
.topic-card--wide { grid-column: span 4; }
@media (max-width: 1024px) {
    .topic-card { grid-column: span 3; }
    .topic-card--wide { grid-column: span 6; }
}
@media (max-width: 640px) {
    .topics__grid { grid-template-columns: 1fr; }
    .topic-card, .topic-card--wide { grid-column: span 1; }
}

.topic-card__inner {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    min-height: 240px;
    display: flex; flex-direction: column;
    transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
    transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 300ms var(--ease-out);
    transform-style: preserve-3d;
    overflow: hidden;
}
.topic-card--wide .topic-card__inner {
    min-height: 280px;
    padding: 36px;
    background: linear-gradient(135deg, #1D3557 0%, #0F1F36 100%);
    color: #FAF8F4;
    border-color: rgba(255,255,255,0.08);
}
.topic-card:hover .topic-card__inner {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-2);
}
.topic-card--wide:hover .topic-card__inner { border-color: rgba(255,255,255,0.2); }

/* conic-gradient border glow on hover */
.topic-card__inner::before {
    content: "";
    position: absolute; inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: conic-gradient(from var(--angle, 0deg), transparent 0%, rgba(230,57,70,0.5) 25%, transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
    pointer-events: none;
}
.topic-card:hover .topic-card__inner::before {
    opacity: 1;
    animation: borderSpin 4s linear infinite;
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes borderSpin {
    from { --angle: 0deg; }
    to   { --angle: 360deg; }
}

.topic-card__icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(230,57,70,0.08);
    color: var(--color-primary);
    display: inline-flex; align-items: center; justify-content: center;
    transform: rotate(var(--ir, 0deg)) scale(var(--is, 1));
    transition: transform 400ms var(--ease-spring), background 300ms var(--ease-out);
    flex: 0 0 auto;
}
.topic-card:hover .topic-card__icon {
    --ir: -5deg;
    --is: 1.1;
    background: rgba(230,57,70,0.15);
}
.topic-card--wide .topic-card__icon {
    background: rgba(255,107,122,0.15);
    color: var(--color-primary-light);
}
.topic-card__num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-2);
    letter-spacing: 0.1em;
}
.topic-card--wide .topic-card__num { color: rgba(255,255,255,0.55); }

.topic-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--fg-1);
    margin-top: 18px;
}
.topic-card--wide .topic-card__title {
    font-size: clamp(1.5rem, 2.2vw, 2.25rem);
    max-width: 16ch;
}
.topic-card--wide .topic-card__title { color: #FAF8F4; }
.topic-card__desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--fg-2);
    margin-top: 14px;
    flex: 1;
}
.topic-card--wide .topic-card__desc {
    color: rgba(255,255,255,0.72);
    font-size: 16px;
    max-width: 48ch;
}
.topic-card__foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 28px;
    gap: 12px;
}
.topic-card__cta {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-2);
}
.topic-card--wide .topic-card__cta { color: rgba(255,255,255,0.55); }
.topic-card__arrow {
    width: 40px; height: 40px;
    background: rgba(230,57,70,0.08);
    color: var(--color-primary);
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    transform: translateX(-20px);
    opacity: 0;
    transition: all 350ms var(--ease-out);
}
.topic-card:hover .topic-card__arrow {
    transform: translateX(0);
    opacity: 1;
    background: var(--color-primary);
    color: #fff;
}
.topic-card--wide .topic-card__arrow {
    background: rgba(255,107,122,0.2);
    color: var(--color-primary-light);
}
.topic-card--wide:hover .topic-card__arrow {
    background: var(--color-primary);
    color: #fff;
}

/* ── stats ─────────────────────────────────────────────────── */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px 36px;
}
@media (max-width: 1024px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 64px 40px; } }
@media (max-width: 640px)  { .stats { grid-template-columns: 1fr; } }
.stat { position: relative; }
.stat__num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.5rem, 9vw, 8.5rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    color: #FAF8F4;
    font-variant-numeric: tabular-nums;
    display: flex; align-items: baseline; gap: 4px;
    text-shadow: 0 0 32px rgba(230,57,70,0);
    transition: text-shadow 1500ms var(--ease-out);
}
.is-revealed .stat__num { text-shadow: 0 0 0 rgba(230,57,70,0); }
.stat__num--accent { color: var(--color-primary-light); }
.stat__label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-top: 24px;
}
.stat__body {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255,255,255,0.72);
    max-width: 28ch;
    margin-top: 10px;
}
.stat__bar {
    margin-top: 16px;
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.stat__bar-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
    transition: width 1500ms var(--ease-out);
}
.is-revealed .stat__bar-fill { width: 97%; }
.stat__bar-mark {
    position: absolute;
    right: 0; top: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq {
    padding: clamp(80px, 12vw, 160px) 0;
    background: var(--bg-page);
}
.faq__head { margin-bottom: 56px; max-width: 720px; }
.faq__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-top: 16px;
}
.faq__lede {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.55;
    color: var(--fg-2);
    margin-top: 18px;
}
.faq__lede a {
    color: var(--color-primary);
    border-bottom: 1px solid rgba(230,57,70,0.3);
    transition: border-color 200ms var(--ease-out);
}
.faq__lede a:hover { border-color: var(--color-primary); }

.accordion {
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.accordion__item {
    border-bottom: 1px solid var(--border-1);
    position: relative;
    overflow: hidden;
}
.accordion__item:last-child { border-bottom: 0; }
.accordion__item::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(230,57,70,0.08), transparent 60%);
    opacity: 0;
    pointer-events: none;
}
.accordion__item.is-flash::before {
    animation: highlightFlash 600ms var(--ease-out);
}
@keyframes highlightFlash {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}
.accordion__trigger {
    width: 100%;
    padding: 24px 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: transparent; border: 0;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    letter-spacing: -0.01em;
    color: var(--fg-1);
    transition: background 200ms var(--ease-out), color 200ms var(--ease-out), transform 250ms var(--ease-out);
}
.accordion__trigger:hover {
    background: rgba(26,26,46,0.02);
    color: var(--color-primary);
    transform: translateX(8px);
}
.accordion__plus {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    color: var(--fg-2);
    transition: transform 400ms var(--ease-spring), background 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.accordion__item.is-open .accordion__plus {
    transform: rotate(45deg);
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.accordion__panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 400ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms var(--ease-out);
}
.accordion__item.is-open .accordion__panel {
    max-height: 480px;
    opacity: 1;
}
.accordion__panel-inner {
    padding: 0 28px 28px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--fg-2);
    max-width: 60ch;
}

/* ── help section ───────────────────────────────────────────── */
.help {
    background: var(--bg-soft);
    padding: clamp(80px, 12vw, 160px) 0;
}
.help__head { max-width: 680px; margin-bottom: 48px; }
.help__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-top: 16px;
}
.help__lede {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.6;
    color: var(--fg-2);
    margin-top: 18px;
    max-width: 60ch;
}
.help__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 800px) { .help__list { grid-template-columns: 1fr; } }
.help-row {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: 20px;
    transition: border-color 300ms var(--ease-out), transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.help-row:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.help-row__lang {
    flex: 0 0 auto;
    width: 44px; height: 28px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--fg-2);
    margin-top: 2px;
}
.help-row:hover .help-row__lang {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.help-row__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--fg-1);
}
.help-row__desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--fg-2);
    margin-top: 4px;
}
.help__foot {
    margin-top: 32px;
    display: flex; justify-content: flex-start;
}
.help__more {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    color: var(--color-primary);
    padding: 12px 0;
    border-bottom: 1px solid rgba(230,57,70,0.35);
    transition: border-color 200ms var(--ease-out), gap 200ms var(--ease-out);
}
.help__more:hover { border-color: var(--color-primary); gap: 12px; }

/* ── footer ──────────────────────────────────────────────────── */
.footer {
    background: var(--color-secondary);
    color: rgba(255,255,255,0.65);
    padding: 80px 0 32px;
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}
.footer > * { position: relative; z-index: 1; }

.footer__brand {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: #FAF8F4;
    letter-spacing: -0.02em;
}
.footer__brand-tail { color: rgba(255,255,255,0.55); font-weight: 500; }

.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 880px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 560px) {
    .footer__grid { grid-template-columns: 1fr; }
}
.footer__col-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 18px;
}
.footer__col p {
    font-size: 14px; line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin-top: 18px;
    max-width: 36ch;
}
.footer__links { list-style: none; display: grid; gap: 12px; }
.footer__links a {
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    transition: color 200ms var(--ease-out);
}
.footer__links a:hover { color: #FAF8F4; }
.footer__help-item { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.footer__help-lang {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.45);
}
.footer__help-name {
    font-size: 13.5px;
    color: rgba(255,255,255,0.78);
}
.footer__help-item:hover .footer__help-name { color: #FAF8F4; }

.footer__editor-email {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #FAF8F4;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 2px;
    display: inline-block;
}
.footer__editor-email:hover { border-color: var(--color-primary); }

.footer__bottom {
    margin-top: 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 28px;
    align-items: center;
}
@media (max-width: 800px) {
    .footer__bottom { grid-template-columns: 1fr; gap: 20px; }
}
.footer__age {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 16px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    color: #FAF8F4;
    letter-spacing: -0.02em;
    flex: 0 0 auto;
}
.footer__legal {
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255,255,255,0.55);
    max-width: 60ch;
}
.footer__copy {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════
   STUB-PAGES — placeholder для разделов, которые ещё в разработке
   ════════════════════════════════════════════════════════════════ */
.stub-hero {
    background: var(--bg-cinema);
    color: var(--fg-on-dark);
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.stub-hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 50% at 30% 20%, rgba(230,57,70,0.15), transparent 70%),
        radial-gradient(50% 40% at 80% 80%, rgba(29,53,87,0.6), transparent 70%);
    pointer-events: none;
}
.stub-hero > * { position: relative; z-index: 1; }
.stub-hero__breadcrumb {
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
    letter-spacing: 0.04em;
}
.stub-hero__breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.stub-hero__breadcrumb a:hover {
    color: var(--color-primary-light);
    border-color: var(--color-primary-light);
}
.stub-hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: #FAF8F4;
    margin: 0 0 20px;
}
.stub-hero__lede {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.5;
    color: rgba(255,255,255,0.78);
    max-width: 60ch;
    margin: 0 0 36px;
}
.stub-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(230,57,70,0.12);
    border: 1px solid rgba(230,57,70,0.3);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-primary-light);
    margin-bottom: 28px;
}
.stub-hero__body {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
    max-width: 60ch;
    margin: 0 0 40px;
}

/* ════════════════════════════════════════════════════════════════
   ARTICLE PAGES — для контентных лонгридов (rules, rng-explained, etc)
   ════════════════════════════════════════════════════════════════ */
.article {
    background: var(--bg-page);
    color: var(--fg-1);
}

/* Hero раздела */
.article__hero {
    background: var(--bg-cinema);
    color: var(--fg-on-dark);
    padding: 96px 0 120px;
    position: relative;
    overflow: hidden;
}
.article__hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 50% at 25% 25%, rgba(230,57,70,0.16), transparent 70%),
        radial-gradient(50% 45% at 80% 80%, rgba(29,53,87,0.55), transparent 70%);
    pointer-events: none;
}
.article__hero > * { position: relative; z-index: 1; }

.article__breadcrumb {
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
    letter-spacing: 0.04em;
}
.article__breadcrumb a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.22);
    transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.article__breadcrumb a:hover {
    color: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

.article__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: #FAF8F4;
    margin: 0 0 24px;
    max-width: 22ch;
}

.article__lede {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.55;
    color: rgba(255,255,255,0.8);
    max-width: 56ch;
    margin: 0 0 32px;
}

.article__meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.04em;
}
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Тело статьи */
.article__body { padding: 80px 0 100px; }
.article__body .container--narrow { max-width: 720px; }

.article__section { margin-bottom: 64px; }
.article__section:last-child { margin-bottom: 0; }

.article__body h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--fg-1);
    margin: 0 0 24px;
}
.article__body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.25;
    color: var(--fg-1);
    margin: 32px 0 14px;
}
.article__body p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--fg-1);
    margin: 0 0 18px;
}
.article__body p:last-child { margin-bottom: 0; }
.article__body strong { font-weight: 600; }
.article__body em { font-style: italic; color: var(--fg-2); }
.article__body a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(230,57,70,0.35);
    transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.article__body a:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.article__body ul, .article__body ol { margin: 0 0 18px; padding-left: 24px; }
.article__body li { font-size: 17px; line-height: 1.7; margin-bottom: 8px; }
.article__body code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-primary-dark);
}

/* Callout-блоки (предупреждение / инфо / совет) */
.callout {
    margin: 28px 0;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-soft);
    border-left: 4px solid var(--color-primary);
    position: relative;
}
.callout p { font-size: 16px; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--color-primary-dark); }
.callout--warning { border-left-color: var(--color-warning); }
.callout--warning strong { color: var(--color-warning); }
.callout--info { border-left-color: var(--color-info); }
.callout--info strong { color: var(--color-info); }

/* Шаги с большими номерами */
.steps { list-style: none; padding: 0; margin: 32px 0; counter-reset: step; }
.steps__item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px dashed var(--border-1);
}
.steps__item:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.steps__item::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}
.steps__item h3 { margin: 0 0 8px; font-size: 1.25rem; }
.steps__item p { margin-bottom: 0; }

/* Карточки элементов интерфейса */
.ui-elements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}
.ui-element {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
}
.ui-element__name {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 10px;
}
.ui-element__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0 0 10px;
    color: var(--fg-1);
}
.ui-element__desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--fg-2);
    margin: 0;
}

/* Связанные материалы */
.related {
    margin-top: 80px;
    padding: 48px;
    background: var(--bg-soft);
    border-radius: var(--radius-xl);
}
.related__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0 0 8px;
}
.related__lede { color: var(--fg-2); margin-bottom: 24px; font-size: 16px; }
.related__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.related__item {
    display: block;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--fg-1);
    transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.related__item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}
.related__item-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.related__item-desc { font-size: 14px; color: var(--fg-2); line-height: 1.5; }

/* ════════════════════════════════════════════════════════════════
   CODE BLOCKS — для технических статей (RNG, проверка хеша)
   ════════════════════════════════════════════════════════════════ */
.article__body pre {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--color-secondary-dark);
    color: #E6F0FF;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.55;
    border-left: 3px solid var(--color-primary);
}
.article__body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}
.article__body pre .c { color: #7BAFFF; }      /* comment */
.article__body pre .k { color: #FFB7BD; }      /* keyword */
.article__body pre .s { color: #B8E994; }      /* string */
.article__body pre .n { color: #FFD580; }      /* number/value */

/* Inline-table для технической информации */
.tech-table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 15px;
}
.tech-table th, .tech-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-1);
    text-align: left;
    vertical-align: top;
}
.tech-table th {
    background: var(--bg-soft);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-2);
    font-weight: 600;
}
.tech-table td:first-child {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Хайлайт ключевых утверждений */
.key-point {
    margin: 28px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-card) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-1);
    border-left: 6px solid var(--color-primary);
}
.key-point__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 10px;
}
.key-point p { font-size: 16px; margin: 0; }
.key-point p + p { margin-top: 12px; }
