/* AniRef website — palette mirrors frontend/constants/app-colors.ts in the app. */

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/Poppins_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/Poppins_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/Poppins_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/Poppins_700Bold.ttf") format("truetype"); }

:root {
    --red: #C0392B;
    --red-hover: #A93226;
    --red-light: #FADBD8;
    --red-bright: #E03C31;
    --red-deep: #AF221D;
    --bg: #F4F4F6;
    --card: #FFFFFF;
    --card-border: #E8E8E8;
    --recess: #F7F7F7;
    --text: #1C1C1E;
    --muted: #6E6E73;
    --gray-light: #C8C8C8;
    --chrome: #FFFFFF;
    --chrome-edge: #EAEAEE;
    --green: #05CC47;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.04);
    --radius: 18px;
    --radius-sm: 12px;
    --max: 1120px;
    --gutter: clamp(16px, 4vw, 32px);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --red-light: #3A1810;
    --bg: #000000;
    --card: #202327;
    --card-border: #2F3336;
    --recess: #16191C;
    --text: #E7E9EA;
    --muted: #8B9095;
    --gray-light: #3A3F44;
    --chrome: #202327;
    --chrome-edge: #2F3336;
    --shadow: none;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --red-light: #3A1810;
        --bg: #000000;
        --card: #202327;
        --card-border: #2F3336;
        --recess: #16191C;
        --text: #E7E9EA;
        --muted: #8B9095;
        --gray-light: #3A3F44;
        --chrome: #202327;
        --chrome-edge: #2F3336;
        --shadow: none;
        color-scheme: dark;
    }
}

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

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

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-hover); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 8px; }

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--chrome);
    border-bottom: 1px solid var(--chrome-edge);
}

.nav { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
.logo-white { display: none; }
:root[data-theme="dark"] .logo-red { display: none; }
:root[data-theme="dark"] .logo-white { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .logo-red { display: none; }
    :root:not([data-theme="light"]) .logo-white { display: block; }
}

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
}
.nav-links a:hover { background: var(--recess); color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--red); background: var(--red-light); }

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

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--chrome-edge);
    background: var(--recess);
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover { border-color: var(--gray-light); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun { display: block; }
    :root:not([data-theme="light"]) .icon-moon { display: none; }
}

.menu-toggle { display: none; }

@media (max-width: 820px) {
    .nav { gap: 12px; }
    .nav-actions { margin-left: auto; }
    .menu-toggle { display: inline-grid; }
    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 10px var(--gutter) 18px;
        background: var(--chrome);
        border-bottom: 1px solid var(--chrome-edge);
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 14px; border-radius: var(--radius-sm); }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); color: #fff; }
.btn-white { background: #fff; color: var(--red); }
.btn-white:hover { background: #FDF2F1; color: var(--red-hover); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-outline { background: var(--card); color: var(--text); border-color: var(--card-border); }
.btn-outline:hover { border-color: var(--gray-light); color: var(--text); }

/* ---------- Hero (the app icon's two-tone red) ---------- */

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--red-bright) 0%, var(--red-bright) 50%, var(--red-deep) 50%, var(--red-deep) 100%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.14), transparent 60%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
    padding-block: clamp(56px, 9vw, 110px);
}
.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero-lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: rgba(255, 255, 255, 0.92); max-width: 36ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 16px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.8); }

.hero-art { display: grid; place-items: center; }
.hero-art img {
    width: min(300px, 70vw);
    border-radius: 22%;
    box-shadow: 0 30px 60px rgba(60, 10, 5, 0.35);
    transform: rotate(-4deg);
}

@media (max-width: 820px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; text-align: left; }
    .hero-art { order: -1; justify-items: start; }
    .hero-art img { width: 120px; transform: none; }
}

.page-hero { padding-block: clamp(44px, 7vw, 80px) clamp(28px, 4vw, 44px); }
.page-hero .eyebrow { color: var(--red); }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

/* ---------- Sections & cards ---------- */

.section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--red); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.center { text-align: center; margin-inline: auto; }

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.icon-badge {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: var(--red-light);
    color: var(--red);
}
.icon-badge svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }

.step-num {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Feature rows */
.feature-list { display: grid; gap: 20px; }
.feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: start;
}
.feature .icon-badge { margin: 0; }
.feature .eyebrow { color: var(--red); margin-bottom: 4px; font-size: 0.72rem; }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 860px; margin-inline: auto; }
.plan { display: flex; flex-direction: column; }
.plan-pro { border: 2px solid var(--red); position: relative; }
.plan-tag {
    position: absolute;
    top: -13px;
    right: 24px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}
.plan-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.plan-price { font-size: 2.1rem; font-weight: 700; line-height: 1.1; margin: 10px 0 2px; }
.plan-price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.card .plan-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; color: var(--red); }
.fine-print { color: var(--muted); font-size: 0.85rem; text-align: center; max-width: 640px; margin: 24px auto 0; }

/* ---------- CTA band ---------- */

.cta {
    background: var(--red);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(32px, 6vw, 56px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { color: rgba(255, 255, 255, 0.88); margin: 0; }

/* ---------- FAQ ---------- */

.faq-group { margin-bottom: 44px; }
.faq-group > h2 { font-size: 1.3rem; margin-bottom: 16px; }
.faq-item {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 56px 18px 22px;
    font-weight: 600;
    position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-answer { padding: 0 22px 20px; color: var(--muted); }
.faq-answer p:last-child, .faq-answer ul:last-child { margin-bottom: 0; }
.faq-answer strong { color: var(--text); font-weight: 600; }

.faq-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}
.chip:hover { border-color: var(--red); color: var(--red); }

/* ---------- Legal documents ---------- */

.legal { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; padding-bottom: 80px; }
.legal-toc {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 20px;
    font-size: 0.85rem;
}
.legal-toc h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.legal-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.legal-toc a { color: var(--text); text-decoration: none; }
.legal-toc a:hover { color: var(--red); }

.legal-body { padding: clamp(24px, 4vw, 48px); min-width: 0; overflow-wrap: anywhere; }
.legal-body h2 {
    font-size: 1.2rem;
    margin: 2.4em 0 0.8em;
    padding-top: 1.4em;
    border-top: 1px solid var(--card-border);
    scroll-margin-top: 90px;
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body h3 { font-size: 1.02rem; margin: 1.6em 0 0.6em; }
.legal-body p, .legal-body li { color: var(--text); }
.legal-body p { margin: 0 0 1em; }
.legal-body ul, .legal-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.legal-body li { margin-bottom: 0.4em; }
.legal-body .in-short {
    background: var(--recess);
    border-left: 3px solid var(--red);
    border-radius: 0 10px 10px 0;
    padding: 12px 16px;
}
.legal-body .caps { font-size: 0.92rem; }
.legal-meta { color: var(--muted); font-size: 0.95rem; }

.summary-box {
    background: var(--red-light);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 1.5em;
}
.summary-box h2 { border: 0; margin: 0 0 0.6em; padding: 0; }
.summary-box ul { margin-bottom: 0; }

.category-table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.category-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.category-table th, .category-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--card-border); vertical-align: top; }
.category-table th { font-weight: 600; background: var(--recess); }
.category-table td:last-child { font-weight: 600; white-space: nowrap; }

@media (max-width: 900px) {
    .legal { grid-template-columns: 1fr; }
    .legal-toc { position: static; max-height: none; }
}

/* ---------- Support ---------- */

.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.contact-card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.contact-card p { margin: 0; }
.steps { padding-left: 1.3em; margin: 12px 0 0; color: var(--muted); }
.steps li { margin-bottom: 6px; }
.steps strong { color: var(--text); font-weight: 600; }

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

.site-footer {
    margin-top: 40px;
    background: var(--chrome);
    border-top: 1px solid var(--chrome-edge);
    padding-block: 48px 32px;
    font-size: 0.92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--red); }
.footer-brand img { height: 28px; width: auto; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); max-width: 32ch; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--chrome-edge);
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 820px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */

.not-found { text-align: center; padding-block: clamp(64px, 12vw, 140px); }
.not-found .big { font-size: clamp(4rem, 14vw, 7rem); font-weight: 700; color: var(--red); line-height: 1; margin-bottom: 12px; }
.not-found p { color: var(--muted); }

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