/* =========================================================
   WESTBROOK COUNTY
   Dark emergency-services theme. All text is white.
   Accents come from the logo: police blue + fire/EMS red.
   ========================================================= */

:root {
    --bg: #07090d;
    --bg-2: #0b0f15;
    --panel: #10151d;
    --panel-2: #151c27;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);

    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.82);
    --text-dim: rgba(255, 255, 255, 0.62);

    --blue: #2f6bff;
    --blue-bright: #5b8dff;
    --red: #e5322d;
    --red-bright: #ff4d47;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);

    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --font-head: "Barlow Condensed", "Inter", "Arial Narrow", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

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

button {
    font-family: inherit;
}

::selection {
    background: var(--blue);
    color: #fff;
}

.container {
    width: min(1200px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

/* The signature red/blue split bar, like a lightbar. */
.splitbar {
    display: block;
    width: 72px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}


/* =========================================
   HEADER
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    width: 100%;
    height: 72px;

    background: rgba(7, 9, 13, 0.78);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);

    border-bottom: 1px solid var(--border);

    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
    opacity: 0.85;
}

.site-header.scrolled {
    background: rgba(7, 9, 13, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header-inner {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--text);
    text-decoration: none;

    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;

    white-space: nowrap;
}

.brand img {
    width: 66px;
    height: 44px;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.navigation a {
    position: relative;

    display: inline-flex;
    align-items: center;

    padding: 10px 14px;

    color: var(--text-soft);

    border-radius: var(--radius-sm);

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    transition: background 0.15s ease, color 0.15s ease;
}

.navigation a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.navigation a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.navigation a.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--blue);
}

.update-list li:nth-child(even)::before {
    background: var(--red);
}

.header-play {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.menu-button {
    display: none;

    padding: 9px 14px;

    background: rgba(255, 255, 255, 0.08);
    color: var(--text);

    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;

    cursor: pointer;
}


/* =========================================
   BUTTONS
   ========================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 50px;
    padding: 0 26px;

    border: 1px solid transparent;
    border-radius: 10px;

    color: var(--text);

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;

    text-decoration: none;

    cursor: pointer;

    transition: transform 0.15s ease, background 0.15s ease,
        border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.button-primary {
    background: linear-gradient(180deg, var(--red-bright), var(--red));
    box-shadow: 0 10px 28px rgba(229, 50, 45, 0.35);
}

.button-primary:hover {
    box-shadow: 0 14px 34px rgba(229, 50, 45, 0.5);
}

.button-blue {
    background: linear-gradient(180deg, var(--blue-bright), var(--blue));
    box-shadow: 0 10px 28px rgba(47, 107, 255, 0.35);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}


/* =========================================
   HERO
   ========================================= */

.hero {
    position: relative;

    width: 100%;
    min-height: calc(100vh - 72px);
    min-height: calc(100svh - 72px);

    display: flex;
    align-items: center;

    padding: 90px 0 150px;

    background: #05070a;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;

    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 55%;

    transform: scale(1.04);
    animation: heroDrift 24s ease-in-out infinite alternate;
}

@keyframes heroDrift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to   { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;

    background:
        linear-gradient(90deg, rgba(5, 7, 10, 0.9) 0%, rgba(5, 7, 10, 0.5) 48%, rgba(5, 7, 10, 0.08) 100%),
        linear-gradient(180deg, rgba(5, 7, 10, 0.35) 0%, rgba(5, 7, 10, 0) 35%, rgba(7, 9, 13, 1) 100%);
}

/* Soft red / blue emergency-light glow in the corners. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background:
        radial-gradient(520px 320px at 8% 100%, rgba(47, 107, 255, 0.45), transparent 70%),
        radial-gradient(520px 320px at 92% 100%, rgba(229, 50, 45, 0.45), transparent 70%);

    animation: lightsFlash 1.6s steps(1, end) infinite;
}

@keyframes lightsFlash {
    0%   { opacity: 1; }
    25%  { opacity: 0.2; }
    50%  { opacity: 0.85; }
    75%  { opacity: 0.2; }
    100% { opacity: 1; }
}

.hero-content {
    width: 100%;
    max-width: 700px;
}

.eyebrow,
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 18px;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.eyebrow::before,
.hero-eyebrow::before {
    content: "";
    width: 28px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}

.hero h1 {
    margin: 0;

    font-family: var(--font-head);
    font-size: clamp(60px, 10vw, 128px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -1px;
    text-transform: uppercase;

    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
}

.hero p {
    max-width: 560px;

    margin: 26px 0 0;

    color: var(--text-soft);

    font-size: 19px;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;

    margin-top: 36px;
}


/* ---------- live stats strip (hero bottom) ---------- */

.stats-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 34px;
}

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

    background: var(--border);

    border: 1px solid var(--border-strong);
    border-radius: var(--radius);

    overflow: hidden;

    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.stat {
    padding: 18px 22px;
    background: rgba(8, 11, 16, 0.72);
}

.stat strong {
    display: block;

    font-family: var(--font-head);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat span {
    display: block;
    margin-top: 6px;

    color: var(--text-dim);

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.stat .live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    vertical-align: 1px;
    border-radius: 50%;
    background: #3ddc84;
    box-shadow: 0 0 10px #3ddc84;
    animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}


/* =========================================
   SECTIONS
   ========================================= */

.section {
    width: 100%;
    padding: 100px 0;
}

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

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;

    margin-bottom: 48px;
}

.section-header h2 {
    margin: 0;

    font-family: var(--font-head);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 0;
    text-transform: uppercase;
}

.section-header p {
    max-width: 440px;
    margin: 0;

    color: var(--text-soft);
    line-height: 1.65;
}


/* =========================================
   HIGHLIGHTS (departments)
   ========================================= */

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.highlight-card {
    position: relative;

    min-height: 340px;

    display: flex;
    align-items: flex-end;

    overflow: hidden;
    isolation: isolate;

    background: linear-gradient(145deg, #151e27, #0d1218);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    color: var(--text);
    text-decoration: none;

    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.highlight-img {
    position: absolute;
    inset: 0;
    z-index: -2;

    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.6s ease;
}

.highlight-card:hover .highlight-img {
    transform: scale(1.06);
}

.highlight-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;

    background: linear-gradient(
        180deg,
        rgba(7, 9, 13, 0.05) 0%,
        rgba(7, 9, 13, 0.4) 45%,
        rgba(7, 9, 13, 0.94) 100%
    );
}

.highlight-content {
    width: 100%;
    padding: 28px;
}

.highlight-short {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 10px;
    padding: 5px 10px;

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-strong);
    border-radius: 999px;

    color: var(--text);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.highlight-title {
    margin: 0;

    font-family: var(--font-head);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.highlight-description {
    max-width: 480px;
    margin: 10px 0 0;

    color: var(--text-soft);

    font-size: 15px;
    line-height: 1.55;
}

.highlight-arrow {
    position: absolute;
    top: 22px;
    right: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--border-strong);
    border-radius: 50%;

    color: var(--text);

    font-size: 18px;
    font-weight: 700;

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    transition: transform 0.2s ease, background 0.2s ease;
}

.highlight-card:hover .highlight-arrow {
    transform: translateX(4px);
    background: var(--red);
}


/* =========================================
   FEATURES
   ========================================= */

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature {
    padding: 28px 24px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    margin-bottom: 18px;

    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: inset 0 -3px 0 0 transparent;
    border-bottom: 3px solid var(--blue);
}

.feature:nth-child(even) .feature-icon {
    border-bottom-color: var(--red);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature h3 {
    margin: 0 0 8px;

    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
}

.feature p {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================
   GALLERY
   ========================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 210px;
    gap: 16px;
}

.gallery-item {
    position: relative;

    grid-column: span 2;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    cursor: zoom-in;
}

.gallery-item.wide {
    grid-column: span 4;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    padding: 36px 18px 14px;

    background: linear-gradient(180deg, transparent, rgba(5, 7, 10, 0.9));

    color: var(--text);

    font-size: 14px;
    font-weight: 600;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(3, 5, 8, 0.93);

    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: min(1500px, 100%);
    max-height: 88vh;

    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;

    width: 44px;
    height: 44px;

    background: rgba(255, 255, 255, 0.12);
    color: var(--text);

    border: 1px solid var(--border-strong);
    border-radius: 50%;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================
   UPDATES
   ========================================= */

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-card {
    width: 100%;
    padding: 32px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.update-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.update-tag {
    display: inline-block;

    padding: 6px 12px;

    background: rgba(47, 107, 255, 0.28);
    border: 1px solid rgba(91, 141, 255, 0.5);
    border-radius: 999px;

    color: var(--text);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.update-tag.tag-release {
    background: rgba(229, 50, 45, 0.28);
    border-color: rgba(255, 77, 71, 0.55);
}

.update-date {
    color: var(--text-dim);

    font-size: 13px;
    font-weight: 600;
}

.update-title {
    margin: 16px 0 18px;

    font-family: var(--font-head);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.update-list {
    columns: 2;
    column-gap: 40px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.update-list li {
    position: relative;

    break-inside: avoid;

    margin: 0 0 10px;
    padding-left: 22px;

    color: var(--text-soft);

    font-size: 15px;
    line-height: 1.55;
}

.update-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;

    width: 8px;
    height: 8px;

    border-radius: 2px;
    background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
}

.update-image {
    width: 100%;
    max-height: 450px;

    object-fit: cover;

    border-radius: 10px;

    margin: 0 0 22px;
}

.update-more {
    margin-top: 28px;
}

.empty-message {
    color: var(--text-soft);
}


/* =========================================
   PAGE HERO (Updates / Liveries)
   ========================================= */

.page-hero {
    position: relative;

    padding: 96px 0 72px;

    background: #05070a;

    overflow: hidden;
    isolation: isolate;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;

    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        linear-gradient(90deg, rgba(5, 7, 10, 0.94), rgba(5, 7, 10, 0.55)),
        linear-gradient(180deg, rgba(5, 7, 10, 0.2), rgba(7, 9, 13, 1));
}

.page-hero h1 {
    margin: 0;

    font-family: var(--font-head);
    font-size: clamp(54px, 8vw, 96px);
    font-weight: 800;
    line-height: 0.92;
    text-transform: uppercase;
}

.page-hero p {
    max-width: 560px;
    margin: 20px 0 0;

    color: var(--text-soft);

    font-size: 18px;
}

.page-section {
    padding: 70px 0 100px;
}


/* =========================================
   LIVERIES
   ========================================= */

.livery-layout {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 22px;
    align-items: stretch;
}

.livery-card {
    padding: 36px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.livery-card h3 {
    margin: 0 0 12px;

    font-family: var(--font-head);
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
}

.livery-card p {
    margin: 0 0 24px;
    color: var(--text-soft);
    line-height: 1.7;
}

.livery-steps {
    margin: 0;
    padding: 0;

    list-style: none;
    counter-reset: step;
}

.livery-steps li {
    position: relative;

    counter-increment: step;

    margin-bottom: 18px;
    padding-left: 52px;

    color: var(--text-soft);

    line-height: 1.6;
}

.livery-steps li::before {
    content: counter(step);

    position: absolute;
    left: 0;
    top: -2px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--blue);
    border-radius: 10px;

    color: var(--text);

    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
}

.livery-steps li:nth-child(even)::before {
    background: var(--red);
}

.livery-steps strong {
    color: var(--text);
}

.livery-photo {
    position: relative;

    min-height: 320px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.livery-photo img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================
   CTA BAND
   ========================================= */

.cta {
    position: relative;

    padding: 110px 0;

    text-align: center;

    background: #05070a;

    overflow: hidden;
    isolation: isolate;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: -2;

    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        radial-gradient(600px 300px at 15% 100%, rgba(47, 107, 255, 0.4), transparent 70%),
        radial-gradient(600px 300px at 85% 100%, rgba(229, 50, 45, 0.4), transparent 70%),
        linear-gradient(180deg, rgba(7, 9, 13, 0.92), rgba(7, 9, 13, 0.78));
}

.cta h2 {
    margin: 0;

    font-family: var(--font-head);
    font-size: clamp(46px, 7vw, 84px);
    font-weight: 800;
    line-height: 0.95;
    text-transform: uppercase;
}

.cta p {
    max-width: 520px;
    margin: 18px auto 34px;

    color: var(--text-soft);

    font-size: 18px;
}

.cta .hero-buttons {
    justify-content: center;
    margin-top: 0;
}


/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    width: 100%;

    padding: 50px 0 34px;

    background: #05070a;

    border-top: 1px solid var(--border);

    color: var(--text-soft);

    font-size: 14px;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    padding-bottom: 30px;
    margin-bottom: 24px;

    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    color: var(--text);

    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
}

.footer-brand img {
    width: 66px;
    height: 44px;
    object-fit: contain;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.footer-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    color: var(--text-dim);

    font-size: 13px;
}


/* =========================================
   REVEAL ON SCROLL
   ========================================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);

    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg,
    .hero::after,
    .stat .live-dot {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1000px) {

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

    .livery-layout {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-item.wide {
        grid-column: span 4;
    }
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 760px) {

    .container {
        width: calc(100% - 32px);
    }

    /* header */

    .site-header,
    .header-inner {
        height: 64px;
    }

    .brand {
        gap: 8px;
        font-size: 17px;
    }

    .brand img {
        width: 48px;
        height: 32px;
    }

    .menu-button {
        display: block;
    }

    .header-play {
        display: none;
    }

    .navigation {
        display: none;

        position: absolute;
        top: 64px;
        left: 0;
        right: 0;

        padding: 12px 16px 16px;

        background: #07090d;

        border-bottom: 1px solid var(--border);

        flex-direction: column;
        align-items: stretch;
    }

    .navigation.open {
        display: flex;
    }

    .navigation a {
        width: 100%;
        padding: 14px;
    }

    .navigation a.active::after {
        display: none;
    }

    /* hero */

    .hero {
        min-height: 0;
        padding: 70px 0 40px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }

    .hero p {
        font-size: 17px;
    }

    .stats-strip {
        position: relative;
        bottom: auto;
        margin-top: 44px;
    }

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

    .stat {
        padding: 16px 18px;
    }

    .stat strong {
        font-size: 30px;
    }

    .hero-buttons .button {
        flex: 1 1 100%;
    }

    /* sections */

    .section {
        padding: 68px 0;
    }

    .section-header {
        display: block;
        margin-bottom: 32px;
    }

    .section-header p {
        margin-top: 14px;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .highlight-card {
        min-height: 280px;
    }

    .highlight-title {
        font-size: 34px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 150px;
        gap: 10px;
    }

    .gallery-item,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item.wide {
        grid-column: span 2;
        grid-row: span 2;
    }

    .update-card {
        padding: 24px 20px;
    }

    .update-title {
        font-size: 32px;
    }

    .update-list {
        columns: 1;
    }

    .page-hero {
        padding: 64px 0 48px;
    }

    .livery-card {
        padding: 26px 22px;
    }

    .cta {
        padding: 80px 0;
    }

    .footer-top,
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   SERVER API DOCS PAGE
   ========================================================= */

.api-docs {
    display: grid;
    gap: 22px;
}

.api-docs code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 6px;
    word-break: break-word;
}

.api-code {
    margin: 18px 0;
    padding: 16px 18px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-soft);
}

.table-wrap {
    overflow-x: auto;
    margin: 16px 0;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.api-table th,
.api-table td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.api-table th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.api-table td:first-child {
    white-space: nowrap;
}

.api-notes {
    margin: 0;
    padding-left: 20px;
    color: var(--text-soft);
}

.api-notes li + li {
    margin-top: 8px;
}

@media (max-width: 720px) {
    .api-table td:first-child {
        white-space: normal;
    }
}
