/* ==========================================================================
   Alessandro Di Biagio — sito personale
   ========================================================================== */

:root {
    --bg: #f6f7f9;
    --bg-elev: #ffffff;
    --bg-sunken: #eef0f4;
    --ink: #0d1424;
    --ink-2: #3a4458;
    --muted: #667189;
    --line: #e1e5ec;
    --line-strong: #cfd5df;
    --accent: #0f8a5f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(15, 138, 95, 0.1);
    --accent-text: #0b7650;
    --star: #e8a317;
    --hero-from: #0b1222;
    --hero-to: #13213d;
    --shadow-sm: 0 1px 2px rgba(13, 20, 36, 0.06), 0 1px 1px rgba(13, 20, 36, 0.04);
    --shadow-md: 0 10px 30px -12px rgba(13, 20, 36, 0.18), 0 2px 6px rgba(13, 20, 36, 0.05);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --max: 1160px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0f1a;
        --bg-elev: #111827;
        --bg-sunken: #0e1522;
        --ink: #eef1f7;
        --ink-2: #c5ccda;
        --muted: #8d97ab;
        --line: #1f2a3c;
        --line-strong: #2b3850;
        --accent: #34c38a;
        --accent-ink: #04140d;
        --accent-soft: rgba(52, 195, 138, 0.12);
        --accent-text: #4fd49c;
        --hero-from: #070b14;
        --hero-to: #0f1a30;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, 0.7);
    }
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

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

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-weight: 700;
}

p {
    margin: 0;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 0.98rem;
    font-weight: 650;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

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

.nav a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 150ms ease, color 150ms ease;
}

.nav a:hover {
    background: var(--bg-sunken);
    color: var(--ink);
}

.nav a.is-active {
    color: var(--ink);
    background: var(--bg-sunken);
}

.nav .nav-cta {
    margin-left: 8px;
    background: var(--ink);
    color: var(--bg);
}

.nav .nav-cta:hover {
    background: var(--ink);
    color: var(--bg);
    opacity: 0.88;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-elev);
    color: var(--ink);
    align-items: center;
    justify-content: center;
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.button-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.button-primary:hover {
    opacity: 0.92;
}

.button-secondary {
    background: var(--bg-elev);
    border-color: var(--line-strong);
    color: var(--ink);
}

.button-secondary:hover {
    border-color: var(--ink-2);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.button-sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-text);
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(52, 195, 138, 0.22), transparent 60%),
        radial-gradient(700px 380px at -10% 110%, rgba(66, 133, 244, 0.18), transparent 60%),
        linear-gradient(160deg, var(--hero-from), var(--hero-to));
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding: 88px 0 96px;
}

.hero-sub .container {
    grid-template-columns: minmax(0, 1fr);
    padding: 72px 0 72px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #cfd8e6;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.kicker .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34c38a;
    box-shadow: 0 0 0 4px rgba(52, 195, 138, 0.2);
}

.hero h1 {
    font-size: clamp(2.3rem, 5.2vw, 3.9rem);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.hero h1 .hl {
    background: linear-gradient(90deg, #5ee0a8, #7fb4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lead {
    max-width: 58ch;
    margin-top: 22px;
    color: #b8c3d6;
    font-size: 1.12rem;
    line-height: 1.7;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 52px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stats div {
    padding: 20px 16px 0 0;
}

.hero-stats strong {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-stats span {
    color: #93a0b6;
    font-size: 0.85rem;
}

/* icon showcase */

.showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
    transform: perspective(1400px) rotateY(-8deg) rotateX(4deg);
}

.showcase a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: transform 200ms ease;
}

.showcase a:hover {
    transform: translateY(-4px);
}

.showcase img {
    width: 100%;
    max-width: 112px;
    aspect-ratio: 1;
    border-radius: 24%;
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.55);
}

.showcase span {
    color: #c5cfdf;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.3;
}

.showcase-caption {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #93a0b6;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.showcase-caption a {
    flex-direction: row;
    color: #5ee0a8;
}

/* ---------- Sections ---------- */

.section {
    padding: 96px 0;
}

.section-alt {
    background: var(--bg-elev);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 44px;
}

.section-head > div {
    max-width: 680px;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}

.section-intro {
    margin-top: 14px;
    color: var(--muted);
    font-size: 1.06rem;
}

.grid {
    display: grid;
    gap: 20px;
}

.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-elev);
    box-shadow: var(--shadow-sm);
}

.section-alt .card {
    background: var(--bg);
}

/* ---------- App cards ---------- */

.app-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}

.app-cover {
    aspect-ratio: 1024 / 500;
    width: 100%;
    height: auto;
    object-fit: cover;
    background: var(--bg-sunken);
    border-bottom: 1px solid var(--line);
}

.app-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-icon {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 24%;
    box-shadow: var(--shadow-sm);
}

.app-icon.lg {
    width: 72px;
    height: 72px;
}

.app-title h3 {
    font-size: 1.12rem;
}

.app-cat {
    color: var(--muted);
    font-size: 0.85rem;
}

.app-desc {
    color: var(--ink-2);
    font-size: 0.95rem;
}

.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-sunken);
    color: var(--ink-2);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.chip svg {
    width: 13px;
    height: 13px;
}

.chip .star {
    color: var(--star);
}

.chip-new {
    border-color: transparent;
    background: var(--accent-soft);
    color: var(--accent-text);
}

.app-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}

.app-foot .legal {
    display: flex;
    gap: 14px;
    color: var(--muted);
}

.app-foot .legal a:hover {
    color: var(--ink);
}

/* detailed app rows (pagina app) */

.app-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
}

.app-row + .app-row {
    margin-top: 24px;
}

.app-media {
    display: grid;
    place-items: center;
    padding: 28px;
    background: var(--bg-sunken);
    border-right: 1px solid var(--line);
}

.app-media .app-cover {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.app-row .app-body {
    padding: 32px;
    gap: 16px;
}

.app-row h2 {
    font-size: 1.5rem;
}

.feature-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink-2);
    font-size: 0.95rem;
}

.feature-list li {
    position: relative;
    padding-left: 26px;
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-soft)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%230f8a5f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        center / 100% no-repeat;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-top: auto;
    padding-top: 8px;
}

.app-actions .legal {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 0.88rem;
}

.app-actions .legal a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.app-group-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 64px 0 24px;
    font-size: 1.15rem;
}

.app-group-title:first-child {
    margin-top: 0;
}

.app-group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ---------- Skills ---------- */

.skill {
    padding: 26px;
}

.skill-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-text);
}

.skill-icon svg {
    width: 22px;
    height: 22px;
}

.skill h3 {
    margin-bottom: 8px;
    font-size: 1.08rem;
}

.skill p {
    color: var(--muted);
    font-size: 0.94rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.tag {
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--bg-sunken);
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

/* ---------- Timeline ---------- */

.timeline {
    position: relative;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 28px;
    padding: 0 0 36px;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 140px;
    top: 10px;
    bottom: -10px;
    width: 1px;
    margin-left: 13px;
    background: var(--line-strong);
}

.timeline li:last-child::before {
    display: none;
}

.timeline .when {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    padding-top: 2px;
}

.timeline .what {
    position: relative;
    padding-left: 28px;
}

.timeline .what::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 7px;
    width: 13px;
    height: 13px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: var(--bg-elev);
}

.timeline h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.timeline p {
    color: var(--muted);
}

/* ---------- Split / prose ---------- */

.split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    align-items: start;
}

.prose p {
    color: var(--ink-2);
    font-size: 1.04rem;
    line-height: 1.75;
}

.prose p + p {
    margin-top: 16px;
}

.prose h2 {
    margin-bottom: 18px;
}

.prose h3 {
    margin: 28px 0 10px;
    font-size: 1.12rem;
}

.quote {
    padding: 28px;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--bg-sunken);
    color: var(--ink-2);
    font-size: 1.08rem;
    line-height: 1.7;
}

/* ---------- Legal docs table ---------- */

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.docs-table th,
.docs-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.docs-table thead th {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--bg-sunken);
}

.docs-table tbody tr:last-child td {
    border-bottom: 0;
}

.docs-table tbody tr:hover {
    background: var(--bg-sunken);
}

.docs-table .app-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.docs-table .app-cell img {
    width: 32px;
    height: 32px;
    border-radius: 24%;
}

.docs-table .links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.docs-table .links a {
    color: var(--accent-text);
    font-weight: 500;
}

.docs-table .links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.docs-table .pkg {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.table-wrap {
    overflow: hidden;
}

/* ---------- Contact ---------- */

.cta {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto;
    align-items: center;
    gap: 40px;
    padding: 48px;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(52, 195, 138, 0.25), transparent 60%),
        linear-gradient(150deg, var(--hero-from), var(--hero-to));
}

.cta h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.cta p {
    margin-top: 12px;
    color: #b8c3d6;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.contact-list li:first-child {
    padding-top: 0;
}

.contact-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.contact-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-list a {
    color: var(--accent-text);
    font-weight: 600;
    word-break: break-all;
    text-align: right;
}

.panel {
    padding: 32px;
}

.panel h2 {
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.panel h3 {
    margin: 24px 0 8px;
    font-size: 1.02rem;
}

.panel p {
    color: var(--ink-2);
}

.panel p + p {
    margin-top: 12px;
}

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

.site-footer {
    padding: 56px 0 40px;
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-grid h4 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a:hover {
    color: var(--ink);
}

.footer-about p {
    max-width: 36ch;
    margin-top: 14px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 0.84rem;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.link-button:hover {
    color: var(--ink);
}

/* ---------- Consent banner (site.js) ---------- */

.consent-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.35);
}

.consent-banner[hidden] {
    display: none;
}

.consent-copy {
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
    color: var(--ink-2);
}

.consent-copy .eyebrow {
    margin: 0;
}

.consent-meta {
    color: var(--muted);
    font-size: 0.86rem;
}

.consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Reveal animation ---------- */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 600ms ease, transform 600ms ease;
    }

    .reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}

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

@media (max-width: 1020px) {
    .hero .container {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }

    .showcase {
        transform: none;
        max-width: 520px;
    }

    .cols-3,
    .cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .app-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-media {
        padding: 20px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .cta {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .container {
        width: calc(100% - 32px);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 16px 18px;
        border-bottom: 1px solid var(--line);
        background: var(--bg);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        padding: 12px 14px;
    }

    .nav .nav-cta {
        margin: 8px 0 0;
        text-align: center;
    }

    .hero .container {
        padding: 56px 0 64px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section {
        padding: 64px 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .cols-2,
    .cols-3,
    .cols-4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .timeline li {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .timeline li::before {
        display: none;
    }

    .timeline .what {
        padding-left: 0;
    }

    .timeline .what::before {
        display: none;
    }

    .app-row .app-body,
    .panel {
        padding: 24px;
    }

    .cta {
        padding: 32px 24px;
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .docs-table thead {
        display: none;
    }

    .docs-table,
    .docs-table tbody,
    .docs-table tr,
    .docs-table td {
        display: block;
    }

    .docs-table tr {
        padding: 16px 18px;
        border-bottom: 1px solid var(--line);
    }

    .docs-table tbody tr:last-child {
        border-bottom: 0;
    }

    .docs-table td {
        padding: 4px 0;
        border: 0;
    }

    .consent-banner {
        grid-template-columns: minmax(0, 1fr);
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .contact-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .contact-list a {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .brand-text small {
        display: none;
    }

    .showcase {
        gap: 12px;
        padding: 20px;
    }
}
