/* AI Capital Review — dark purple theme */

:root {
    --bg: #0f141b;
    --bg-2: #141b24;
    --surface: #18212c;
    --surface-2: #202b38;
    --border: #33445a;
    --border-soft: rgba(130, 160, 200, 0.18);
    --accent: #4a86c8;
    --accent-2: #8fb3dc;
    --accent-3: #2d65a3;
    --text: #e8edf3;
    --text-soft: #c2cbd7;
    --muted: #8996a8;
    --radius: 18px;
    --container: 1180px;
    --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(45, 101, 163, 0.22), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(74, 134, 200, 0.12), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 6px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

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

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 20, 27, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.brand-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.main-nav, .footer-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav { margin-left: auto; }

.main-nav a, .footer-nav a {
    color: var(--text-soft);
    font-weight: 600;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background-color .2s, color .2s;
}
.main-nav a:hover, .footer-nav a:hover {
    background: var(--surface-2);
    color: #fff;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-2);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.lang-switcher a {
    color: var(--muted);
    padding: 5px 9px;
    border-radius: 999px;
    line-height: 1;
}
.lang-switcher a:hover { color: #fff; }
.lang-switcher a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    color: #fff;
}
.lang-switcher .sep { color: var(--border); font-weight: 400; }

/* ---------- Article ---------- */

main { padding-top: 36px; }

.article { max-width: 900px; }

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 22px;
    padding: 0;
    font-size: 14px;
    color: var(--muted);
}
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--border); }
.breadcrumbs a { color: var(--accent-2); }

/* Framed hero image: keeps the natural aspect ratio, never stretched, centered. */
.hero-frame {
    margin: 28px auto 26px;
    padding: 10px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(74, 134, 200, 0.35), rgba(24, 33, 44, 0.9) 40%, rgba(45, 101, 163, 0.3));
    box-shadow: 0 30px 80px -30px rgba(45, 101, 163, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.hero-frame--portrait { max-width: 560px; }
.hero-frame--wide { max-width: 900px; }
.hero-frame img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 15px;
    object-fit: contain;
    object-position: center;
    background: var(--bg-2);
}

.article-header { text-align: center; margin-bottom: 36px; }
.article-header h1 {
    font-size: clamp(28px, 4.2vw, 44px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
    background: linear-gradient(120deg, #fff 30%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.subtitle {
    margin: 0 0 18px;
    font-size: 19px;
    color: var(--accent-2);
    font-weight: 600;
}
.meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    font-size: 14px;
    color: var(--text-soft);
}
.meta-item {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
.meta-label { color: var(--muted); }

.socials {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
}
.socials a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.socials a:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    border-color: transparent;
    color: #fff;
}
.socials svg { width: 21px; height: 21px; display: block; }

.article-body {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-soft);
}
.article-body p { margin: 0 0 1.15em; }
.article-body h2 {
    color: var(--text);
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.25;
    font-weight: 800;
    margin: 1.9em 0 0.7em;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
}
.article-body h3 {
    color: var(--text);
    font-size: 21px;
    margin: 1.6em 0 0.6em;
}
.article-body strong { color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.article-body li { margin-bottom: .5em; }
.article-body li::marker { color: var(--accent); }

.article-body .highlights {
    list-style: none;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border-soft);
}
.article-body .highlights li {
    position: relative;
    padding-left: 28px;
}
.article-body .highlights li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .62em;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
}
.article-body .highlights li:last-child { margin-bottom: 0; }

.article-body .definition {
    padding: 18px 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(74, 134, 200, 0.14), rgba(45, 101, 163, 0.06));
    border: 1px solid var(--border);
    color: var(--text);
}

.article-body blockquote {
    margin: 1.6em 0;
    padding: 22px 26px 22px 30px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border-left: 4px solid var(--accent-2);
    color: var(--text);
    font-size: 19px;
    font-style: italic;
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body .disclaimer {
    margin-top: 2em;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    font-size: 15px;
    color: var(--muted);
}

/* ---------- Cases (article blocks) ---------- */

.cases {
    margin-top: 72px;
    padding: 64px 0 80px;
    background: linear-gradient(180deg, transparent, rgba(24, 33, 44, 0.75) 25%);
    border-top: 1px solid var(--border-soft);
}
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3.5vw, 38px);
    font-weight: 800;
}
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    position: relative;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 24px 50px -24px rgba(74, 134, 200, 0.6);
}
.card--current { border-color: var(--accent); }

/* Card image frame: fixed ratio identical to the source images (1200×630), centered, no stretching. */
.card-media {
    display: block;
    margin: 10px 10px 0;
    padding: 4px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(74, 134, 200, 0.45), rgba(45, 101, 163, 0.15));
}
.card-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    background: var(--bg-2);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 22px;
}
.card-tag {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(74, 134, 200, 0.12);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.card h3 {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
}
.card h3 a { color: var(--text); }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}
.card-more {
    margin-top: auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-2);
}

/* ---------- Footer ---------- */

.site-footer {
    background: #0b1016;
    border-top: 1px solid var(--border);
    padding: 40px 0 28px;
    font-size: 15px;
}
.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-soft);
}
.footer-nav { margin-left: auto; }

.about {
    padding: 32px 0;
    max-width: 760px;
    color: var(--text-soft);
}
.about h2 { margin: 0 0 12px; font-size: 24px; color: var(--text); }
.about p { margin: 0 0 12px; line-height: 1.7; }

.btn-contacts {
    margin-top: 10px;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    border: 0;
    border-radius: 999px;
    padding: 12px 28px;
    cursor: pointer;
    box-shadow: 0 12px 30px -12px rgba(74, 134, 200, 0.8);
    transition: transform .2s, filter .2s;
}
.btn-contacts:hover { transform: translateY(-1px); filter: brightness(1.1); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 14px;
}
.to-top {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-soft);
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    :root { --header-h: 112px; }
    .header-inner { flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; padding-bottom: 10px; }
    .main-nav { order: 3; width: 100%; margin-left: 0; justify-content: center; }
    .lang-switcher { margin-left: auto; }
    .footer-nav { margin-left: 0; }
}

@media (max-width: 640px) {
    body { font-size: 17px; }
    .container { padding: 0 16px; }
    main { padding-top: 24px; }
    .cards { grid-template-columns: 1fr; }
    .hero-frame { padding: 7px; border-radius: 20px; margin: 20px auto 20px; }
    .hero-frame img { border-radius: 14px; }
    .main-nav a { padding: 6px 10px; font-size: 14px; }
    .brand-mark { width: 34px; height: 34px; }
    .brand-name { font-size: 16px; }
    .article-body blockquote { padding: 18px 18px 18px 20px; font-size: 17px; }
    .footer-top { flex-direction: column; align-items: flex-start; }
    .footer-bottom { align-items: flex-start; }
    .cases { margin-top: 48px; padding: 48px 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
