:root {
    color-scheme: dark light;
    --bg: #070707;
    --surface: #101010;
    --surface-strong: #17120b;
    --text: #fff8df;
    --muted: #cabd97;
    --line: rgba(247, 200, 83, 0.22);
    --accent: #f7c853;
    --accent-2: #ffedaa;
    --accent-dark: #7e520b;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    --radius: 8px;
    --font-main: "Inter", Arial, sans-serif;
    --font-display: "Space Grotesk", "Inter", Arial, sans-serif;
}

[data-theme="light"] {
    --bg: #f7fbff;
    --surface: #ffffff;
    --surface-strong: #eef7ff;
    --text: #05172f;
    --muted: #42617f;
    --line: rgba(20, 121, 190, 0.2);
    --accent: #149de2;
    --accent-2: #275bd8;
    --accent-dark: #063d82;
    --shadow: 0 28px 80px rgba(16, 74, 126, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 28rem),
        linear-gradient(135deg, var(--bg), var(--surface-strong));
    color: var(--text);
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: 0;
    overflow-x: hidden;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.28;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

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

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

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: var(--bg);
    transform: translateY(-160%);
}

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

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

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 900;
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.logo-light,
[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 2vw, 1.6rem);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.nav-links a {
    transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent);
    transform: translateY(-2px);
}

.theme-toggle {
    width: 106px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--surface);
    color: var(--text);
    font: 900 0.76rem var(--font-main);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.toggle-track {
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 28%, var(--surface));
    padding: 3px;
}

.toggle-orb {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--accent);
    transition: transform 240ms ease;
}

[data-theme="light"] .toggle-orb {
    transform: translateX(14px);
}

.hero {
    position: relative;
    min-height: calc(100svh - 78px);
    display: grid;
    align-items: center;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 32%, color-mix(in srgb, var(--accent) 13%, transparent) 32% 33%, transparent 33%),
        radial-gradient(circle at 76% 36%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 22rem);
    animation: pulseField 5s ease-in-out infinite;
}

.scan-line {
    position: absolute;
    inset: auto 0 14%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scan 3.8s linear infinite;
}

.hero-inner,
.section,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-inner {
    position: relative;
    padding: 6rem 0 5rem;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: 0;
}

h1 {
    max-width: 980px;
    margin-bottom: 1.2rem;
    font-size: clamp(3.2rem, 8vw, 7.8rem);
    line-height: 0.89;
    text-transform: uppercase;
}

h2 {
    max-width: 820px;
    font-size: clamp(2rem, 4.4vw, 4.7rem);
    line-height: 0.98;
}

h3 {
    line-height: 1.05;
}

.hero-copy {
    max-width: 680px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.24rem);
    line-height: 1.65;
}

.hero-actions,
.signal-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.hero-actions {
    margin-top: 2rem;
}

.btn {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.25rem;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 25%, transparent);
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
}

.btn.secondary {
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    color: var(--text);
}

.signal-row {
    margin-top: 3rem;
}

.signal-row div {
    min-width: 155px;
    padding: 1rem;
    border-left: 3px solid var(--accent);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.signal-row strong,
.signal-row span {
    display: block;
}

.signal-row strong {
    font-size: 1.8rem;
    font-weight: 900;
}

.signal-row span {
    color: var(--muted);
    font-size: 0.86rem;
}

.section {
    padding: 6rem 0;
}

.band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    margin-bottom: 2.4rem;
}

.service-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.service-card,
.project-card,
.contact-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: var(--shadow);
}

.service-card {
    min-height: 260px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.service-card::after {
    content: "";
    width: 90px;
    height: 4px;
    background: var(--accent);
    animation: processor 2.8s ease-in-out infinite;
}

.card-index {
    color: var(--accent);
    font-weight: 900;
}

.service-card h3 {
    font-size: 1.42rem;
}

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

.project-card {
    min-height: 250px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    transition: transform 200ms ease, border-color 200ms ease;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.project-card p {
    margin-bottom: 0.8rem;
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.project-card h3 {
    margin-bottom: 0.8rem;
    font-size: clamp(1.7rem, 3vw, 3rem);
}

.project-card span,
.seo-copy p,
.contact-copy p {
    color: var(--muted);
    line-height: 1.7;
}

.project-card a {
    color: var(--accent);
    font-weight: 900;
}

.seo-panel,
.contact-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
}

.seo-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.seo-stack span {
    min-height: 74px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    color: var(--text);
    font-weight: 900;
    text-align: center;
}

.contact-form {
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}

.contact-links {
    margin-top: 1.4rem;
    display: grid;
    gap: 0.8rem;
}

.contact-links a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: color-mix(in srgb, var(--surface) 74%, transparent);
    color: var(--muted);
    transition: border-color 180ms ease, transform 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-links strong {
    color: var(--text);
    text-align: right;
}

label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 900;
}

.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.form-status {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.form-status.success {
    border-color: color-mix(in srgb, #13b981 60%, var(--line));
    color: #13b981;
}

.form-status.error {
    border-color: color-mix(in srgb, #ef4444 60%, var(--line));
    color: #ef4444;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.95rem 1rem;
    background: var(--bg);
    color: var(--text);
    font: 700 1rem var(--font-main);
}

textarea {
    resize: vertical;
}

.admin-body {
    min-height: 100svh;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 1.2rem 0 4rem;
}

.admin-head {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-card,
.admin-panel {
    margin-top: 4rem;
}

.admin-card {
    width: min(560px, 100%);
}

.admin-card h1,
.admin-panel h1 {
    max-width: 900px;
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
}

.admin-note {
    color: var(--muted);
    line-height: 1.65;
}

.message-list {
    display: grid;
    gap: 1rem;
}

.message-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: var(--shadow);
}

.message-top,
.message-meta,
.status-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.message-top {
    margin-bottom: 1rem;
}

.message-top h2 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.message-top p,
.message-meta,
.message-text {
    color: var(--muted);
}

.status-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.message-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.message-meta a {
    color: var(--accent);
}

.message-text {
    line-height: 1.7;
}

.status-form {
    align-items: end;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.status-form label {
    width: min(260px, 100%);
}

.site-footer {
    min-height: 96px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
}

.site-footer a {
    color: var(--accent);
    font-weight: 900;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease var(--delay, 0ms), transform 700ms ease var(--delay, 0ms);
}

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

@keyframes pulseField {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translate3d(1.4rem, -0.8rem, 0) scale(1.03);
        opacity: 1;
    }
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    20%, 80% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes processor {
    0%, 100% {
        transform: translateX(-35%);
    }
    50% {
        transform: translateX(55%);
    }
}

@media (max-width: 900px) {
    .nav-wrap {
        min-height: auto;
        padding: 0.9rem 0;
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }

    .service-grid,
    .project-grid,
    .seo-panel,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4.5rem 0;
    }
}

@media (max-width: 560px) {
    .brand span {
        display: none;
    }

    .nav-links {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.2rem;
    }

    h1 {
        font-size: clamp(2.65rem, 16vw, 4.2rem);
    }

    .hero-inner {
        padding-top: 4.5rem;
    }

    .service-card,
    .project-card {
        min-height: 220px;
    }

    .seo-stack {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 1.4rem 0;
        flex-direction: column;
        align-items: flex-start;
    }
}

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