/* ──────────────────────────────────────────────────────
   WebFlavors — Brutalist B&W
   See DESIGN.md for the source-of-truth tokens & rules.
   ────────────────────────────────────────────────────── */

/* ── Tokens ───────────────────────────────────────────── */
:root {
    --bg: #FFFFFF;
    --surface: #FAFAFA;
    --ink: #000000;
    --text: #0A0A0A;
    --muted: #71717A;
    --rule: #E4E4E7;
    --rule-strong: #A1A1AA;
    --accent: #00FF87;
    --accent-text: #000000;

    --font-display: 'Geist', sans-serif;
    --font-body: 'Geist', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, monospace;

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    --container: 1280px;
}

[data-theme="dark"] {
    --bg: #0A0A0A;
    --surface: #141414;
    --ink: #FFFFFF;
    --text: #F5F5F5;
    --muted: #A1A1AA;
    --rule: #27272A;
    --rule-strong: #52525B;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

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

/* ── Layout ───────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
    border-bottom: 1px solid var(--rule);
}

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

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.01em;
    color: var(--ink);
    flex-shrink: 0;
}

.brand-lg { font-size: 16px; }

.brand-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 999px;
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 28px;
    list-style: none;
    flex: 1;
    justify-content: center;
}
.nav a {
    font-size: 13px;
    color: var(--muted);
    transition: color 0.15s;
}
.nav a:hover { color: var(--ink); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    border: 1px solid var(--rule);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    border-radius: 0;
    transition: border-color 0.15s;
}
.theme-toggle:hover { border-color: var(--ink); }

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    padding: 0;
}
.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--ink);
}

@media (max-width: 720px) {
    .nav { display: none; }
    .nav.open {
        display: flex;
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        background: var(--bg);
        border-bottom: 1px solid var(--rule);
        padding: 16px 24px 24px;
        gap: 16px;
        align-items: flex-start;
    }
    .nav.open a { font-size: 16px; color: var(--ink); }
    .mobile-menu-btn { display: flex; }
    .topbar-right .btn { display: none; }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    border-radius: 0;
    transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.btn:hover {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}
.btn:disabled { opacity: 0.4; cursor: default; }

.btn-ghost {
    background: transparent;
    color: var(--ink);
}
.btn-ghost:hover {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

/* ── Eyebrow ─────────────────────────────────────────── */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 24px;
}
.eyebrow::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 1px;
    background: var(--rule-strong);
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
    padding: 128px 0 96px;
    border-bottom: 1px solid var(--rule);
}

.hero-display {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(48px, 12vw, 144px);
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: var(--ink);
    margin-bottom: 32px;
}
.hero-display em {
    font-style: normal;
    color: var(--muted);
}

.hero-sub {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.55;
    margin-bottom: 40px;
}

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

.hero-meta {
    margin-top: 96px;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 720px) {
    .hero { padding: 64px 0 48px; }
    .hero-meta { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
}

.hero-meta-item .meta-label,
.meta-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 6px;
}
.hero-meta-item .meta-value,
.meta-value {
    font-size: 14px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 999px;
    display: inline-block;
}

/* ── Trusted band ───────────────────────────────────── */
.trusted-band {
    border-bottom: 1px solid var(--rule);
}
.trusted {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 32px 0;
    flex-wrap: wrap;
}
.trusted-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.trusted-logos {
    display: flex;
    gap: 48px;
    align-items: center;
    flex-wrap: wrap;
}
.trusted-logo-link {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
    opacity: 0.65;
}
.trusted-logo-link:hover { opacity: 1; }
.trusted-logo {
    height: 32px;
    width: auto;
    /* Logos are SVG with negative variants; tint them via filter for dark mode */
    filter: brightness(0);
}
[data-theme="dark"] .trusted-logo {
    filter: brightness(0) invert(1);
}

/* ── Section header ─────────────────────────────────── */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--ink);
    max-width: 720px;
}
.section-head-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.15s;
}
.section-head-link:hover { color: var(--ink); }

.section-sub {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.55;
    max-width: 640px;
    margin-top: 16px;
}

/* ── Testimonial / pull quote ───────────────────────── */
.testimonial-section { padding: 96px 0; }
.pull-quote {
    border-left: 3px solid var(--accent);
    padding: 8px 0 8px 28px;
    max-width: 880px;
    font-family: var(--font-display);
}
.pull-quote p {
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.35;
    color: var(--ink);
}
.pull-quote-attr {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: 20px;
}
@media (max-width: 720px) {
    .testimonial-section { padding: 56px 0; }
    .pull-quote { padding-left: 20px; }
}

/* ── Services table ─────────────────────────────────── */
.services-table {
    border-top: 1px solid var(--rule);
}

.service-row {
    display: grid;
    grid-template-columns: 110px 1fr 1.4fr auto;
    gap: 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
    align-items: baseline;
    position: relative;
    transition: background 0.15s var(--ease);
}
.service-row::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 999px;
    opacity: 0;
    transform: translateY(-50%) translateX(-8px);
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.service-row:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }

.service-num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}
.service-name {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.service-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.55;
}
.service-arrow {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink);
    transition: transform 0.15s var(--ease);
}
.service-row:hover .service-arrow { transform: translateX(4px); }

@media (max-width: 720px) {
    .service-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .service-num { grid-column: 1 / -1; font-size: 11px; }
    .service-desc { grid-column: 1 / -1; }
}

/* ── Stats ──────────────────────────────────────────── */
.stats-section { padding: 0; border-bottom: 1px solid var(--rule); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.stat-cell {
    padding: 64px 32px;
    border-right: 1px solid var(--rule);
}
.stat-cell:last-child { border-right: none; }

.stat-num {
    font-family: var(--font-mono);
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 16px;
}
.stat-num .unit {
    color: var(--muted);
    font-size: 0.5em;
    margin-left: 4px;
}
.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

@media (max-width: 720px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-cell {
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding: 40px 24px;
    }
    .stat-cell:last-child { border-bottom: none; }
}

/* ── Competences ────────────────────────────────────── */
.competences-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.competence-item {
    background: var(--bg);
    padding: 32px;
}

.competence-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    gap: 16px;
}
.competence-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.competence-number {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
    padding: 5px 10px;
    border: 1px solid var(--ink);
    background: transparent;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
}
.tag:hover { background: var(--ink); color: var(--bg); }

@media (max-width: 720px) {
    .competences-grid { grid-template-columns: 1fr; }
    .competence-item { padding: 24px; }
}

/* ── Contact / form ─────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field.full { grid-column: 1 / -1; }
.field-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.field-optional {
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.7;
}
.field-input,
.field-select,
.field-textarea {
    border: 1px solid var(--rule);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 12px 14px;
    outline: none;
    border-radius: 4px;
    transition: border-color 0.15s;
    width: 100%;
}
.field-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus { border-color: var(--ink); }
.field-input.error,
.field-select.error,
.field-textarea.error { border-color: #ef4444; }

.form-actions { justify-content: flex-end; align-items: flex-end; }
.form-actions .btn { width: auto; }

/* Honeypot — off-screen, never display:none (some bots skip those) */
.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    visibility: visible;
}

.submit-btn .btn-loader { display: none; }
.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-loader { display: inline; }

.form-message {
    margin-top: 24px;
    padding: 14px 18px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    max-width: 800px;
    white-space: pre-line; /* render \n line-breaks from JS */
}
.form-message.success {
    border-color: var(--accent);
    border-left-width: 3px;
}
.form-message.error {
    border-color: #ef4444;
    border-left-width: 3px;
}

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
    max-width: 800px;
}
.info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-link {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-top: 4px;
    transition: color 0.15s;
}
.info-link:hover { color: var(--accent); }
.info-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-top: 4px;
}

@media (max-width: 720px) {
    .contact-info { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
    background: var(--surface);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--rule);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-tag {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 320px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 8px;
}
.footer-col a {
    font-size: 13px;
    color: var(--text);
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-meta {
    font-size: 13px;
    color: var(--muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
}

/* ── Motion ─────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeUp 0.4s var(--ease) backwards;
}

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

/* ── Focus ──────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
