:root {
    color-scheme: dark;
    --bg: #0a0c10;
    --bg-rgb: 10, 12, 16;
    --section-bg: #0d1118;
    --footer-bg: #080a0d;
    --panel: #111722;
    --panel-strong: #162131;
    --text: #f3f7fb;
    --muted: #a8b4c0;
    --soft: #7e8d9d;
    --line: rgba(128, 149, 168, 0.22);
    --accent: #1fb6ff;
    --accent-strong: #0095d8;
    --accent-alt: #36d399;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    --hero-gradient:
        linear-gradient(135deg, rgba(31, 182, 255, 0.16), transparent 34%),
        linear-gradient(225deg, rgba(54, 211, 153, 0.12), transparent 30%),
        linear-gradient(180deg, #0b1118 0%, #0a0c10 100%);
    --grid-line: rgba(255, 255, 255, 0.035);
    --grid-accent: rgba(31, 182, 255, 0.04);
    --input-bg: #0c121b;
    --button-text: #061018;
    --theme-duration: 0.7s;
    --theme-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --focus-ring: rgba(31, 182, 255, 0.42);
    --header-offset: 104px;
    --radius: 8px;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f8fb;
    --bg-rgb: 245, 248, 251;
    --section-bg: #eef4f8;
    --footer-bg: #e8eef4;
    --panel: #ffffff;
    --panel-strong: #f8fbfe;
    --text: #101824;
    --muted: #4d5f70;
    --soft: #5f7182;
    --line: rgba(49, 76, 102, 0.18);
    --accent: #0076b6;
    --accent-strong: #005d92;
    --accent-alt: #008f72;
    --shadow: 0 18px 45px rgba(35, 61, 84, 0.12);
    --hero-gradient:
        linear-gradient(135deg, rgba(0, 118, 182, 0.14), transparent 34%),
        linear-gradient(225deg, rgba(0, 143, 114, 0.11), transparent 30%),
        linear-gradient(180deg, #f7fbff 0%, #edf5fb 100%);
    --grid-line: rgba(10, 24, 38, 0.055);
    --grid-accent: rgba(0, 118, 182, 0.055);
    --input-bg: #f7fafc;
    --button-text: #ffffff;
    --focus-ring: rgba(0, 118, 182, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-offset);
}

body {
    min-width: 320px;
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    transition:
        background-color var(--theme-duration) var(--theme-ease),
        color var(--theme-duration) var(--theme-ease);
}

::selection {
    color: var(--button-text);
    background: var(--accent);
}

img,
svg {
    display: block;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

:where(a, button, input, textarea):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

main:focus {
    outline: none;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--button-text);
    background: var(--accent);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 10;
    background: rgba(var(--bg-rgb), 0.88);
    border-bottom: 1px solid transparent;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition:
        background-color var(--theme-duration) var(--theme-ease),
        border-color var(--theme-duration) var(--theme-ease),
        box-shadow var(--theme-duration) var(--theme-ease);
}

.site-header.is-scrolled {
    background: rgba(var(--bg-rgb), 0.96);
    border-color: var(--line);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    text-decoration: none;
    transition: color var(--theme-duration) var(--theme-ease);
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
}

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

.site-nav a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    transition:
        border-color var(--theme-duration) var(--theme-ease),
        background-color var(--theme-duration) var(--theme-ease),
        color var(--theme-duration) var(--theme-ease);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--accent);
}

.theme-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b1420, #24465e);
    transition: background var(--theme-duration) var(--theme-ease);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f3f7fb;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
    transition:
        transform var(--theme-duration) var(--theme-ease),
        background-color var(--theme-duration) var(--theme-ease),
        box-shadow var(--theme-duration) var(--theme-ease);
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.62);
}

[data-theme="light"] .theme-toggle-track {
    background: linear-gradient(135deg, #7dd3fc, #f8d66d);
}

[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(18px);
    background: #fff6b8;
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.45);
}

.hero {
    position: relative;
    min-height: 720px;
    display: grid;
    align-items: center;
    overflow: hidden;
    padding: 150px 0 92px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--hero-gradient);
    transition: background var(--theme-duration) var(--theme-ease);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(45deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(-45deg, var(--grid-accent) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 86%);
    mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.hero-content {
    max-width: 840px;
}

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

.hero h1,
.section-heading h2,
.about h2,
.contact h2 {
    margin: 0;
    color: var(--text);
    line-height: 1.08;
}

.hero h1 {
    max-width: 820px;
    font-size: clamp(2.7rem, 7vw, 5.4rem);
}

.hero-copy {
    max-width: 720px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 1.18rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition:
        transform 0.2s ease,
        background-color var(--theme-duration) var(--theme-ease),
        border-color var(--theme-duration) var(--theme-ease),
        color var(--theme-duration) var(--theme-ease);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--accent-strong);
}

.btn-secondary {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: var(--accent);
}

.section {
    padding: 104px 0;
    scroll-margin-top: var(--header-offset);
}

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

.section-heading {
    max-width: 720px;
    margin-bottom: 56px;
}

.section-heading h2,
.about h2,
.contact h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-heading p:last-child,
.contact-copy p,
.about-copy p {
    color: var(--muted);
    font-size: 1.05rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    min-height: 300px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background var(--theme-duration) var(--theme-ease);
}

.service-card:hover,
.service-card:focus-within {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 163, 255, 0.2);
    border-color: rgba(0, 163, 255, 0.3);
}

.service-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 26px;
    color: var(--accent);
}

.service-card h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 1.28rem;
}

.service-card p {
    margin: 0;
    color: var(--muted);
}

.about {
    border-block: 1px solid var(--line);
    background: var(--bg);
}

.about-layout,
.contact-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.about-copy p:first-child,
.contact-copy p:first-of-type {
    margin-top: 0;
}

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

.contact-email {
    margin-top: 28px;
    font-weight: 700;
}

.contact-email a,
.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.contact-email a:hover,
.site-footer a:hover {
    text-decoration: underline;
}

.contact-form {
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    transition:
        background-color var(--theme-duration) var(--theme-ease),
        border-color var(--theme-duration) var(--theme-ease),
        box-shadow var(--theme-duration) var(--theme-ease);
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--text);
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(128, 149, 168, 0.36);
    border-radius: var(--radius);
    padding: 13px 14px;
    color: var(--text);
    background: var(--input-bg);
    transition:
        background-color var(--theme-duration) var(--theme-ease),
        color var(--theme-duration) var(--theme-ease);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 3px solid rgba(31, 182, 255, 0.18);
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-status {
    min-height: 1.5em;
    margin: 0;
    color: var(--soft);
    font-size: 0.95rem;
}

.site-footer {
    padding: 34px 0;
    background: var(--footer-bg);
    transition: background-color var(--theme-duration) var(--theme-ease);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.footer-inner p {
    margin: 0;
}

.reveal-enabled [data-reveal] {
    opacity: 0;
    filter: blur(18px);
    transform: translateY(34px);
    transition:
        opacity 0.75s ease,
        filter 0.85s ease,
        transform 0.75s ease;
    will-change: opacity, filter, transform;
}

.reveal-enabled [data-reveal].is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    will-change: auto;
}

.service-grid .service-card.is-visible {
    transition:
        opacity 0.75s ease,
        filter 0.85s ease,
        transform 0.16s ease-out,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background var(--theme-duration) var(--theme-ease);
}

.service-grid .service-card.is-visible:hover,
.service-grid .service-card.is-visible:focus-within {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 163, 255, 0.2);
    border-color: rgba(0, 163, 255, 0.3);
}

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

    .about-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .about-layout,
    .contact-layout {
        gap: 34px;
    }
}

@media (max-width: 720px) {
    :root {
        --header-offset: 88px;
    }

    .container {
        width: min(100% - 28px, 1120px);
    }

    .header-inner {
        min-height: 72px;
        padding: 8px 0;
        gap: 12px;
    }

    .brand {
        flex: 0 0 auto;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .brand-name,
    .theme-toggle-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .header-actions {
        min-width: 0;
        flex: 1;
        gap: 10px;
    }

    .site-nav {
        min-width: 0;
        flex: 1;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav ul {
        width: max-content;
        gap: 18px;
    }

    .site-nav a {
        white-space: nowrap;
    }

    .theme-toggle {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 0 9px;
    }

    .hero {
        min-height: 620px;
        padding: 112px 0 72px;
    }

    .hero-copy {
        font-size: 1rem;
    }

    .section {
        padding: 76px 0;
    }

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

    .service-card,
    .contact-form {
        padding: 22px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 460px) {
    .hero-actions,
    .btn {
        width: 100%;
    }
}

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

    .reveal-enabled [data-reveal] {
        opacity: 1;
        filter: none;
        transform: none;
    }
}
