/* ==========================================================================
   v2v.tech - design tokens
   Theme: locked dark (infrastructure), cool slate-navy neutrals,
   single desaturated steel-blue accent.
   Radius system: 8px interactive (buttons, inputs), 14px containers.
   Z-scale: 100 header, 200 skip-link.
   ========================================================================== */

:root {
    --bg-0: #0b0f16;
    --bg-1: #10151f;
    --bg-2: #141b28;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.28);
    --text-1: #e8edf5;
    --text-2: #a7b4c6;
    --text-3: #8a95a6;
    --accent: #5b9bd9;
    --accent-strong: #79aee2;
    --accent-ink: #0a0e14;      /* text on accent surfaces */
    --success: #8bc9a0;
    --error: #e08a8a;
    --error-border: #c96a6a;
    --r-s: 8px;
    --r-m: 14px;
    --header-h: 68px;
    --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
}

/* Base ------------------------------------------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-0);
    color: var(--text-2);
    line-height: 1.65;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    color: var(--text-1);
    line-height: 1.2;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.3rem, 5.2vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 600;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    max-width: 65ch;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-strong);
}

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

::selection {
    background: rgba(91, 155, 217, 0.35);
    color: var(--text-1);
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 200;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 10px 16px;
    border-radius: var(--r-s);
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
    color: var(--accent-ink);
}

/* Buttons and links ------------------------------------------------------ */

.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    padding: 13px 26px;
    border: none;
    border-radius: var(--r-s);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: var(--accent-strong);
    color: var(--accent-ink);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(91, 155, 217, 0.18);
}

.btn:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.text-link {
    font-weight: 500;
    color: var(--text-1);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.text-link:hover {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
}

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

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(11, 15, 22, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--line);
}

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

.brand {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

.brand:hover {
    color: var(--text-1);
}

.brand-dim {
    color: var(--accent);
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-2);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--text-1);
}

.nav-menu a.active {
    color: var(--text-1);
    border-bottom-color: var(--accent);
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    cursor: pointer;
}

.burger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-1);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

.hero {
    position: relative;
    min-height: min(92dvh, 860px);
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 40px) 0 72px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(11, 15, 22, 0.96) 20%, rgba(11, 15, 22, 0.78) 55%, rgba(11, 15, 22, 0.62)),
        linear-gradient(to top, var(--bg-0) 0%, rgba(11, 15, 22, 0) 30%),
        url('v2vdc-hero.jpg');
    background-size: cover;
    background-position: center right;
}

.hero .container {
    position: relative;
    width: 100%;
}

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

.hero-content h1 {
    max-width: 22ch;
    margin-bottom: 1.25rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-2);
    max-width: 46ch;
    margin-bottom: 2.25rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* Sections (shared rhythm) ------------------------------------------------ */

section {
    padding: 96px 0 108px;
}

.section-head {
    max-width: 620px;
    margin-bottom: 56px;
}

.section-head p {
    margin-top: 1rem;
    font-size: 1.05rem;
}

.prose h2 {
    margin-bottom: 1.5rem;
}

.prose p + p {
    margin-top: 1.1rem;
}

/* Why / platforms --------------------------------------------------------- */

.why {
    border-top: 1px solid var(--line);
    background:
        radial-gradient(900px 420px at 85% 0%, rgba(91, 155, 217, 0.06), transparent 70%),
        var(--bg-0);
}

.grid-heading {
    margin-top: 64px;
    margin-bottom: 28px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-1);
}

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

.platform-tile {
    grid-column: span 2;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 26px 24px 28px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.platform-tile:nth-child(4),
.platform-tile:nth-child(5) {
    grid-column: span 3;
}

.platform-tile:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.platform-tile h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.platform-tile p {
    font-size: 0.95rem;
    color: var(--text-2);
}

.tile-featured {
    background: linear-gradient(160deg, rgba(91, 155, 217, 0.16), rgba(91, 155, 217, 0.04) 70%), var(--bg-1);
    border-color: rgba(91, 155, 217, 0.35);
}

.tile-tinted {
    background: linear-gradient(200deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.02) 60%), var(--bg-1);
}

/* Services ----------------------------------------------------------------- */

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

.service-lead {
    background: linear-gradient(150deg, rgba(91, 155, 217, 0.1), rgba(91, 155, 217, 0.02) 55%), var(--bg-1);
    border: 1px solid rgba(91, 155, 217, 0.3);
    border-radius: var(--r-m);
    padding: 40px 40px 44px;
    margin-bottom: 56px;
}

.service-lead h3 {
    font-size: 1.45rem;
    margin-bottom: 0.85rem;
}

.service-lead p {
    font-size: 1.05rem;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px 64px;
    padding: 0 8px;
}

.service-item h3 {
    margin-bottom: 0.6rem;
}

.service-item p {
    font-size: 0.98rem;
}

/* Approach ------------------------------------------------------------------ */

.approach {
    border-top: 1px solid var(--line);
    background:
        radial-gradient(800px 400px at 10% 100%, rgba(91, 155, 217, 0.05), transparent 70%),
        var(--bg-0);
}

.approach h2 {
    margin-bottom: 56px;
}

.steps {
    list-style: none;
    max-width: 760px;
}

.step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 20px;
    padding: 30px 0;
}

.step + .step {
    border-top: 1px solid var(--line);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--accent);
    line-height: 1.2;
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
}

.step h3 {
    margin-bottom: 0.45rem;
}

.step p {
    font-size: 0.98rem;
    max-width: 58ch;
}

/* About ---------------------------------------------------------------------- */

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

.about-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 72px;
    align-items: start;
}

.fact-panel {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 12px 32px;
}

.fact {
    padding: 26px 0;
}

.fact + .fact {
    border-top: 1px solid var(--line);
}

.fact-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
}

.fact-label {
    display: block;
    font-size: 0.92rem;
    color: var(--text-2);
}

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

.contact {
    border-top: 1px solid var(--line);
    background:
        radial-gradient(900px 500px at 90% 100%, rgba(91, 155, 217, 0.06), transparent 70%),
        var(--bg-0);
}

.contact-content {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 72px;
    align-items: start;
}

.form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-1);
}

.optional {
    color: var(--text-3);
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-s);
    padding: 12px 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 155, 217, 0.22);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error-border);
    box-shadow: 0 0 0 3px rgba(201, 106, 106, 0.18);
}

.form-response {
    margin-top: 18px;
    padding: 13px 16px;
    border-radius: var(--r-s);
    font-size: 0.95rem;
    border: 1px solid;
}

.form-response.success {
    color: var(--success);
    border-color: rgba(139, 201, 160, 0.4);
    background: rgba(139, 201, 160, 0.08);
}

.form-response.error {
    color: var(--error);
    border-color: rgba(224, 138, 138, 0.4);
    background: rgba(224, 138, 138, 0.08);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-3);
}

.info-item a,
.info-item p {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-1);
}

.info-item a:hover {
    color: var(--accent-strong);
}

.map-container {
    margin-top: 10px;
}

#contact-map {
    height: 260px;
    border-radius: var(--r-m);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--bg-1);
}

/* Dark treatment for OpenStreetMap tiles */
#contact-map .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.88) contrast(0.9) saturate(0.5);
}

#contact-map .leaflet-control-attribution {
    background: rgba(11, 15, 22, 0.8);
    color: var(--text-3);
}

#contact-map .leaflet-control-attribution a {
    color: var(--text-2);
}

#contact-map .leaflet-popup-content-wrapper,
#contact-map .leaflet-popup-tip {
    background: var(--bg-2);
    color: var(--text-1);
}

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

footer {
    border-top: 1px solid var(--line);
    padding: 48px 0 40px;
    background: var(--bg-1);
}

.footer-top {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.footer-tagline {
    color: var(--text-3);
    font-size: 0.95rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.footer-contact {
    color: var(--text-2);
    font-size: 0.95rem;
}

.footer-copy {
    color: var(--text-3);
    font-size: 0.88rem;
}

/* Reveal on scroll (JS adds .will-reveal only when motion is allowed) ------------ */

.will-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .will-reveal {
        opacity: 1;
        transform: none;
    }
}

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

@media (max-width: 960px) {
    .about-grid,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .platform-tile,
    .platform-tile:nth-child(4),
    .platform-tile:nth-child(5) {
        grid-column: span 1;
    }

    .platform-tile:nth-child(5) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    section {
        padding: 64px 0 72px;
    }

    .hero {
        min-height: min(88dvh, 760px);
        padding-bottom: 56px;
    }

    .burger-menu {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(11, 15, 22, 0.97);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 24px 20px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 13px 0;
        font-size: 1.05rem;
        border-bottom: none;
    }

    .nav-menu a.active {
        color: var(--accent);
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 0;
    }

    .service-lead {
        padding: 28px 24px 32px;
    }

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

    .platform-tile:nth-child(5) {
        grid-column: span 1;
    }

    .step {
        grid-template-columns: 44px 1fr;
        gap: 14px;
        padding: 24px 0;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/* Backups callout: side-border note, distinct from the featured service panel */
.service-note {
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--accent, #4d7cfe);
    background: rgba(255, 255, 255, 0.02);
}
.service-note h3 { margin-bottom: 0.4rem; }
.service-note p { margin: 0; }
.service-note a { text-decoration: underline; text-underline-offset: 3px; }
