/* ============================================================
   SEHRABRIDGE — SOFTWARE HOUSE
   Design system, layout and interactions
   ------------------------------------------------------------
   01  Tokens
   02  Reset & base
   03  Typography utilities
   04  Buttons & links
   05  Header / navigation
   06  Hero + digital bridge
   07  Introduction
   08  Services
   09  Process
   10  Work
   11  Architecture
   12  Why / dark sections
   13  Technology stack
   14  Connector interaction
   15  Insights
   17  Contact
   18  Statement
   19  Footer
   20  Reveal animations
   21  Responsive
   22  Reduced motion & print
   ============================================================ */

/* ---------- 01  TOKENS ---------- */
:root {
    --graphite: #11161A;
    --deep-graphite: #171E23;
    --slate: #263139;
    --cobalt: #3867D6;
    --electric-blue: #4D8DFF;
    --mint: #55C7A5;
    --soft-mint: #DDF5EC;
    --ice: #EAF1F7;
    --white: #FFFFFF;
    --paper: #F7F9FB;
    --text: #17212A;
    --muted: #697680;
    --line: rgba(17, 22, 26, 0.12);

    /* dark surface helpers */
    --line-dark: rgba(234, 241, 247, 0.14);
    --muted-dark: rgba(234, 241, 247, 0.62);

    --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-tech: "Space Grotesk", "Manrope", monospace, sans-serif;

    --shell: 1240px;
    --gutter: clamp(20px, 5vw, 56px);
    --section-y: clamp(72px, 10vw, 148px);

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-pill: 999px;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --shadow-sm: 0 1px 2px rgba(17, 22, 26, .05), 0 8px 24px -18px rgba(17, 22, 26, .35);
    --shadow-md: 0 18px 48px -28px rgba(17, 22, 26, .45);
    --shadow-cta: 0 12px 30px -14px rgba(56, 103, 214, .6);
}

/* ---------- 02  RESET & BASE ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: clamp(15.5px, 1.05vw, 17px);
    line-height: 1.65;
    font-weight: 450;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { max-width: 100%; }

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

button { font: inherit; color: inherit; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0);
    clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px; top: -80px;
    z-index: 200;
    background: var(--graphite);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--r-sm);
    font-weight: 700;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: 3px;
    border-radius: 4px;
}
.dark-section :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible { outline-color: var(--mint); }

::selection { background: var(--mint); color: var(--graphite); }

/* ---------- 03  TYPOGRAPHY ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tech);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 22px;
}
.eyebrow-light { color: var(--soft-mint); }
.eyebrow .sep { color: var(--electric-blue); }
.eyebrow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 4px rgba(85, 199, 165, .18);
}

.display {
    font-size: clamp(34px, 4.6vw, 62px);
    letter-spacing: -0.035em;
}
.display-lg { font-size: clamp(38px, 6vw, 84px); }
.center { text-align: center; }

.grad {
    background: linear-gradient(100deg, var(--cobalt) 0%, var(--electric-blue) 45%, var(--mint) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-lede {
    margin-top: 22px;
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--muted);
    max-width: 56ch;
}
.section-head-row {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.disclaimer {
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    font-family: var(--font-tech);
    letter-spacing: .01em;
    padding-left: 14px;
    border-left: 2px solid var(--line);
    max-width: 60ch;
}
.disclaimer.center {
    border-left: 0;
    padding-left: 0;
    text-align: center;
    margin-inline: auto;
    margin-top: 48px;
}

/* ---------- 04  BUTTONS & LINKS ---------- */
.btn {
    --btn-bg: var(--graphite);
    --btn-fg: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out),
                background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn .arrow { transition: transform .28s var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:hover .arrow-ne { transform: translate(3px, -3px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(120deg, var(--cobalt), var(--electric-blue) 70%, var(--mint) 160%);
    color: var(--white);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset;
}
.btn-primary:hover { box-shadow: var(--shadow-cta), 0 1px 0 rgba(255, 255, 255, .16) inset; }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}
.dark-section .btn-ghost,
.hero .btn-ghost {
    border-color: var(--line-dark);
    color: var(--ice);
}
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); }

.btn-lg { padding: 17px 30px; font-size: 16px; }
.btn-block { width: 100%; }

.text-link {
    position: relative;
    font-weight: 650;
    font-size: 15px;
    padding-block: 4px;
}
.text-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s var(--ease-out);
}
.text-link:hover::after,
.text-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.text-link-lg { font-size: 16px; color: var(--cobalt); }
.text-link .arrow { display: inline-block; transition: transform .28s var(--ease-out); }
.text-link:hover .arrow { transform: translateX(4px); }

/* ---------- 05  HEADER ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color .35s var(--ease), backdrop-filter .35s var(--ease),
                border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-stuck {
    background: rgba(17, 22, 26, .82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: var(--line-dark);
}
.site-header.is-stuck.on-light {
    background: rgba(255, 255, 255, .86);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px -24px rgba(17, 22, 26, .5);
}

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

.header-progress {
    height: 2px;
    background: transparent;
    overflow: hidden;
}
.header-progress span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cobalt), var(--electric-blue), var(--mint));
    transition: width .1s linear;
}

/* logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ice);
    flex-shrink: 0;
}
.site-header.on-light .logo { color: var(--graphite); }
.logo-mark { display: grid; place-items: center; line-height: 0; }
.logo-mark svg { display: block; }
.logo-type { display: grid; line-height: 1; }
.logo-name {
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .11em;
}
.logo-sub {
    font-family: var(--font-tech);
    font-size: 9.5px;
    letter-spacing: .34em;
    margin-top: 5px;
    color: var(--mint);
    font-weight: 500;
}
.logo:hover .sb-mark-span { stroke: var(--mint); }
.sb-mark-span { transition: stroke .3s var(--ease); }

/* nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 44px);
}
.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.2vw, 32px);
}
.nav-list a {
    position: relative;
    font-size: 15px;
    font-weight: 550;
    color: rgba(234, 241, 247, .82);
    padding-block: 6px;
    transition: color .25s var(--ease);
}
.site-header.on-light .nav-list a { color: var(--slate); }
.nav-list a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1.5px;
    background: linear-gradient(90deg, var(--electric-blue), var(--mint));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .38s var(--ease-out);
}
.nav-list a:hover,
.nav-list a[aria-current="true"] { color: var(--white); }
.site-header.on-light .nav-list a:hover,
.site-header.on-light .nav-list a[aria-current="true"] { color: var(--graphite); }
.nav-list a:hover::after,
.nav-list a:focus-visible::after,
.nav-list a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-actions .text-link { color: rgba(234, 241, 247, .85); }
.site-header.on-light .nav-actions .text-link { color: var(--slate); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--line-dark);
    color: var(--ice);
    border-radius: var(--r-pill);
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--font-tech);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.site-header.on-light .nav-toggle { border-color: var(--line); color: var(--graphite); }
.nav-toggle-bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle-bars i {
    display: block;
    height: 1.5px;
    background: currentColor;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(17, 22, 26, .55);
    backdrop-filter: blur(2px);
}

/* ---------- 06  HERO ---------- */
.hero {
    position: relative;
    background: var(--graphite);
    color: var(--ice);
    padding-top: clamp(132px, 15vh, 178px);
    padding-bottom: clamp(48px, 6vw, 72px);
    overflow: hidden;
    isolation: isolate;
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -55% 30%;
    height: 70%;
    background: radial-gradient(closest-side, rgba(56, 103, 214, .28), transparent 70%);
    z-index: -1;
    pointer-events: none;
}
.hero-grid-lines {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(234, 241, 247, .045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(234, 241, 247, .045) 1px, transparent 1px);
    background-size: clamp(60px, 8vw, 110px) clamp(60px, 8vw, 110px);
    mask-image: radial-gradient(120% 90% at 20% 20%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(120% 90% at 20% 20%, #000 30%, transparent 85%);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hero-title {
    font-size: clamp(46px, 7vw, 96px);
    line-height: 0.98;
    letter-spacing: -0.045em;
    color: var(--white);
    max-width: 14ch;
}
.hero-lede {
    margin-top: 28px;
    max-width: 48ch;
    font-size: clamp(16px, 1.35vw, 19px);
    color: var(--muted-dark);
}
.hero-cta {
    margin-top: 38px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.hero-tags {
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid var(--line-dark);
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 3vw, 38px);
    font-family: var(--font-tech);
    font-size: 12.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(234, 241, 247, .68);
}
.hero-tags li { display: flex; align-items: center; gap: 10px; }
.hero-tags li::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 1px;
    background: var(--mint);
    transform: rotate(45deg);
}

.hero-foot {
    margin-top: clamp(40px, 6vw, 76px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-family: var(--font-tech);
    font-size: 11.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(234, 241, 247, .45);
}
.scroll-hint { display: inline-flex; align-items: center; gap: 12px; }
.scroll-hint-line {
    width: 44px; height: 1px;
    background: linear-gradient(90deg, var(--mint), transparent);
    position: relative;
    overflow: hidden;
}
.scroll-hint-line::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 14px;
    background: var(--mint);
    animation: slide 2.4s var(--ease) infinite;
}
@keyframes slide {
    0% { transform: translateX(-16px); opacity: 0; }
    35% { opacity: 1; }
    100% { transform: translateX(44px); opacity: 0; }
}

/* ---------- 07  HERO VISUAL — DIGITAL BRIDGE ---------- */
.hero-visual { position: relative; }
.bridge-svg { width: 100%; height: auto; display: block; overflow: visible; }

.bridge-label {
    font-family: var(--font-tech);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2em;
    fill: var(--ice);
}
.bridge-status {
    font-family: var(--font-tech);
    font-size: 11px;
    letter-spacing: .26em;
    fill: rgba(234, 241, 247, .5);
}

.node { transition: opacity .5s var(--ease), transform .5s var(--ease-out); }
.node-blue { fill: var(--electric-blue); }
.node-mint { fill: var(--mint); }
.chip { fill: rgba(77, 141, 255, .22); stroke: rgba(85, 199, 165, .5); stroke-width: 1; }

/* build-in states (driven by .is-built on [data-bridge]) */
[data-bridge] .draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.4s var(--ease-out);
}
[data-bridge] .platform,
[data-bridge] .idea-nodes,
[data-bridge] .span-nodes,
[data-bridge] .hangers,
[data-bridge] .status,
[data-bridge] .packet {
    opacity: 0;
    transition: opacity .7s var(--ease);
}

[data-bridge].is-built .idea-nodes { opacity: 1; transition-delay: .1s; }
[data-bridge].is-built .platform-left { opacity: 1; transition-delay: .35s; }
[data-bridge].is-built .platform-right { opacity: 1; transition-delay: .55s; }
[data-bridge].is-built .draw.thin { stroke-dashoffset: 0; transition-delay: .25s; }
[data-bridge].is-built .span-main { stroke-dashoffset: 0; transition-delay: .85s; }
[data-bridge].is-built .span-under { stroke-dashoffset: 0; transition-delay: 1.05s; }
[data-bridge].is-built .hangers { opacity: 1; transition-delay: 1.6s; }
[data-bridge].is-built .span-nodes { opacity: 1; transition-delay: 1.8s; }
[data-bridge].is-built .horizon { stroke-dashoffset: 0; transition-delay: 1.9s; }
[data-bridge].is-built .packet { opacity: 1; transition-delay: 2.1s; }
[data-bridge].is-built .status { opacity: 1; transition-delay: 2.3s; }

.pulse { animation: pulseNode 3s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
.pulse:nth-of-type(2) { animation-delay: .5s; }
.pulse:nth-of-type(3) { animation-delay: 1s; }
@keyframes pulseNode {
    0%, 100% { opacity: .75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.35); }
}

/* ---------- 08  INTRODUCTION ---------- */
.intro { background: var(--white); }
.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(28px, 5vw, 80px);
    align-items: end;
}
.intro-copy {
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.6;
    color: var(--muted);
    max-width: 52ch;
}
.intro-bridge {
    margin-top: clamp(40px, 6vw, 84px);
    width: 100%;
}
.intro-bridge svg { width: 100%; height: clamp(70px, 11vw, 160px); display: block; }
.intro-bridge .draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 2s var(--ease-out) .1s;
}
.intro-bridge.is-visible .draw { stroke-dashoffset: 0; }
.intro-dot { fill: var(--mint); opacity: 0; transition: opacity .6s var(--ease) 1.4s; }
.intro-bridge.is-visible .intro-dot { opacity: 1; }

/* ---------- 09  SERVICES ---------- */
.services { background: var(--paper); }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
}
.card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(26px, 3vw, 38px);
    overflow: hidden;
    transition: transform .4s var(--ease-out), border-color .35s var(--ease), box-shadow .4s var(--ease-out);
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cobalt), var(--mint));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease-out);
}
.card:hover,
.card:focus-within {
    transform: translateY(-4px);
    border-color: rgba(56, 103, 214, .35);
    box-shadow: var(--shadow-md);
}
.card:hover::before,
.card:focus-within::before { transform: scaleX(1); }

.card-index {
    position: absolute;
    top: clamp(22px, 2.6vw, 30px);
    right: clamp(22px, 2.6vw, 30px);
    font-family: var(--font-tech);
    font-size: 12px;
    letter-spacing: .16em;
    color: var(--muted);
    opacity: .55;
}
.card-icon {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    border-radius: var(--r-md);
    background: var(--ice);
    color: var(--cobalt);
    margin-bottom: 26px;
    transition: background-color .35s var(--ease), color .35s var(--ease), transform .4s var(--ease-out);
}
.card-icon svg { width: 26px; height: 26px; }
.card:hover .card-icon { background: var(--soft-mint); color: var(--slate); transform: translateY(-2px); }

.card-title {
    font-size: clamp(19px, 1.55vw, 22px);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.card-strap {
    font-weight: 650;
    color: var(--slate);
    margin-bottom: 10px;
    font-size: 15.5px;
}
.card-copy { color: var(--muted); font-size: 15.5px; }

/* ---------- 10  PROCESS ---------- */
.process { background: var(--white); }
.process-track { position: relative; }
.process-line {
    position: absolute;
    left: 0; right: 0;
    top: 46px;
    height: 8px;
}
.process-line svg { width: 100%; height: 8px; display: block; }
.process-line-fill {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.8s var(--ease-out);
}
[data-process].is-visible .process-line-fill { stroke-dashoffset: 0; }

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 34px);
}
.process-step { position: relative; padding-top: 74px; }
.step-node {
    position: absolute;
    top: 40px; left: 0;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--electric-blue);
    box-shadow: 0 0 0 5px rgba(77, 141, 255, .12);
    transition: background-color .35s var(--ease), border-color .35s var(--ease), transform .4s var(--ease-out);
}
.process-step:hover .step-node {
    background: var(--mint);
    border-color: var(--mint);
    transform: scale(1.15);
}
.step-num {
    display: block;
    font-family: var(--font-tech);
    font-size: 12.5px;
    letter-spacing: .24em;
    color: var(--electric-blue);
    margin-bottom: 12px;
}
.step-title {
    font-size: clamp(21px, 2vw, 28px);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}
.step-copy { color: var(--muted); font-size: 15.5px; max-width: 30ch; }

/* ---------- 11  WORK ---------- */
.work { background: var(--paper); }
.work-list { display: grid; gap: clamp(16px, 2vw, 26px); }
.work-card { border-radius: var(--r-lg); overflow: hidden; }
.work-link {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color .35s var(--ease), box-shadow .45s var(--ease-out), transform .45s var(--ease-out);
}
.work-card:nth-child(even) .work-link { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.work-card:nth-child(even) .work-visual { order: 2; }

.work-link:hover,
.work-link:focus-visible {
    border-color: rgba(56, 103, 214, .4);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.work-visual {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: clamp(220px, 26vw, 340px);
    background: var(--deep-graphite);
}
.work-visual svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    transition: transform .8s var(--ease-out);
}
.work-link:hover .work-visual svg,
.work-link:focus-visible .work-visual svg { transform: scale(1.045); }
.work-visual::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(85, 199, 165, .35);
    border-radius: var(--r-md);
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .45s var(--ease), transform .45s var(--ease-out);
}
.work-link:hover .work-visual::after,
.work-link:focus-visible .work-visual::after { opacity: 1; transform: scale(1); }

.work-body {
    position: relative;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: clamp(28px, 4vw, 56px);
}
.work-index {
    font-family: var(--font-tech);
    font-size: 12px;
    letter-spacing: .24em;
    color: var(--muted);
}
.work-name {
    font-family: var(--font-tech);
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--graphite);
}
.work-sector {
    font-size: clamp(16px, 1.4vw, 19px);
    font-weight: 650;
    color: var(--cobalt);
}
.work-meta {
    margin-top: 6px;
    font-family: var(--font-tech);
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.work-arrow {
    margin-top: 22px;
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-size: 17px;
    color: var(--graphite);
    transition: transform .4s var(--ease-out), background-color .35s var(--ease),
                color .35s var(--ease), border-color .35s var(--ease);
}
.work-link:hover .work-arrow,
.work-link:focus-visible .work-arrow {
    transform: translate(4px, -4px);
    background: var(--graphite);
    border-color: var(--graphite);
    color: var(--soft-mint);
}

/* ---------- 12  ARCHITECTURE ---------- */
.architecture { background: var(--white); }
.arch-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}
.arch-diagram {
    background: var(--graphite);
    border-radius: var(--r-lg);
    padding: clamp(18px, 2.6vw, 34px);
    border: 1px solid rgba(17, 22, 26, .9);
    background-image:
        linear-gradient(to right, rgba(234, 241, 247, .04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(234, 241, 247, .04) 1px, transparent 1px);
    background-size: 46px 46px;
}
.arch-diagram svg { width: 100%; height: auto; display: block; }

.arch-link {
    stroke: rgba(234, 241, 247, .22);
    stroke-dasharray: 5 7;
    transition: stroke .35s var(--ease), stroke-width .35s var(--ease), opacity .35s var(--ease);
}
.arch-link.is-active {
    stroke: url(#archGrad);
    stroke-dasharray: none;
    stroke-width: 2.6;
}
[data-arch].is-dimmed .arch-link:not(.is-active) { opacity: .3; }

.arch-node { cursor: pointer; }
.arch-node rect {
    fill: var(--deep-graphite);
    stroke: rgba(234, 241, 247, .18);
    stroke-width: 1.5;
    transition: fill .3s var(--ease), stroke .3s var(--ease), transform .35s var(--ease-out);
}
.arch-node text {
    font-family: var(--font-tech);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2em;
    fill: rgba(234, 241, 247, .78);
    transition: fill .3s var(--ease);
    pointer-events: none;
}
.arch-node-core rect { stroke: rgba(77, 141, 255, .5); }
.arch-node:hover rect,
.arch-node:focus-visible rect,
.arch-node.is-active rect {
    fill: var(--slate);
    stroke: var(--mint);
}
.arch-node:hover text,
.arch-node:focus-visible text,
.arch-node.is-active text { fill: var(--white); }
.arch-node:focus { outline: none; }
.arch-node:focus-visible rect { stroke-width: 2.5; }

.arch-detail {
    border-left: 2px solid var(--line);
    padding-left: clamp(20px, 2.4vw, 32px);
}
.arch-detail-kicker {
    font-family: var(--font-tech);
    font-size: 11.5px;
    letter-spacing: .24em;
    color: var(--muted);
    margin-bottom: 12px;
}
.arch-detail-title {
    font-size: clamp(26px, 2.8vw, 38px);
    margin-bottom: 14px;
    letter-spacing: -0.03em;
}
.arch-detail-copy { color: var(--muted); font-size: 16px; max-width: 40ch; }
.arch-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}
.arch-detail-tags li {
    font-family: var(--font-tech);
    font-size: 11.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 7px 13px;
    border-radius: var(--r-pill);
    background: var(--ice);
    color: var(--slate);
}

/* ---------- 13  DARK SECTIONS / WHY ---------- */
.dark-section {
    background: var(--graphite);
    color: var(--ice);
}
.why {
    background:
        radial-gradient(80% 60% at 80% 0%, rgba(56, 103, 214, .22), transparent 60%),
        var(--graphite);
}
.why .display { color: var(--white); }
.why-list {
    margin: clamp(48px, 6vw, 88px) 0 0;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line-dark);
}
.why-item {
    display: grid;
    grid-template-columns: minmax(0, .4fr) minmax(0, 1fr);
    gap: clamp(16px, 3vw, 48px);
    align-items: baseline;
    padding-block: clamp(28px, 3.6vw, 46px);
    border-bottom: 1px solid var(--line-dark);
    transition: padding-left .4s var(--ease-out);
}
.why-item:hover { padding-left: 12px; }
.why-term {
    font-family: var(--font-tech);
    font-size: clamp(15px, 1.3vw, 17px);
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--mint);
}
.why-desc {
    margin: 0;
    font-size: clamp(24px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.032em;
    color: var(--white);
    max-width: 22ch;
}

/* ---------- 14  TECHNOLOGY STACK ---------- */
.stack { background: var(--paper); }
.stack-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 4px; }
.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 24px);
}
.stack-col {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(24px, 2.8vw, 34px);
    transition: border-color .35s var(--ease), transform .4s var(--ease-out);
}
.stack-col:hover { border-color: rgba(85, 199, 165, .55); transform: translateY(-3px); }
.stack-title {
    font-family: var(--font-tech);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.stack-items { display: grid; gap: 12px; }
.stack-items li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(16px, 1.3vw, 18px);
    font-weight: 650;
    color: var(--text);
}
.stack-items li::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 2px;
    background: var(--electric-blue);
    flex-shrink: 0;
}
.stack-col:nth-child(2) .stack-items li::before { background: var(--mint); }
.stack-col:nth-child(3) .stack-items li::before { background: var(--cobalt); }
.stack-col:nth-child(4) .stack-items li::before { background: var(--slate); }

/* ---------- 15  CONNECTOR ---------- */
.connector { background: var(--white); }
.connector-stage {
    margin-top: clamp(40px, 5vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 1.4vw, 20px);
}
.connector-side {
    text-align: left;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(26px, 3.2vw, 40px);
    cursor: pointer;
    display: grid;
    gap: 8px;
    transition: transform .4s var(--ease-out), border-color .35s var(--ease),
                background-color .35s var(--ease), box-shadow .4s var(--ease-out);
}
.connector-tag {
    font-family: var(--font-tech);
    font-size: 11.5px;
    letter-spacing: .24em;
    color: var(--muted);
}
.connector-label {
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.connector-note { color: var(--muted); font-size: 15px; }
.connector-side:hover,
.connector-side:focus-visible,
.connector-side[aria-pressed="true"] {
    transform: translateY(-3px);
    background: var(--white);
    border-color: rgba(56, 103, 214, .45);
    box-shadow: var(--shadow-md);
}

.connector-span { position: relative; }
.connector-span svg { width: 100%; height: clamp(90px, 12vw, 140px); display: block; }
.conn-fill {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1s var(--ease-out);
}
.conn-nodes circle { fill: var(--mint); opacity: 0; transition: opacity .5s var(--ease) .5s; }
[data-connector].is-linked .conn-fill { stroke-dashoffset: 0; }
[data-connector].is-linked .conn-nodes circle { opacity: 1; }

.connector-reveal {
    margin-top: clamp(28px, 3.4vw, 44px);
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: opacity .5s var(--ease), transform .5s var(--ease-out), visibility 0s linear .5s;
}
.connector-reveal.is-shown {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition-delay: 0s;
}

/* ---------- 17  INSIGHTS ---------- */
.insights { background: var(--white); }
.insight-card { padding: 0; }
.insight-card > a {
    display: grid;
    gap: 12px;
    padding: clamp(26px, 3vw, 38px);
    height: 100%;
    align-content: start;
}
.insight-meta {
    font-family: var(--font-tech);
    font-size: 11.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--electric-blue);
}
.insight-title {
    font-size: clamp(19px, 1.7vw, 24px);
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.insight-arrow {
    margin-top: 14px;
    font-size: 20px;
    color: var(--graphite);
    transition: transform .35s var(--ease-out);
    display: inline-block;
}
.insight-card:hover .insight-arrow { transform: translateX(6px); }

/* ---------- 18  CONTACT ---------- */
.contact {
    background:
        radial-gradient(70% 60% at 15% 10%, rgba(85, 199, 165, .16), transparent 60%),
        var(--graphite);
}
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: start;
}
.contact .display { color: var(--white); }
.contact-lede {
    margin-top: 24px;
    max-width: 42ch;
    font-size: clamp(16px, 1.35vw, 19px);
    color: var(--muted-dark);
}
.contact-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.contact-form {
    background: rgba(234, 241, 247, .04);
    border: 1px solid var(--line-dark);
    border-radius: var(--r-lg);
    padding: clamp(24px, 3vw, 38px);
    display: grid;
    gap: 18px;
}
.field { display: grid; gap: 8px; }
.field label {
    font-family: var(--font-tech);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(234, 241, 247, .72);
}
.field input,
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 16px;
    color: var(--white);
    background: rgba(17, 22, 26, .5);
    border: 1px solid var(--line-dark);
    border-radius: var(--r-md);
    padding: 14px 16px;
    transition: border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 108px; }
.field input:hover,
.field textarea:hover { border-color: rgba(234, 241, 247, .3); }
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--mint);
    background: rgba(17, 22, 26, .8);
    box-shadow: 0 0 0 3px rgba(85, 199, 165, .18);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #FF8A80; }

.field-error {
    font-size: 13px;
    color: #FFB4AB;
    min-height: 0;
}
.field-error:empty { display: none; }

.form-status {
    font-size: 14px;
    color: var(--mint);
    text-align: center;
}
.form-status:empty { display: none; }

/* ---------- 19  STATEMENT ---------- */
.statement {
    background: var(--white);
    text-align: center;
    padding-block: clamp(88px, 12vw, 180px);
}
.statement-text {
    font-size: clamp(32px, 5.6vw, 78px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    max-width: 18ch;
    margin-inline: auto;
}
.statement-mark {
    margin-top: clamp(36px, 5vw, 60px);
    display: grid;
    place-items: center;
    color: var(--graphite);
}
.statement-mark svg { animation: floatMark 6s var(--ease) infinite; }
@keyframes floatMark {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- 20  FOOTER ---------- */
.site-footer {
    background: var(--deep-graphite);
    color: var(--ice);
    padding-top: clamp(56px, 7vw, 92px);
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: clamp(36px, 5vw, 72px);
    padding-bottom: clamp(44px, 5vw, 72px);
}
.footer-brand .logo { color: var(--ice); }
.footer-statement {
    margin-top: 22px;
    max-width: 30ch;
    color: var(--muted-dark);
    font-size: 16px;
}
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
}
.footer-heading {
    font-family: var(--font-tech);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--mint);
    margin-bottom: 18px;
}
.footer-col ul { display: grid; gap: 11px; }
.footer-col a {
    color: rgba(234, 241, 247, .72);
    font-size: 15px;
    transition: color .25s var(--ease), padding-left .3s var(--ease-out);
}
.footer-col a:hover { color: var(--white); padding-left: 5px; }

.footer-bottom {
    border-top: 1px solid var(--line-dark);
    padding-block: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: rgba(234, 241, 247, .55);
}
.footer-legal a { transition: color .25s var(--ease); }
.footer-legal a:hover { color: var(--mint); }

/* ---------- 21  REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 22  RESPONSIVE ---------- */
@media (max-width: 1080px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-title { max-width: 18ch; }
    .hero-visual { max-width: 640px; margin-inline: auto; width: 100%; }
    .arch-wrap { grid-template-columns: 1fr; }
    .arch-detail { border-left: 0; border-top: 2px solid var(--line); padding-left: 0; padding-top: 24px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }

    .site-nav {
        position: fixed;
        inset: 0 0 auto 0;
        top: 0;
        z-index: 95;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 104px var(--gutter) 32px;
        background: var(--graphite);
        border-bottom: 1px solid var(--line-dark);
        transform: translateY(-102%);
        visibility: hidden;
        transition: transform .45s var(--ease-out), visibility 0s linear .45s;
    }
    .site-nav.is-open {
        transform: translateY(0);
        visibility: visible;
        transition-delay: 0s;
    }
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .nav-list a {
        display: block;
        padding: 16px 0;
        font-size: 20px;
        font-weight: 700;
        color: var(--ice);
        border-bottom: 1px solid var(--line-dark);
    }
    .nav-list a::after { display: none; }
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-top: 28px;
    }
    .nav-actions .text-link { color: var(--ice); text-align: center; }
    .nav-actions .btn { width: 100%; }

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

    .process-line { display: none; }
    .process-steps {
        grid-template-columns: 1fr;
        gap: 0;
        border-left: 1px solid var(--line);
        padding-left: 28px;
        margin-left: 7px;
    }
    .process-step { padding-top: 0; padding-block: 26px; }
    .process-step:first-child { padding-top: 0; }
    .step-node { top: 30px; left: -35px; }
    .step-copy { max-width: none; }

    .work-link,
    .work-card:nth-child(even) .work-link { grid-template-columns: 1fr; }
    .work-card:nth-child(even) .work-visual { order: 0; }

    .stack-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); }

    .why-item { grid-template-columns: 1fr; gap: 12px; }
    .why-desc { max-width: none; }

    .connector-stage { grid-template-columns: 1fr; }
    .connector-span svg { height: 72px; }

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

    .arch-node text { font-size: 20px; }
}

@media (max-width: 620px) {
    html { scroll-padding-top: 80px; }
    .header-inner { min-height: 72px; }
    .logo-name { font-size: 16px; }
    .logo-sub { font-size: 8.5px; letter-spacing: .28em; }
    .nav-toggle-text { display: none; }
    .nav-toggle { padding: 10px 12px; }

    .hero { padding-top: 118px; }
    /* Simplified bridge on small screens: fewer strokes, larger label text
       (SVG text is in user units, so it shrinks with the viewBox). */
    .bridge-svg .bg-grid,
    .bridge-svg .hangers,
    .bridge-svg .chip,
    .bridge-svg .span-under { display: none; }
    .bridge-label { font-size: 22px; }
    .bridge-status { font-size: 16px; }
    .hero-cta .btn { width: 100%; }
    .hero-tags { gap: 12px; flex-direction: column; }
    .hero-foot-meta { display: none; }

    .card-grid { grid-template-columns: 1fr; }
    .section-head-row { align-items: flex-start; }

    .footer-nav { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: flex-start; }

    .arch-node text { font-size: 28px; letter-spacing: .1em; }
    .arch-detail-tags li { font-size: 11px; }
    .work-arrow { width: 42px; height: 42px; }
}

/* ---------- 23  REDUCED MOTION & PRINT ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    [data-bridge] .draw { stroke-dashoffset: 0; }
    [data-bridge] .platform,
    [data-bridge] .idea-nodes,
    [data-bridge] .span-nodes,
    [data-bridge] .hangers,
    [data-bridge] .status,
    [data-bridge] .packet { opacity: 1; }
    .intro-bridge .draw,
    .process-line-fill,
    .conn-fill { stroke-dashoffset: 0; }
    .intro-dot { opacity: 1; }
}

@media print {
    .site-header, .nav-scrim, .hero-visual, .connector-span { display: none; }
    body { color: #000; background: #fff; }
    .dark-section, .hero, .site-footer { background: #fff !important; color: #000 !important; }
}
