/* =============================================
   Design Tokens
   ============================================= */
:root {
    --bg:      oklch(97% 0.008 240);
    --bg2:     oklch(93% 0.012 240);
    --navy:    oklch(18% 0.04  240);
    --navy2:   oklch(26% 0.05  240);
    --blue:    oklch(52% 0.16  32);
    --blue-lt: oklch(65% 0.18  32);
    --slate:   oklch(55% 0.04  240);
    --rule:    oklch(88% 0.012 240);
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--navy);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   Layout Utilities
   ============================================= */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 48px;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    display: block;
}

/* =============================================
   Nav
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: oklch(97% 0.008 240 / 92%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    width: 200px;
    height: 40px;
    filter: brightness(0);
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--navy);
}

.nav-cta {
    background: var(--navy);
    color: var(--bg) !important;
    padding: 8px 20px;
    border-radius: 2px;
    transition: background 0.2s !important;
}

.nav-cta:hover {
    background: var(--blue) !important;
    color: var(--bg) !important;
}

/* =============================================
   Hero — Minimal variant
   ============================================= */
.hero {
    min-height: 100vh;
    padding-top: 64px;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.hero-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 64px 48px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 80px;
    align-items: center;
}

.hero-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 24px;
    display: block;
}

.hero h1 {
    font-size: 56px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-body {
    font-size: 17px;
    color: var(--slate);
    line-height: 1.8;
    max-width: 520px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-primary {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--navy);
    color: var(--bg);
    padding: 14px 28px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--blue);
}

.btn-text {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate);
    text-decoration: none;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--navy);
}

/* Service index panel */
.service-index {
    border: 1px solid var(--rule);
}

.service-index-row {
    border-bottom: 1px solid var(--rule);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
    cursor: default;
}

.service-index-row--last {
    border-bottom: none;
}

.service-index-row:hover {
    background: oklch(95% 0.014 240);
}

.service-index-num {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--blue);
    min-width: 24px;
    flex-shrink: 0;
}

.service-index-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
}

.service-index-sub {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--slate);
    margin-top: 2px;
}

.service-index-arrow {
    color: var(--rule);
    margin-left: auto;
    flex-shrink: 0;
}

/* Metrics bar */
.metrics-bar {
    margin-top: 80px;
    display: grid;
    grid-template-columns: auto repeat(3, 1fr);
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}

.metric-cell {
    padding: 28px 32px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.metric-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-mark img {
    width: 40px;
    height: 40px;
    filter: brightness(0);
    opacity: 0.15;
}

.metric-value {
    font-family: 'DM Mono', monospace;
    font-size: 24px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 4px;
    white-space: nowrap;
}

.metric-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--slate);
    letter-spacing: 0.04em;
}

/* =============================================
   Services Section
   ============================================= */
.services {
    padding: 96px 0;
}

.section-header {
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.service-card {
    background: var(--bg);
    padding: 40px;
    transition: background 0.2s;
}

.service-card:hover {
    background: oklch(95% 0.014 240);
}

.service-card:hover .service-num {
    color: var(--blue);
}

.service-card:hover .service-tag {
    border-color: oklch(80% 0.06 240);
}

.service-num {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--slate);
    margin-bottom: 20px;
    transition: color 0.2s;
}

.service-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 12px;
}

.service-desc {
    font-size: 14px;
    color: var(--slate);
    line-height: 1.7;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
}

.service-tag {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border: 1px solid var(--rule);
    color: var(--slate);
    border-radius: 1px;
    transition: border-color 0.2s;
}

/* =============================================
   Tech Stack Section
   ============================================= */
.tech {
    padding: 96px 0;
    background: var(--navy);
}

.tech .section-label {
    color: var(--blue-lt);
}

.tech h2 {
    font-size: 36px;
    font-weight: 500;
    color: oklch(96% 0.008 240);
    margin-bottom: 48px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: oklch(30% 0.05 240);
    border: 1px solid oklch(30% 0.05 240);
    margin-bottom: 1px;
}

.tech-cell {
    background: var(--navy);
    padding: 28px 24px;
    transition: background 0.2s;
}

.tech-cell:hover {
    background: var(--navy2);
}

.tech-category {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blue-lt);
    margin-bottom: 14px;
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tech-item {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: oklch(80% 0.02 240);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-item::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue-lt);
    flex-shrink: 0;
}

.tech-comment {
    border: 1px solid oklch(30% 0.05 240);
    padding: 28px 32px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: oklch(55% 0.04 240);
    line-height: 1.8;
}

.comment-slash {
    color: var(--blue-lt);
}

/* =============================================
   Contact Section
   ============================================= */
.contact {
    padding: 96px 0;
    border-top: 1px solid var(--rule);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info h2 {
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 16px;
}

.contact-body {
    font-size: 15px;
    color: var(--slate);
    line-height: 1.8;
    margin-bottom: 32px;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-meta-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--blue);
    min-width: 70px;
    padding-top: 2px;
    flex-shrink: 0;
}

.contact-meta-value {
    font-size: 13px;
    color: var(--slate);
    line-height: 1.6;
}

/* Honeypot — off-screen, invisible to real users, irresistible to bots */
.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate);
}

.form-input,
.form-select,
.form-textarea {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    background: var(--bg);
    border: 1px solid var(--rule);
    padding: 12px 14px;
    border-radius: 2px;
    color: var(--navy);
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--slate);
    opacity: 0.6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--blue);
}

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

.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.btn-submit {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--navy);
    color: var(--bg);
    padding: 16px 32px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.btn-submit:hover {
    background: var(--blue);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Contact error state */
.contact-error {
    position: relative;
    padding: 16px 20px;
    border: 1px solid var(--blue);
    border-left-width: 3px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--slate);
}

/* Contact success state */
.contact-success {
    position: relative;
    padding: 40px;
    border: 1px solid var(--rule);
}

.contact-success .section-label {
    margin-bottom: 16px;
}

.contact-success-heading {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.contact-success-sub {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--slate);
}

/* =============================================
   Footer
   ============================================= */
.footer {
    border-top: 1px solid var(--rule);
    padding: 32px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-mark {
    width: 20px;
    height: 20px;
    filter: brightness(0);
    opacity: 0.5;
    display: block;
}

.footer-name {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--slate);
}

.footer-copy {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--slate);
}

.footer-right {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =============================================
   Responsive — ≤ 1024px
   ============================================= */
@media (max-width: 1024px) {
    .hero-inner {
        padding-left: 32px;
        padding-right: 32px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-grid > * {
        min-width: 0;
    }

    .metrics-bar {
        grid-template-columns: 1fr;
        border-right: 1px solid var(--rule);
        border-bottom: 1px solid var(--rule);
    }

    .metric-cell {
        grid-column: 1 / -1;
        border-right: none;
    }

    .metric-cell:last-child {
        border-bottom: none;
    }

    .metric-value {
        white-space: normal;
    }

    .metric-mark {
        display: none;
    }
}

/* =============================================
   Responsive — ≤ 768px
   ============================================= */
@media (max-width: 768px) {
    .nav-logo img {
        width: 168px;
        height: 34px;
    }

    .nav-links {
        gap: 0;
    }

    .nav-links li:not(:last-child) {
        display: none;
    }

    .nav-inner {
        padding: 0 24px;
    }

    .nav-cta {
        white-space: nowrap;
    }

    .hero-inner {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-grid > * {
        min-width: 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-cta {
        flex-wrap: wrap;
    }

    .metrics-bar {
        grid-template-columns: 1fr;
    }

    .metric-cell {
        grid-column: 1 / -1;
    }

    .metric-value {
        white-space: normal;
    }

    .metric-value--disciplines {
        font-size: 20px;
        white-space: nowrap;
    }

    .metric-mark {
        display: none;
    }

    .container {
        padding: 0 24px;
    }

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

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .metrics-bar {
        grid-template-columns: 1fr;
    }

    .metric-cell {
        border-right: none;
        border-bottom: 1px solid var(--rule);
    }

    .metric-cell:last-child {
        border-bottom: none;
    }
}

@media (max-width: 360px) {
    .metric-value--disciplines {
        white-space: normal;
    }
}
