/* ============================================
   INVENTIC — V5 Dual-Mode (Corporate ↔ Dark Futurist)
   Base: V4 corporate. Toggle: html.mode-dark
   ============================================ */

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

:root {
    --white: #ffffff;
    --off-white: #fafafa;
    --gray-50: #f5f5f5;
    --gray-100: #ebebeb;
    --gray-150: #dedede;
    --gray-200: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-700: #404040;
    --gray-900: #171717;
    --black: #000000;
    --accent: #000000;
    --accent-hover: #1f1f1f;
    --blue: #1d4ed8;
    --blue-hover: #1e40af;
    --blue-subtle: rgba(29, 78, 216, 0.06);
    --blue-soft: rgba(29, 78, 216, 0.12);
    --amber: #b45309;
    --amber-soft: rgba(180, 83, 9, 0.08);

    /* Dark-mode-only accents — V1 palette (indigo + cyan + violet, gold for philosophy) */
    --neon-indigo: #6366f1;
    --neon-indigo-light: #818cf8;
    --neon-cyan: #06b6d4;
    --neon-violet: #8b5cf6;
    --neon-gold: #d4a838;
    --neon-gold-soft: #f0c855;
    --neon-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #8b5cf6 100%);
    --neon-gold-gradient: linear-gradient(135deg, #d4a838 0%, #f0c855 100%);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'Geist Mono', 'SF Mono', 'Consolas', monospace;
    --max: 1240px;
    --nav-h: 72px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.55;
    overflow-x: hidden;
    font-weight: 400;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
strong { font-weight: 800; color: var(--black); }

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 36px;
}

h1 em, h2 em, .sect-title em, h3 em {
    font-style: normal;
    color: var(--blue);
}

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0);
    transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--gray-100);
}

.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 36px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo-img {
    height: 32px;
    width: auto;
    filter: brightness(0);
    transition: filter 0.5s ease;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    margin-left: auto;
    margin-right: 18px;
}

.nav-links a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: -0.005em;
    transition: color 0.25s var(--ease);
}

.nav-links a:hover, .nav-links a.active { color: var(--black); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-lang { display: flex; gap: 0; }

.lang-btn {
    background: transparent;
    border: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    letter-spacing: 0.06em;
}

.lang-btn:first-child { border-radius: 4px 0 0 4px; }
.lang-btn:last-child { border-radius: 0 4px 4px 0; }
.lang-btn:not(:first-child) { border-left: none; }

.lang-btn:hover { color: var(--black); }
.lang-btn.active {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}

.nav-contact-btn {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--white);
    background: var(--black);
    padding: 10px 22px;
    border-radius: 6px;
    transition: background 0.25s var(--ease);
    white-space: nowrap;
    letter-spacing: -0.005em;
}

.nav-contact-btn:hover { background: var(--accent-hover); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--black);
    border-radius: 1px;
    transition: all 0.3s var(--ease);
}

.nav-toggle.active span:first-child { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:last-child { transform: rotate(-45deg) translate(4px, -4px); }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--white);
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--gray-100) 1px, transparent 1px),
        linear-gradient(90deg, var(--gray-100) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.6;
    mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5) 28%, rgba(0,0,0,0.5) 72%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5) 28%, rgba(0,0,0,0.5) 72%, transparent);
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + 90px) 36px 90px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 90px;
    align-items: end;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 32px;
    animation: enter 0.6s var(--ease) both;
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 2px;
    background: var(--blue);
}

.hero-content h1 {
    font-size: clamp(3rem, 7.8vw, 6.5rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.05em;
    color: var(--black);
    margin-bottom: 36px;
    animation: enter 0.6s var(--ease) 0.08s both;
}

.hero-sub {
    font-size: clamp(1.1rem, 1.4vw, 1.25rem);
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.55;
    max-width: 660px;
    margin-bottom: 44px;
    animation: enter 0.6s var(--ease) 0.16s both;
}

.hero-sub strong { font-weight: 800; color: var(--black); }

.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: enter 0.6s var(--ease) 0.24s both;
}

.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: var(--black);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    letter-spacing: -0.005em;
}

.btn-dark:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: transparent;
    color: var(--black);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    letter-spacing: -0.005em;
}

.btn-line:hover {
    border-color: var(--black);
    color: var(--black);
}

.hero-metrics {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--gray-100);
    animation: enter 0.6s var(--ease) 0.3s both;
}

.metric {
    padding: 26px 0 26px 32px;
    border-bottom: 1px solid var(--gray-100);
}

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

.metric-val {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.045em;
    color: var(--black);
    line-height: 0.95;
    margin-bottom: 6px;
}

.metric-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: -0.005em;
    line-height: 1.4;
}

.hero-line { height: 1px; background: var(--gray-100); }

/* ── Tech bar ── */
.tech-bar {
    padding: 22px 0;
    border-bottom: 1px solid var(--gray-100);
    overflow: hidden;
    background: var(--off-white);
}

.tech-inner {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 36px;
}

.tech-inner span {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ── Sections ── */
.sect { padding: 130px 0; }

.sect-alt { background: var(--off-white); }

.sect-dark {
    background: var(--black);
    color: var(--white);
}

.sect-top { margin-bottom: 18px; }

.sect-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
}

.sect-tag::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 2px;
    background: var(--blue);
}

.sect-dark .sect-tag { color: var(--amber); }
.sect-dark .sect-tag::before { background: var(--amber); }

.sect-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    color: var(--black);
    margin-bottom: 20px;
    max-width: 780px;
}

.sect-dark .sect-title { color: var(--white); }
.sect-dark .sect-title em { color: var(--amber); }

.sect-desc {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.6;
    max-width: 680px;
    margin-bottom: 64px;
}

.sect-dark .sect-desc { color: rgba(255,255,255,0.78); }

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
    margin-bottom: 64px;
}

.about-grid h2 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    color: var(--black);
}

.about-text .text-lead {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.65;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 18px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 2px solid var(--black);
    border-radius: 8px;
    overflow: hidden;
}

.about-card {
    padding: 28px 30px;
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.3s var(--ease);
}

.about-card:hover { background: var(--off-white); }
.about-card:nth-child(3n) { border-right: none; }
.about-card:last-child { border-right: none; }
.about-card:nth-last-child(-n+3) { border-bottom: none; }

.about-card-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.55;
    font-weight: 500;
}

/* ── Philosophy (dark in both modes; differs subtly in dark mode) ── */
.philo-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    margin-top: 12px;
    align-items: start;
}

.philo-main p {
    font-size: 1.06rem;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    line-height: 1.75;
    margin-bottom: 22px;
}

.philo-main strong { color: var(--white); font-weight: 800; }

.vibe-warn {
    margin-top: 32px;
    padding: 24px 28px;
    background: rgba(180, 83, 9, 0.10);
    border: 1px solid rgba(180, 83, 9, 0.28);
    border-left: 4px solid var(--amber);
    border-radius: 4px;
}

.vibe-warn p {
    font-size: 0.96rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin: 0;
}

.vibe-warn strong { color: #fbbf24; font-weight: 800; }

.pillars-grid { display: flex; flex-direction: column; gap: 14px; }

.pillar-box {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 24px 26px;
    background: rgba(255,255,255,0.03);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.pillar-box:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(180, 83, 9, 0.4);
}

.pillar-tag {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--amber);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.pillar-box h4 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.pillar-box p {
    font-size: 0.92rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
}

/* ── Services ── */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.svc-grid-3 { grid-template-columns: repeat(3, 1fr); }

.svc-card {
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 32px 30px;
    background: var(--white);
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}

.svc-card:hover {
    border-color: var(--black);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.svc-featured {
    border-color: var(--blue);
    background: var(--blue-subtle);
    border-width: 2px;
}

.svc-featured:hover { border-color: var(--blue); }

.svc-num {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 22px;
    letter-spacing: 0.06em;
}

.svc-featured .svc-num { color: var(--blue); }

.svc-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.svc-card p {
    font-size: 0.94rem;
    font-weight: 400;
    color: var(--gray-700);
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.svc-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.svc-pills span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    padding: 5px 11px;
    border-radius: 4px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.svc-featured .svc-pills span {
    background: var(--blue-soft);
    border-color: rgba(29, 78, 216, 0.18);
    color: var(--blue);
}

/* ── Cases / Work ── */
.cases-stack { display: flex; flex-direction: column; gap: 20px; }

.case-block {
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    background: var(--white);
    overflow: hidden;
    transition: all 0.3s var(--ease);
}

.case-block:hover {
    border-color: var(--black);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
}

.case-block-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    padding: 32px 36px 26px;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.case-block-meta {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
}

.case-block-head h3 {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--black);
    letter-spacing: -0.025em;
    max-width: 640px;
}

.case-block-tenure {
    font-family: var(--font);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.005em;
}

/* Right-side aside in case header: flag pill + tenure stacked */
.case-block-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.case-block-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.case-block-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0; }

.case-block-text {
    padding: 32px 36px;
    border-right: 1px solid var(--gray-100);
}

.case-block-text p {
    font-size: 0.96rem;
    font-weight: 400;
    color: var(--gray-700);
    line-height: 1.75;
    margin-bottom: 16px;
}

.case-block-text p:last-child { margin-bottom: 0; }

.case-block-metrics {
    padding: 32px 36px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-content: start;
    background: var(--off-white);
}

.cm-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--black);
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 6px;
}

.cm-lbl {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    line-height: 1.45;
    letter-spacing: -0.005em;
}

/* ── Verticals ── */
.vert-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.vert-pills { display: flex; flex-wrap: wrap; gap: 10px; }

.v-pill {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--black);
    background: var(--white);
    border: 2px solid var(--gray-150);
    padding: 9px 20px;
    border-radius: 100px;
    transition: all 0.25s var(--ease);
    cursor: default;
    letter-spacing: -0.005em;
}

.v-pill:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    transform: translateY(-2px);
}

/* ── Contact ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: start;
}

.c-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--off-white);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 36px;
}

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

.c-field label {
    display: block;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.c-field input,
.c-field select,
.c-field textarea {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    padding: 13px 16px;
    font-family: var(--font);
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--black);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.c-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.c-field input:focus,
.c-field select:focus,
.c-field textarea:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.c-field textarea { resize: vertical; min-height: 130px; font-family: var(--font); }

.c-form .btn-dark { align-self: flex-start; margin-top: 8px; }

.c-info { display: flex; flex-direction: column; gap: 24px; }

.c-info-label {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 6px;
}

.c-info-item p {
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--black);
    line-height: 1.6;
}

.c-info-item a {
    color: var(--blue);
    font-weight: 600;
    transition: color 0.2s var(--ease);
}

.c-info-item a:hover { color: var(--black); }

.c-info-note { font-size: 0.82rem; color: var(--gray-500); font-weight: 500; }

.c-langs {
    padding: 16px 20px;
    background: var(--blue-subtle);
    border: 1px solid rgba(29, 78, 216, 0.18);
    border-radius: 6px;
}

.c-langs p { font-size: 0.9rem; color: var(--gray-700); margin: 0; font-weight: 500; }
.c-langs strong { color: var(--black); font-weight: 800; }

.c-social { padding-top: 6px; }

.c-social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    color: var(--gray-700);
    transition: all 0.25s var(--ease);
}

.c-social a:hover {
    color: var(--white);
    background: var(--black);
    border-color: var(--black);
}

.c-social svg { width: 16px; height: 16px; }

/* ── Footer ── */
.foot { border-top: 1px solid var(--gray-100); padding: 36px 0; }

.foot-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.foot-logo {
    height: 24px;
    width: auto;
    filter: brightness(0);
    margin-bottom: 6px;
    opacity: 0.55;
    transition: filter 0.5s ease;
}

.foot-left p { font-size: 0.84rem; color: var(--gray-500); font-weight: 500; }
.foot-copy { font-size: 0.78rem; color: var(--gray-500); font-weight: 500; }

/* ── Animations ── */
@keyframes enter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.anim {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.anim.vis { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════
   ── THEME SWITCH (floating pill, bottom-right) ──
   ════════════════════════════════════════════════════ */
.theme-switch {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.10);
    transition: all 0.3s var(--ease);
    user-select: none;
}

.theme-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.30), 0 2px 10px rgba(0, 0, 0, 0.12);
}

.theme-switch:active { transform: translateY(0); }

.theme-switch .ts-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.theme-switch .ts-icon svg { width: 100%; height: 100%; }

/* Show appropriate label/icon per mode */
.ts-icon-dark, .ts-label-dark { display: none; }
html.mode-dark .ts-icon-light, html.mode-dark .ts-label-light { display: none; }
html.mode-dark .ts-icon-dark, html.mode-dark .ts-label-dark { display: inline-flex; }
html.mode-dark .ts-label-dark { display: inline; }

/* ════════════════════════════════════════════════════
   ── MODE SWITCH SWEEP OVERLAY ──
   ════════════════════════════════════════════════════ */
.mode-sweep {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
    opacity: 0;
}

.mode-sweep.sweep-active { opacity: 1; }

.mode-sweep::before,
.mode-sweep::after {
    content: '';
    position: absolute;
    top: -10vh;
    bottom: -10vh;
    width: 30vw;
    pointer-events: none;
    transform: translateX(-30vw);
}

.mode-sweep::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.0) 20%,
        rgba(99, 102, 241, 0.55) 45%,
        rgba(6, 182, 212, 0.65) 50%,
        rgba(139, 92, 246, 0.55) 55%,
        rgba(99, 102, 241, 0.0) 80%,
        transparent 100%);
    filter: blur(40px);
    will-change: transform, opacity;
}

.mode-sweep::after {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%);
    filter: blur(2px);
    width: 6vw;
    will-change: transform, opacity;
}

.mode-sweep.sweep-active::before {
    animation: sweep-glow 0.85s cubic-bezier(0.65, 0, 0.35, 1);
}
.mode-sweep.sweep-active::after {
    animation: sweep-line 0.85s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes sweep-glow {
    0%   { transform: translateX(-35vw); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateX(105vw); opacity: 0; }
}

@keyframes sweep-line {
    0%   { transform: translateX(-10vw); opacity: 0; }
    25%  { opacity: 0.95; }
    75%  { opacity: 0.95; }
    100% { transform: translateX(105vw); opacity: 0; }
}

/* While theme is mid-switch, briefly enable global color transitions everywhere */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: background-color 0.7s ease,
                background 0.7s ease,
                color 0.7s ease,
                border-color 0.7s ease,
                box-shadow 0.7s ease,
                fill 0.7s ease,
                stroke 0.7s ease,
                filter 0.7s ease,
                opacity 0.7s ease !important;
}

/* ════════════════════════════════════════════════════
   ── DARK PARTICLES (visible only in dark mode) ──
   ════════════════════════════════════════════════════ */
.dark-particles {
    position: absolute;          /* scoped to .hero (relative + overflow:hidden) */
    inset: 0;
    pointer-events: none;
    z-index: 0;                  /* below .hero-inner content */
    opacity: 0;
    transition: opacity 0.9s ease;
    /* Soft fade-out at the bottom so particles don't hard-cut at the section edge */
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
            mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

html.mode-dark .dark-particles { opacity: 1; }

.dp-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: dp-float 5s ease-in-out infinite;
    will-change: transform, opacity;
}

.dp-particle.dp-cyan {
    background: rgba(6, 182, 212, 0.85);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.7);
}

.dp-particle.dp-violet {
    background: rgba(139, 92, 246, 0.85);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
}

.dp-particle.dp-indigo {
    background: rgba(129, 140, 248, 0.85);
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.7);
}

@keyframes dp-float {
    0%, 100% { opacity: 0.15; transform: translateY(0) scale(0.85); }
    50%      { opacity: 0.95; transform: translateY(-22px) scale(1); }
}

/* ════════════════════════════════════════════════════
   ── DARK / FUTURIST MODE ──
   Override the whole color palette via variables,
   plus targeted overrides for elements where the
   semantic mismatch matters.
   ════════════════════════════════════════════════════ */
html.mode-dark {
    /* V1 palette — match index.html exactly */
    --white: #0a0a0f;          /* V1 bg */
    --off-white: #0f0f17;      /* V1 bg-alt */
    --gray-50: #16161f;         /* V1 surface */
    --gray-100: rgba(255, 255, 255, 0.06);   /* V1 border */
    --gray-150: rgba(255, 255, 255, 0.10);
    --gray-200: rgba(255, 255, 255, 0.12);   /* V1 border-light */
    --gray-400: #6b6b80;        /* V1 text-dim */
    --gray-500: #a0a0b0;        /* V1 text-muted */
    --gray-700: #c5c5dd;
    --gray-900: #e8e8f0;        /* V1 text */
    --black: #ffffff;
    --accent: #ffffff;
    --accent-hover: #d6d6e8;
    --blue: var(--neon-indigo-light);
    --blue-hover: var(--neon-indigo);
    --blue-subtle: rgba(99, 102, 241, 0.08);
    --blue-soft: rgba(99, 102, 241, 0.16);
}

/* Body */
html.mode-dark body { background: var(--white); color: var(--gray-900); }

/* Logo: invert so the dark mark shows on dark bg */
html.mode-dark .nav-logo-img,
html.mode-dark .foot-logo {
    filter: brightness(0) invert(1);
}

/* Nav — solid dark when scrolled (no glass blur, full opacity) */
html.mode-dark .nav.scrolled {
    background: var(--white);                /* solid #0a0a0f */
    border-bottom: 1px solid var(--gray-100);
}

/* Nav links + active state */
html.mode-dark .nav-links a { color: var(--gray-500); }
html.mode-dark .nav-links a:hover, html.mode-dark .nav-links a.active { color: var(--gray-900); }
html.mode-dark .nav-toggle span { background: var(--gray-900); }

/* Lang button (V1 style: surface bg with primary active) */
html.mode-dark .lang-btn {
    background: var(--gray-50);
    border-color: var(--gray-100);
    color: var(--gray-500);
}
html.mode-dark .lang-btn:hover { color: var(--gray-900); }
html.mode-dark .lang-btn.active {
    background: var(--neon-indigo);
    border-color: var(--neon-indigo);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

/* Nav contact button → V1 gradient */
html.mode-dark .nav-contact-btn {
    background: var(--neon-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
html.mode-dark .nav-contact-btn:hover { box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45); }

/* Hero — V1's exact 3 radial gradients */
html.mode-dark .hero {
    background:
        radial-gradient(ellipse 70% 50% at 75% 35%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 20% 70%, rgba(6, 182, 212, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 60% 60% at 90% 90%, rgba(139, 92, 246, 0.08) 0%, transparent 55%),
        var(--white);
}

html.mode-dark .hero-grid-bg {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    opacity: 1;
}

/* Hero h1 em + section title em → V1 gradient text */
html.mode-dark .hero-content h1 em,
html.mode-dark .sect-title em,
html.mode-dark .about-grid h2 em {
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 28px rgba(99, 102, 241, 0.35));
}

/* Hero metrics + case metrics — V1 gradient numbers */
html.mode-dark .metric-val,
html.mode-dark .cm-num {
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

html.mode-dark .hero-metrics { border-left-color: var(--gray-100); }
html.mode-dark .metric { border-bottom-color: var(--gray-100); }
html.mode-dark .hero-line { background: var(--gray-100); }

/* Tag pills, eyebrows — V1 cyan accent */
html.mode-dark .hero-tag,
html.mode-dark .sect-tag { color: var(--neon-cyan); }
html.mode-dark .hero-tag::before,
html.mode-dark .sect-tag::before { background: var(--neon-cyan); }

/* Buttons — V1's exact gradient + shadow */
html.mode-dark .btn-dark {
    background: var(--neon-gradient);
    color: #fff;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}
html.mode-dark .btn-dark:hover {
    background: var(--neon-gradient);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

html.mode-dark .btn-line {
    background: var(--gray-50);              /* solid #16161f */
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
}
html.mode-dark .btn-line:hover {
    border-color: var(--neon-indigo);
    color: var(--gray-900);
    background: #1c1c2a;                     /* solid surface-2 (V1's --color-surface-2) */
}

/* Tech bar — V1 surface */
html.mode-dark .tech-bar {
    background: var(--white);
    border-bottom-color: var(--gray-100);
}

html.mode-dark .tech-inner span { color: var(--gray-500); }

/* Sections (sect-alt = V1 bg-alt) */
html.mode-dark .sect-alt {
    background: var(--off-white);
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

/* Philosophy — V1's section-philosophy with GOLD accent */
html.mode-dark .sect-dark {
    background:
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(212, 168, 56, 0.08) 0%, transparent 60%),
        #060609;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}
html.mode-dark .sect-dark .sect-tag,
html.mode-dark .sect-dark .pillar-tag {
    color: var(--neon-gold);
}
html.mode-dark .sect-dark .sect-tag::before { background: var(--neon-gold); }
html.mode-dark .sect-dark .sect-title em {
    background: var(--neon-gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: none;
}
html.mode-dark .vibe-warn {
    background: #16140a;                     /* solid warm dark — equivalent to gold tint over deep bg */
    border-color: rgba(212, 168, 56, 0.30);
    border-left-color: var(--neon-gold);
}
html.mode-dark .vibe-warn p { color: rgba(255, 255, 255, 0.7); }
html.mode-dark .vibe-warn strong { color: var(--neon-gold-soft); }

html.mode-dark .pillar-box {
    background: var(--off-white);            /* solid #0f0f17 — clear contrast on philosophy section #060609 */
    border-color: rgba(255, 255, 255, 0.10);
}
html.mode-dark .pillar-box:hover {
    background: var(--gray-50);              /* solid #16161f on hover */
    border-color: rgba(212, 168, 56, 0.40);
}
html.mode-dark .pillar-box h4 { color: var(--gray-900); }
html.mode-dark .pillar-box p { color: rgba(255, 255, 255, 0.55); }
html.mode-dark .philo-main p { color: var(--gray-500); }
html.mode-dark .philo-main strong { color: var(--gray-900); }

/* About cards — V1 surface */
html.mode-dark .about-cards-grid {
    border-color: var(--gray-100);
    box-shadow: none;
}
html.mode-dark .about-card,
html.mode-dark .about-card:nth-child(3n),
html.mode-dark .about-card:last-child,
html.mode-dark .about-card:nth-last-child(-n+3) {
    border-right-color: var(--gray-100);
    border-bottom-color: var(--gray-100);
}
html.mode-dark .about-card:nth-child(3n) { border-right: none; }
html.mode-dark .about-card:last-child { border-right: none; }
html.mode-dark .about-card:nth-last-child(-n+3) { border-bottom: none; }
html.mode-dark .about-card { background: var(--gray-50); }
html.mode-dark .about-card:hover { background: var(--gray-50); border-color: var(--neon-indigo); }
html.mode-dark .about-card-label { color: var(--neon-indigo-light); }
html.mode-dark .about-card p { color: var(--gray-500); }
html.mode-dark .about-text .text-lead { color: var(--gray-900); }
html.mode-dark .about-text p { color: var(--gray-500); }

/* Service cards — V1 surface + gradient featured */
html.mode-dark .svc-card {
    background: var(--gray-50);
    border-color: var(--gray-100);
}
html.mode-dark .svc-card:hover {
    border-color: var(--neon-indigo);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
html.mode-dark .svc-featured {
    /* Solid base + indigo gradient tint on top — keeps the highlight, kills the transparency */
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.10) 0%, rgba(6, 182, 212, 0.05) 100%),
        var(--gray-50);
    border-color: rgba(99, 102, 241, 0.45);
}
html.mode-dark .svc-featured:hover {
    border-color: var(--neon-indigo);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.18);
}
html.mode-dark .svc-card h3 { color: var(--gray-900); }
html.mode-dark .svc-card p { color: var(--gray-500); }
html.mode-dark .svc-pills span {
    background: var(--white);                /* solid #0a0a0f over the #16161f card */
    border-color: var(--gray-100);
    color: var(--gray-400);
}
html.mode-dark .svc-featured .svc-pills span {
    background: #0e1422;                     /* solid cyan-tinted dark */
    border-color: rgba(6, 182, 212, 0.30);
    color: var(--neon-cyan);
}
html.mode-dark .svc-num { color: var(--gray-400); }
html.mode-dark .svc-featured .svc-num { color: var(--neon-cyan); }

/* Cases — V1 surface + indigo-light tenure pill */
html.mode-dark .case-block {
    background: var(--gray-50);
    border-color: var(--gray-100);
}
html.mode-dark .case-block:hover {
    border-color: var(--gray-200);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
html.mode-dark .case-block-head { border-bottom-color: var(--gray-100); }
html.mode-dark .case-block-text { border-right-color: var(--gray-100); }
html.mode-dark .case-block-metrics { background: var(--white); }   /* solid #0a0a0f for clear contrast with text side */
html.mode-dark .case-block-tenure {
    background: #1a1d2e;                     /* solid indigo-tinted dark */
    color: var(--neon-indigo-light);
    border: 1px solid rgba(129, 140, 248, 0.40);
}
html.mode-dark .case-block-meta { color: var(--gray-400); }
html.mode-dark .case-block-flag { color: var(--gray-500); }
html.mode-dark .case-block-head h3 { color: var(--gray-900); }
html.mode-dark .case-block-text p { color: var(--gray-500); }
html.mode-dark .case-block-text strong { color: var(--gray-900); }
html.mode-dark .cm-lbl { color: var(--gray-400); }

/* Verticals pills — V1 dark surface variant */
html.mode-dark .v-pill {
    background: var(--gray-50);
    border-color: var(--gray-100);
    color: var(--gray-500);
}
html.mode-dark .v-pill:hover {
    background: var(--neon-indigo);
    border-color: var(--neon-indigo);
    color: #fff;
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.4);
}

/* Form — V1 surface */
html.mode-dark .c-form {
    background: var(--gray-50);
    border-color: var(--gray-100);
}
html.mode-dark .c-field label { color: var(--gray-400); }
html.mode-dark .c-field input,
html.mode-dark .c-field select,
html.mode-dark .c-field textarea {
    background: var(--off-white);   /* solid #0f0f17 — V1 style */
    border-color: var(--gray-200);
    color: var(--gray-900);
}
html.mode-dark .c-field input::placeholder,
html.mode-dark .c-field textarea::placeholder { color: var(--gray-400); }
html.mode-dark .c-field input:focus,
html.mode-dark .c-field select:focus,
html.mode-dark .c-field textarea:focus {
    border-color: var(--neon-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
html.mode-dark .c-field select {
    /* Restore the chevron position/repeat that the shorthand `background:` above wiped out */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
html.mode-dark .c-field select option { background: #16161f; color: var(--gray-900); }

/* Contact info — V1 indigo accent */
html.mode-dark .c-info-label { color: var(--neon-indigo-light); }
html.mode-dark .c-info-item p { color: var(--gray-900); }
html.mode-dark .c-info-item a {
    color: var(--neon-indigo-light);
    border-bottom: 1px solid rgba(129, 140, 248, 0.25);
}
html.mode-dark .c-info-item a:hover { color: var(--neon-cyan); border-bottom-color: var(--neon-cyan); }
html.mode-dark .c-info-note { color: var(--gray-400); }
html.mode-dark .c-langs {
    background: #0e0e1a;                     /* solid indigo-tinted dark */
    border-color: rgba(99, 102, 241, 0.32);
}
html.mode-dark .c-langs p { color: var(--gray-500); }
html.mode-dark .c-langs strong { color: var(--gray-900); }
html.mode-dark .c-social a {
    background: var(--gray-50);
    border-color: var(--gray-100);
    color: var(--gray-500);
}
html.mode-dark .c-social a:hover {
    background: var(--neon-indigo);
    border-color: var(--neon-indigo);
    color: #fff;
}

/* Contact section — deeper dark (V1 section-contact uses bg-deep) */
html.mode-dark #contact {
    background: #060609;
}

/* Footer — V1 bg-deep */
html.mode-dark .foot {
    border-top-color: var(--gray-100);
    background: #060609;
}
html.mode-dark .foot-left p,
html.mode-dark .foot-copy { color: var(--gray-400); }

/* Theme switch — dark variant tuned to V1 indigo */
html.mode-dark .theme-switch {
    background: var(--gray-50);              /* solid #16161f */
    color: var(--gray-900);
    border: 1px solid rgba(99, 102, 241, 0.45);
    box-shadow:
        0 0 22px rgba(99, 102, 241, 0.35),
        0 8px 28px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
html.mode-dark .theme-switch:hover {
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 30px rgba(6, 182, 212, 0.55),
        0 12px 36px rgba(0, 0, 0, 0.6);
}
html.mode-dark .theme-switch .ts-icon { color: var(--neon-cyan); }

/* Section titles + descriptions in dark mode */
html.mode-dark .sect-title { color: var(--gray-900); }
html.mode-dark .sect-desc { color: var(--gray-500); }
html.mode-dark .about-grid h2 { color: var(--gray-900); }
html.mode-dark .hero-content h1 { color: var(--gray-900); }
html.mode-dark .hero-sub { color: var(--gray-500); }
html.mode-dark .hero-sub strong { color: var(--gray-900); }
html.mode-dark .metric-label { color: var(--gray-400); }

/* Mobile menu (dark) — solid */
html.mode-dark .nav-links.open {
    background: var(--white);                /* solid #0a0a0f */
    border-bottom-color: var(--gray-100);
}

/* ── Responsive (same breakpoints as V4) ── */
@media (max-width: 1024px) {
    .svc-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .case-block-body { grid-template-columns: 1.4fr 1fr; }
    .vert-grid { grid-template-columns: 1fr; gap: 36px; }
    .about-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .about-card:nth-child(3n) { border-right: 1px solid var(--gray-100); }
    .about-card:nth-child(2n) { border-right: none; }
    .about-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--gray-100); }
    .about-card:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 968px) {
    .nav-links { gap: 22px; }
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .hero-metrics {
        flex-direction: row;
        border-left: none;
        border-top: 2px solid var(--gray-100);
        flex-wrap: wrap;
    }
    .metric {
        padding: 22px 28px 22px 0;
        border-bottom: none;
        border-right: 1px solid var(--gray-100);
        flex: 1 1 calc(50% - 14px);
    }
    .metric:last-child { border-right: none; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .philo-grid { grid-template-columns: 1fr; gap: 40px; }
    .svc-grid, .svc-grid-3 { grid-template-columns: 1fr; }
    .case-block-body { grid-template-columns: 1fr; }
    .case-block-text { border-right: none; border-bottom: 1px solid var(--gray-100); }
    .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-direction: column;
        align-items: center;
        padding: 32px 0;
        gap: 22px;
        border-bottom: 1px solid var(--gray-100);
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s var(--ease);
        margin: 0;
    }
    .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .nav-right { display: none; }
    .nav-toggle { margin-left: auto; }
    .sect { padding: 90px 0; }
    .hero-inner { padding: calc(var(--nav-h) + 60px) 24px 80px; gap: 40px; }
    .wrap { padding: 0 24px; }
    .hero-metrics { flex-direction: column; }
    .metric {
        padding: 20px 0;
        border-right: none;
        border-bottom: 1px solid var(--gray-100);
        flex: 1 1 100%;
    }
    .metric-val { font-size: 2.4rem; }
    .about-cards-grid { grid-template-columns: 1fr; }
    .about-card { border-right: none !important; border-bottom: 1px solid var(--gray-100) !important; }
    .about-card:last-child { border-bottom: none !important; }
    .case-block-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 28px 24px;
    }
    .case-block-text, .case-block-metrics { padding: 28px 24px; }
    .case-block-head h3 { font-size: 1.35rem; }
    .foot-inner { flex-direction: column; gap: 14px; text-align: center; }
    .tech-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 24px;
    }
    .tech-inner::-webkit-scrollbar { display: none; }
    .c-row { grid-template-columns: 1fr; }
    .c-form { padding: 28px 22px; }
    .nav-inner { padding: 0 24px; }

    .theme-switch {
        bottom: 16px;
        right: 16px;
        padding: 10px 14px;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.6rem; line-height: 0.98; }
    .hero-sub { font-size: 1.05rem; }
    .hero-btns { flex-direction: column; align-items: stretch; }
    .btn-dark, .btn-line { justify-content: center; }
    .case-block-metrics { grid-template-columns: 1fr 1fr; gap: 20px; }
    .cm-num { font-size: 1.55rem; }
    .case-block-head h3 { font-size: 1.2rem; }
    .v-pill { font-size: 0.84rem; padding: 8px 16px; }
    .sect-title { font-size: 2.2rem; }
    .about-grid h2 { font-size: 2.2rem; }
}

/* ── Dark mode mobile menu adjust ── */
@media (max-width: 768px) {
    html.mode-dark .nav-links {
        background: var(--white);            /* solid #0a0a0f */
        border-bottom-color: var(--gray-100);
    }
    html.mode-dark .hero-metrics { border-top-color: rgba(255, 255, 255, 0.08); }
    html.mode-dark .metric { border-bottom-color: rgba(255, 255, 255, 0.06); }
    html.mode-dark .about-card { border-bottom-color: rgba(255, 255, 255, 0.06) !important; }
    html.mode-dark .case-block-text { border-bottom-color: rgba(255, 255, 255, 0.06); }
}

/* Reduce motion preference — disable particles & sweep */
@media (prefers-reduced-motion: reduce) {
    .dp-particle { animation: none; }
    .mode-sweep { display: none; }
    html.theme-transitioning, html.theme-transitioning * { transition: none !important; }
}

/* ════════════════════════════════════════════════════
   ── tl;dr card + modal (dual-mode) ──
   ════════════════════════════════════════════════════ */
.about-card-tldr {
    background: var(--off-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 28px 30px;
    font-family: var(--font);
    border: none;
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.about-card-tldr::after {
    content: '↗';
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-400);
    transition: all 0.25s var(--ease);
}

.about-card-tldr:hover { background: var(--gray-50); }
.about-card-tldr:hover::after { color: var(--blue); transform: translate(2px, -2px); }

.about-card-tldr .tldr-label {
    font-family: var(--font);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--black);
    line-height: 0.95;
}

/* Modal */
.tldr-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.28s var(--ease);
}

.tldr-modal[hidden] { display: none !important; }
.tldr-modal.open { opacity: 1; }

.tldr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.tldr-panel {
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--white);
    border: 2px solid var(--black);
    border-radius: 10px;
    padding: 48px 48px 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
    transform: scale(0.94) translateY(8px);
    transition: transform 0.32s var(--ease);
}

.tldr-modal.open .tldr-panel { transform: scale(1) translateY(0); }

.tldr-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    background: var(--off-white);
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    color: var(--gray-700);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
}

.tldr-close:hover { color: var(--black); border-color: var(--black); }
.tldr-close svg { width: 14px; height: 14px; }

.tldr-title {
    font-family: var(--font);
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--black);
    margin: 0 0 24px;
    padding-right: 38px;
    letter-spacing: -0.035em;
}

.tldr-p {
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.7;
    font-weight: 500;
    margin: 0 0 18px;
}

.tldr-p strong { color: var(--black); font-weight: 800; }

.tldr-cta {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    padding: 16px 32px;
    background: var(--black);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s var(--ease);
    letter-spacing: -0.005em;
}

.tldr-cta:hover {
    background: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(29, 78, 216, 0.45);
}

@media (max-width: 600px) {
    .tldr-panel { padding: 38px 24px 30px; }
    .about-card-tldr { min-height: 100px; }
    .about-card-tldr .tldr-label { font-size: 2.2rem; }
    .tldr-title { font-size: 1.45rem; }
}

/* ── tl;dr in dark/Hyperspace mode ── */
html.mode-dark .about-card-tldr {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10) 0%, rgba(6, 182, 212, 0.05) 100%), var(--gray-50);
    border-right-color: var(--gray-100);
    border-bottom-color: var(--gray-100);
}
html.mode-dark .about-card-tldr:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%), var(--gray-50);
}
html.mode-dark .about-card-tldr::after { color: var(--neon-cyan); }
html.mode-dark .about-card-tldr .tldr-label {
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(99, 102, 241, 0.35));
}

html.mode-dark .tldr-backdrop { background: rgba(0, 0, 0, 0.78); }

html.mode-dark .tldr-panel {
    background: var(--gray-50);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 32px rgba(99, 102, 241, 0.22);
}

html.mode-dark .tldr-close {
    background: var(--white);
    border-color: var(--gray-200);
    color: var(--gray-500);
}
html.mode-dark .tldr-close:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

html.mode-dark .tldr-title {
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

html.mode-dark .tldr-p { color: var(--gray-500); }
html.mode-dark .tldr-p strong { color: var(--gray-900); }

html.mode-dark .tldr-cta {
    background: var(--neon-gradient);
    box-shadow: 0 4px 22px rgba(99, 102, 241, 0.4);
}
html.mode-dark .tldr-cta:hover {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.55);
}

/* ════════════════════════════════════════════════════
   ── EASTER EGG: Space Invaders trigger + warp + game ──
   ════════════════════════════════════════════════════ */
.invaders-trigger {
    position: absolute;
    top: 22%;
    right: 5.5%;
    width: 26px;
    height: 26px;
    color: var(--neon-cyan);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.invaders-trigger svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.85));
}

/* Reveal in dark mode after a delay; then gentle pulse */
html.mode-dark .invaders-trigger {
    opacity: 0.65;
    pointer-events: auto;
    transform: scale(1);
    transition-delay: 3s;
    animation: starPulse 2.6s ease-in-out 4s infinite;
}

html.mode-dark .invaders-trigger:hover {
    opacity: 1;
    transform: scale(1.3) !important;
    animation-play-state: paused;
}

/* Hide trigger while gaming */
.hero.gaming .invaders-trigger { opacity: 0 !important; pointer-events: none !important; }

@keyframes starPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50%      { transform: scale(1.18); filter: brightness(1.4); }
}

/* Warp out — hero text gets sucked into space */
.hero-inner.warping-out {
    transition:
        transform 0.7s cubic-bezier(0.55, 0.05, 0.40, 1),
        opacity 0.7s ease,
        filter 0.7s ease;
    transform: scale(0.08) translateY(-260px);
    opacity: 0;
    filter: blur(10px);
    pointer-events: none;
}

.hero-inner.warping-in {
    animation: warpIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes warpIn {
    from { transform: scale(0.08) translateY(-260px); opacity: 0; filter: blur(10px); }
    to   { transform: none; opacity: 1; filter: none; }
}

/* Game container — sits inside the hero */
.invaders-game {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 24px) 24px 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.invaders-game.active { opacity: 1; }
.invaders-game[hidden] { display: none !important; }

.invaders-canvas {
    width: 100%;
    max-width: 920px;
    height: auto;
    aspect-ratio: 800 / 540;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 8px;
    background: rgba(7, 7, 16, 0.55);
    box-shadow:
        0 0 40px rgba(99, 102, 241, 0.35),
        0 24px 64px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(99, 102, 241, 0.30);
    touch-action: none;
}

.invaders-exit {
    position: absolute;
    top: calc(var(--nav-h) + 18px);
    right: 22px;
    width: 36px;
    height: 36px;
    background: rgba(22, 22, 31, 0.92);
    border: 1px solid rgba(6, 182, 212, 0.45);
    border-radius: 6px;
    color: var(--neon-cyan);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.25s var(--ease);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.30);
}

.invaders-exit:hover {
    border-color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.15);
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.55);
}

.invaders-exit svg { width: 14px; height: 14px; }

/* Mute toggle — sits to the left of the exit button */
.invaders-mute {
    position: absolute;
    top: calc(var(--nav-h) + 18px);
    right: 66px;
    width: 36px;
    height: 36px;
    background: rgba(22, 22, 31, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.45);
    border-radius: 6px;
    color: var(--neon-indigo-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.25s var(--ease);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.30);
    padding: 0;
}

.invaders-mute:hover {
    border-color: var(--neon-indigo-light);
    background: rgba(99, 102, 241, 0.16);
    box-shadow: 0 0 22px rgba(99, 102, 241, 0.55);
}

.invaders-mute svg { width: 16px; height: 16px; }
.invaders-mute .ic-off { display: none; }
.invaders-mute.is-muted .ic-on { display: none; }
.invaders-mute.is-muted .ic-off { display: inline-block; }
.invaders-mute.is-muted {
    color: var(--gray-400);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

@media (max-width: 600px) {
    .invaders-trigger { top: 14%; right: 5%; width: 24px; height: 24px; }
    .invaders-exit { top: calc(var(--nav-h) + 12px); right: 14px; }
    .invaders-mute { top: calc(var(--nav-h) + 12px); right: 58px; }
    .invaders-game { padding: calc(var(--nav-h) + 16px) 12px 12px; }
}

/* ════════════════════════════════════════════════════
   ── Mobile mode for the game (vertical canvas + on-screen d-pad + Fire) ──
   ════════════════════════════════════════════════════ */
.invaders-game.mobile-mode {
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    padding: calc(var(--nav-h) + 12px) 12px 16px;
}

.invaders-game.mobile-mode .invaders-canvas {
    aspect-ratio: 420 / 720;
    max-width: 100%;
    /* Fit within available height — leave room for controls */
    max-height: calc(100vh - var(--nav-h) - 180px);
    width: auto;
    flex-shrink: 1;
    box-shadow:
        0 0 28px rgba(99, 102, 241, 0.32),
        0 18px 48px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(99, 102, 241, 0.30);
}

/* On-screen controls — hidden by default, shown when game is in mobile mode */
.invaders-mobile-controls {
    display: none;
    width: 100%;
    max-width: 460px;
    height: 96px;
    padding: 0 12px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-shrink: 0;
    z-index: 4;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.invaders-mobile-controls.show { display: flex; }

.imc-dpad {
    display: flex;
    gap: 14px;
}

.imc-btn {
    background: rgba(22, 22, 31, 0.92);
    border: 1.5px solid rgba(99, 102, 241, 0.45);
    color: var(--neon-cyan);
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.5),
        0 0 14px rgba(99, 102, 241, 0.30);
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    padding: 0;
}

.imc-btn svg { width: 24px; height: 24px; }

.imc-btn.is-pressed {
    transform: scale(0.94);
    background: rgba(6, 182, 212, 0.20);
    border-color: var(--neon-cyan);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 0 22px rgba(6, 182, 212, 0.55);
}

.imc-fire {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.18)), rgba(22, 22, 31, 0.92);
    border-color: var(--neon-violet);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.55),
        0 0 22px rgba(139, 92, 246, 0.40);
    font-size: 1rem;
    font-weight: 900;
}

.imc-fire.is-pressed {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(139, 92, 246, 0.35)), rgba(22, 22, 31, 0.95);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.55),
        0 0 32px rgba(139, 92, 246, 0.70);
    transform: scale(0.96);
}

/* Smaller phones */
@media (max-width: 380px) {
    .imc-btn { width: 56px; height: 56px; }
    .imc-fire { width: 84px; height: 84px; }
    .invaders-mobile-controls { height: 88px; gap: 12px; padding: 0 10px; }
}
