:root {
    color-scheme: light;
    --bg: #f7f7f2;
    --panel: rgba(255, 255, 255, 0.74);
    --panel-strong: #ffffff;
    --text: #161616;
    --muted: #5f646d;
    --line: rgba(22, 22, 22, 0.12);
    --accent: #0b6bcb;
    --accent-strong: #111111;
    --accent-soft: rgba(11, 107, 203, 0.12);
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
    --radius: 8px;
    --max: 1180px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #08090b;
    --panel: rgba(22, 24, 29, 0.76);
    --panel-strong: #111318;
    --text: #f5f7fb;
    --muted: #a6adb8;
    --line: rgba(255, 255, 255, 0.13);
    --accent: #8dd8ff;
    --accent-strong: #ffffff;
    --accent-soft: rgba(141, 216, 255, 0.14);
    --shadow: 0 26px 76px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(11, 107, 203, 0.12), transparent 28rem),
        linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 82%, #9fb7c9 18%));
    color: var(--text);
    transition: background-color 280ms ease, color 280ms ease;
}

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

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    width: min(var(--max), calc(100% - 32px));
    margin: 16px auto 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    box-shadow: 0 12px 42px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(22px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 720;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-strong);
    color: var(--bg);
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a,
.theme-toggle,
.button {
    min-height: 42px;
    border-radius: var(--radius);
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    color: var(--muted);
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--accent-soft);
    color: var(--text);
}

.theme-toggle,
.button,
.gallery-item,
.lightbox-close {
    border: 0;
    cursor: pointer;
}

.theme-toggle {
    padding: 0 14px;
    background: var(--panel-strong);
    color: var(--text);
    border: 1px solid var(--line);
}

.hero {
    position: relative;
    display: grid;
    min-height: calc(100vh - 92px);
    margin-top: -74px;
    padding: 124px 20px 56px;
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18) 50%, rgba(0, 0, 0, 0.58)),
        url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=2200&q=85") center / cover;
    transform: scale(1.04);
    animation: cinematic 16s ease-in-out infinite alternate;
}

.hero-content {
    align-self: end;
    width: min(var(--max), 100%);
    margin: 0 auto;
    color: #fff;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #bce8ff;
}

h1,
h2,
h3,
p {
    text-wrap: pretty;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1;
    letter-spacing: 0;
}

h1 {
    max-width: 880px;
    font-size: clamp(3.1rem, 10vw, 7.8rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
    font-size: 1.08rem;
}

p {
    line-height: 1.7;
}

.hero-copy {
    max-width: 680px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    font-weight: 720;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.gallery-item:hover {
    transform: translateY(-3px);
}

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

.hero .button.primary {
    background: #fff;
    color: #111;
}

.button.secondary {
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(18px);
}

.section,
.page-hero {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 84px 0;
}

.page-hero {
    padding: 118px 0 46px;
}

.page-hero h1 {
    max-width: 980px;
    font-size: clamp(2.6rem, 7vw, 6.2rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.12rem;
}

.intro-grid,
.story-grid,
.contact-layout,
.split-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 34px;
    align-items: start;
}

.feature-list,
.value-stack,
.service-grid {
    display: grid;
    gap: 14px;
}

.feature-list {
    grid-template-columns: repeat(3, 1fr);
}

.feature-list div,
.value-stack article,
.service-card,
.contact-panel,
.contact-form,
.metrics {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.feature-list div,
.value-stack article,
.service-card,
.contact-panel,
.contact-form {
    padding: 24px;
}

.feature-list span,
.service-card span {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 800;
}

.feature-list p,
.value-stack p,
.service-card p,
.split-panel p,
.contact-panel p {
    color: var(--muted);
}

.split-panel {
    align-items: stretch;
}

.text-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 760;
    text-decoration: none;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    overflow: hidden;
}

.metrics div {
    display: grid;
    gap: 8px;
    align-content: center;
    min-height: 190px;
    padding: 22px;
    border-left: 1px solid var(--line);
}

.metrics div:first-child {
    border-left: 0;
}

.metrics strong {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

.metrics span {
    color: var(--muted);
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.gallery-item {
    position: relative;
    min-height: 280px;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    transition: transform 180ms ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    transition: transform 420ms ease;
}

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

.gallery-item span {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-weight: 720;
    backdrop-filter: blur(14px);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 26px;
    background: rgba(0, 0, 0, 0.82);
    animation: fadeIn 180ms ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox figure {
    width: min(1080px, 100%);
    margin: 0;
}

.lightbox img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox figcaption {
    margin-top: 12px;
    color: #fff;
    font-weight: 720;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: #fff;
    color: #111;
    font-weight: 720;
}

.contact-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.contact-points span {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
    color: var(--muted);
    font-size: 0.92rem;
}

.contact-form label {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-weight: 720;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin: 0 0 18px;
    padding: 14px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 0;
    background: var(--panel-strong);
    color: var(--text);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.contact-form textarea {
    resize: vertical;
}

.form-status {
    min-height: 1.6em;
    margin: 14px 0 0;
    color: var(--muted);
}

.form-status.error {
    color: #d92d20;
}

.form-status.success {
    color: #12805c;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms ease, transform 620ms ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes cinematic {
    from {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.1) translate3d(-1.6%, 1.2%, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .site-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .intro-grid,
    .story-grid,
    .contact-layout,
    .split-panel {
        grid-template-columns: 1fr;
    }

    .feature-list,
    .service-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .site-header {
        width: calc(100% - 20px);
        margin-top: 10px;
    }

    .brand span:last-child {
        max-width: 126px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero {
        min-height: 92vh;
        margin-top: -118px;
        padding-top: 156px;
    }

    .hero-actions,
    .metrics,
    .feature-list,
    .service-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .metrics div {
        min-height: 124px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .metrics div:first-child {
        border-top: 0;
    }

    .section {
        padding: 58px 0;
    }

    .page-hero {
        padding-top: 62px;
    }
}
