/* =========================================================
   TEK480 — styles.css
   1. Variables        11. Cards
   2. Reset            12. Architecture visual
   3. Base             13. Portfolio
   4. Typography       14. Capability matrix
   5. Layout           15. Team
   6. Navigation       16. CTA / Contact
   7. Buttons          17. Footer
   8. Hero             18. Animations
   9. Ambient effects  19. Responsive
   10. Sections        20. Reduced motion
========================================================== */

/* ---------- 1. VARIABLES ---------- */
:root {
    --bg-primary: #080B12;
    --bg-secondary: #0D111B;
    --bg-card: #111725;
    --bg-card-hover: #151D2D;

    --text-primary: #F3F5F8;
    --text-secondary: #A6AFBF;
    --text-muted: #697386;

    --purple: #8B5CF6;
    --purple-bright: #A775FF;
    --violet: #6D3DF5;
    --blue: #4F9CF9;
    --green: #2ED8A3;

    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .14);

    --container: 1380px;
    --gutter: 48px;
    --radius: 16px;
    --nav-h: 58px;

    --ease: cubic-bezier(.4, 0, .2, 1);
    --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
img, svg, canvas { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }

/* ---------- 3. BASE ---------- */
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    position: relative;
}

.skip-link {
    position: absolute; left: 12px; top: -60px;
    background: var(--bg-card); color: var(--text-primary);
    padding: 10px 16px; border-radius: 8px; z-index: 200;
    border: 1px solid var(--border-strong);
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* ---------- 4. TYPOGRAPHY ---------- */
.eyebrow {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}

h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }

.accent-purple { color: var(--purple-bright); }
.accent-green  { color: var(--green); }
.accent-blue   { color: var(--blue); }
.accent-violet { color: var(--purple-bright); }

/* ---------- 5. LAYOUT ---------- */
.container {
    width: min(100% - var(--gutter), var(--container));
    margin-inline: auto;
}

.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }

.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 68px); }
.section__title { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 1.1rem; }
.section__lede {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    max-width: 60ch;
}

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.fineprint {
    margin-top: clamp(28px, 4vw, 44px);
    color: var(--text-muted);
    font-size: .92rem;
    max-width: 72ch;
}

.section__actions, .contact__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 6. NAVIGATION ---------- */
.nav {
    position: sticky; top: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex; align-items: center;
    transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
    border-bottom: 1px solid transparent;
}
.nav--scrolled {
    background: rgba(8, 11, 18, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }

.logo-placeholder {
    font-weight: 700; font-size: 1.18rem; letter-spacing: .02em;
    color: var(--text-primary);
}
.logo-placeholder__accent { color: var(--purple-bright); }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
    position: relative;
    font-size: .92rem; color: var(--text-secondary);
    padding: 8px 14px; border-radius: 8px;
    transition: color .18s var(--ease);
}
.nav__link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
    height: 1px; background: var(--purple-bright);
    transform: scaleX(0); transform-origin: left;
    transition: transform .22s var(--ease);
}
.nav__link:hover { color: var(--text-primary); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--text-primary); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta {
    background: rgba(139, 92, 246, .12);
    border: 1px solid rgba(139, 92, 246, .35);
    color: var(--text-primary);
    margin-left: 8px;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: rgba(139, 92, 246, .2); border-color: rgba(139, 92, 246, .55); }

.nav__toggle {
    display: none; width: 44px; height: 44px;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    border-radius: 8px;
}
.nav__toggle span {
    width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px;
    transition: transform .28s var(--ease), opacity .28s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
    position: fixed; inset: 0; z-index: 99;
    background: rgba(8, 11, 18, .96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; flex-direction: column; justify-content: center;
    padding: var(--gutter);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__link {
    font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em;
    padding: 12px 0; color: var(--text-secondary);
    transition: color .18s var(--ease);
}
.mobile-menu__link:hover, .mobile-menu__link:focus-visible { color: var(--text-primary); }
.mobile-menu__cta { color: var(--purple-bright); }
.mobile-menu__sig {
    margin-top: 40px; color: var(--text-muted);
    font-size: .95rem; letter-spacing: .02em;
}

/* ---------- 7. BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 13px 22px; border-radius: 10px;
    font-size: .94rem; font-weight: 500;
    border: 1px solid transparent;
    transition: background .18s var(--ease), border-color .18s var(--ease),
                transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn--primary {
    background: linear-gradient(135deg, var(--violet), var(--purple));
    color: #fff;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, .3), 0 8px 30px -12px rgba(139, 92, 246, .5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(167, 117, 255, .5), 0 14px 40px -14px rgba(139, 92, 246, .7); }
.btn--ghost {
    background: rgba(255, 255, 255, .02);
    border-color: var(--border-strong);
    color: var(--text-primary);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .24); }
.btn--lg { padding: 16px 28px; font-size: 1.02rem; }
.btn__arrow { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- 8. HERO ---------- */
/* ---------- 8. HERO ---------- */
./* ---------- 8. HERO ---------- */
.hero { padding-top: clamp(20px, 3.5vh, 44px); padding-bottom: clamp(60px, 9vw, 120px); position: relative; }
.hero__inner {
    display: grid; grid-template-columns: 1.15fr .85fr;
    gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__title {
    font-size: clamp(2.4rem, 5.2vw, 4.4rem);
    letter-spacing: -.03em; line-height: 1.06;
    margin-bottom: 1.6rem;
    max-width: 16ch;
}
.hero__lede {
    color: var(--text-secondary);
    font-size: clamp(1.02rem, 1.4vw, 1.2rem);
    max-width: 52ch; margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2.4rem; }
.hero__signature {
    font-size: .95rem; color: var(--text-muted);
    letter-spacing: .01em; padding-top: 1.6rem;
    border-top: 1px solid var(--border);
    max-width: 44ch;
}
.hero__signature span { color: var(--text-secondary); }

/* ---------- 12. HERO CONTROL VISUAL ---------- */
.hero__visual { display: flex; justify-content: center; }
.control-visual { width: 100%; max-width: 440px; }
.control-visual__svg { width: 100%; height: auto; overflow: visible; }

.cv-line { stroke: rgba(255, 255, 255, .12); }
.cv-core { fill: rgba(139, 92, 246, .1); stroke: var(--purple-bright); stroke-width: 1.4; }
.cv-core-label { fill: var(--text-primary); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.cv-node circle { fill: var(--bg-card); stroke: var(--border-strong); stroke-width: 1.2; transition: stroke .3s var(--ease); }
.cv-node text { fill: var(--text-secondary); font-size: 12px; font-weight: 500; }
.cv-node .cv-node-sm { font-size: 10px; }
.cv-node[data-accent="purple"] circle { stroke: rgba(139, 92, 246, .55); }
.cv-node[data-accent="violet"] circle { stroke: rgba(109, 61, 245, .6); }
.cv-node[data-accent="green"]  circle { stroke: rgba(46, 216, 163, .5); }
.cv-node[data-accent="blue"]   circle { stroke: rgba(79, 156, 249, .5); }
.cv-signal { fill: var(--purple-bright); opacity: 0; }

.control-visual__legend {
    display: flex; justify-content: space-between;
    margin-top: 20px; padding: 0 4px;
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
}
.control-visual__legend span { color: var(--text-muted); position: relative; padding-left: 14px; }
.control-visual__legend span::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 7px; height: 7px; border-radius: 50%;
}
.control-visual__legend span[data-accent="purple"]::before { background: var(--purple); }
.control-visual__legend span[data-accent="violet"]::before { background: var(--violet); }
.control-visual__legend span[data-accent="green"]::before  { background: var(--green); }
.control-visual__legend span[data-accent="blue"]::before   { background: var(--blue); }

/* ---------- 9. AMBIENT EFFECTS ---------- */
.ambient-gradient {
    position: fixed; inset: -40%; z-index: 0; pointer-events: none;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(115, 65, 255, .04) 42%,
        rgba(139, 92, 246, .16) 50%,
        rgba(115, 65, 255, .04) 58%,
        transparent 70%
    );
    background-size: 260% 260%;
    opacity: 0;
    will-change: transform, opacity;
    animation: diagonalPulse 14s var(--ease) infinite;
}
.ambient-gradient--local { position: absolute; z-index: 0; animation-duration: 12s; }

@keyframes diagonalPulse {
    0%   { opacity: 0;   transform: translate3d(-12%, -12%, 0); }
    28%  { opacity: 0;   transform: translate3d(-6%, -6%, 0); }
    42%  { opacity: .9;  transform: translate3d(0, 0, 0); }
    52%  { opacity: 1;   transform: translate3d(3%, 3%, 0); }
    66%  { opacity: 0;   transform: translate3d(8%, 8%, 0); }
    100% { opacity: 0;   transform: translate3d(12%, 12%, 0); }
}

.ambient-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
    background-image:
        radial-gradient(circle at 15% 12%, rgba(139, 92, 246, .06), transparent 42%),
        radial-gradient(circle at 85% 78%, rgba(79, 156, 249, .05), transparent 46%),
        linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .014) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
    mask-image: radial-gradient(ellipse 120% 100% at 50% 0%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 120% 100% at 50% 0%, #000 30%, transparent 85%);
}

/* Pointer trail canvas */
.pointer-trail {
    position: fixed; inset: 0; z-index: 90; pointer-events: none;
    width: 100%; height: 100%;
}

/* Scroll progress */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 101;
    background: transparent; pointer-events: none;
}
.scroll-progress__bar {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--purple), var(--blue), var(--green));
    transition: width .08s linear;
}

/* keep content above ambient layers */
.nav, main, .footer { position: relative; z-index: 2; }

/* ---------- 10. SECTIONS (backgrounds / continuity) ---------- */
.section--problem { background: linear-gradient(180deg, transparent, rgba(13, 17, 27, .5), transparent); }
.section--principles { background: linear-gradient(180deg, transparent, rgba(13, 17, 27, .4)); }
.section--market { background: linear-gradient(180deg, rgba(13, 17, 27, .4), transparent); }
.section--partner { border-top: 1px solid var(--border); }

/* ---------- 11. CARDS ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(22px, 2.4vw, 30px);
    position: relative;
    transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.card--minimal { background: rgba(255, 255, 255, .015); }
.card__index {
    font-size: .78rem; font-weight: 600; letter-spacing: .1em;
    color: var(--purple-bright); display: block; margin-bottom: 1rem;
}
.card__icon { color: var(--text-secondary); margin-bottom: 1.1rem; }
.card__icon svg { width: 40px; height: 40px; }
.card__kicker { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .5rem; }
.card__title { font-size: 1.18rem; margin-bottom: .6rem; }
.card__body { color: var(--text-secondary); font-size: .96rem; }

.card[data-accent="purple"]:hover { border-color: rgba(139, 92, 246, .4); }
.card[data-accent="green"]:hover  { border-color: rgba(46, 216, 163, .4); }
.card[data-accent="blue"]:hover   { border-color: rgba(79, 156, 249, .4); }
.card[data-accent="purple"] .card__kicker { color: var(--purple-bright); }
.card[data-accent="green"] .card__kicker  { color: var(--green); }
.card[data-accent="blue"] .card__kicker   { color: var(--blue); }

.card--principle { background: rgba(255, 255, 255, .015); }

/* Thesis bar */
.thesis-bar {
    margin-top: clamp(40px, 5vw, 64px);
    display: flex; flex-wrap: wrap;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(139, 92, 246, .06), rgba(79, 156, 249, .04));
    overflow: hidden;
}
.thesis-bar__seg {
    flex: 1 1 220px; padding: clamp(20px, 3vw, 30px);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem); font-weight: 600; letter-spacing: -.01em;
    border-right: 1px solid var(--border);
}
.thesis-bar__seg:last-child { border-right: none; }

/* ---------- 12. ARCHITECTURE VISUAL ---------- */
.arch { max-width: 900px; margin: 0 auto; }
.arch__svg { width: 100%; height: auto; overflow: visible; }
.arch__path {
    stroke: rgba(255, 255, 255, .16);
    stroke-dasharray: 1200; stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.4s var(--ease);
}
.arch.is-drawn .arch__path { stroke-dashoffset: 0; }
.arch__node rect { fill: var(--bg-card); stroke: var(--border-strong); stroke-width: 1.2; }
.arch__node text { fill: var(--text-primary); font-size: 15px; font-weight: 600; }
.arch__node--core rect { stroke: var(--purple-bright); fill: rgba(139, 92, 246, .08); }
.arch__lbl { fill: var(--text-primary); font-size: 15px; font-weight: 600; }
.arch__sub { fill: var(--text-muted); font-size: 12px; font-weight: 500; }
.arch__node[data-accent="purple"] rect { stroke: rgba(139, 92, 246, .5); }
.arch__node[data-accent="violet"] rect { stroke: rgba(109, 61, 245, .55); }
.arch__node[data-accent="green"]  rect { stroke: rgba(46, 216, 163, .45); }
.arch__node[data-accent="blue"]   rect { stroke: rgba(79, 156, 249, .45); }
.arch__caption { text-align: center; color: var(--text-muted); font-size: .88rem; margin-top: 20px; }

/* ---------- 13. PORTFOLIO ---------- */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(26px, 3vw, 38px);
    position: relative; overflow: hidden;
    transition: border-color .24s var(--ease), transform .24s var(--ease), box-shadow .24s var(--ease);
}
.product-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    opacity: 0; transition: opacity .24s var(--ease); pointer-events: none;
}
.product-card:hover { transform: translateY(-3px); }
.product-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.product-card__icon { color: var(--text-secondary); transition: color .24s var(--ease); }
.product-card__icon svg { width: 44px; height: 44px; }
.product-card__tag {
    font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
    padding: 6px 10px; border-radius: 6px;
    border: 1px solid var(--border); color: var(--text-muted);
    transition: color .24s var(--ease), border-color .24s var(--ease);
}
.product-card__title { font-size: 1.4rem; margin-bottom: .2rem; }
.product-card__subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; }
.product-card__body { color: var(--text-secondary); font-size: .98rem; margin-bottom: 1.4rem; max-width: 48ch; }
.product-card__points { display: flex; flex-direction: column; gap: 8px; }
.product-card__points li {
    font-size: .88rem; color: var(--text-secondary);
    padding-left: 20px; position: relative;
}
.product-card__points li::before {
    content: ""; position: absolute; left: 0; top: .62em;
    width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8;
}

/* accent theming */
.product-card[data-accent="purple"] { --c: var(--purple); --cb: var(--purple-bright); }
.product-card[data-accent="violet"] { --c: var(--violet); --cb: var(--purple-bright); }
.product-card[data-accent="green"]  { --c: var(--green);  --cb: var(--green); }
.product-card[data-accent="blue"]   { --c: var(--blue);   --cb: var(--blue); }
.product-card:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 20px 50px -30px var(--c); }
.product-card:hover .product-card__icon { color: var(--cb); }
.product-card:hover .product-card__tag { color: var(--cb); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.product-card__points li { color: var(--text-secondary); }
.product-card .product-card__points li::before { background: var(--c); }

/* ---------- 14. CAPABILITY MATRIX ---------- */
.matrix {
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    background: rgba(255, 255, 255, .012);
}
.matrix__row {
    display: grid; grid-template-columns: 2fr repeat(5, 1fr);
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.matrix__row:last-child { border-bottom: none; }
.matrix__row > span { padding: 16px 18px; text-align: center; font-size: .92rem; }
.matrix__cap { text-align: left !important; color: var(--text-secondary); font-weight: 500; }
.matrix__row--head > span { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.matrix__row--head { background: rgba(255, 255, 255, .02); }
.matrix__tek { background: rgba(139, 92, 246, .06); font-weight: 600; }
.matrix__row > span em { display: none; }
.dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    border: 1px solid var(--border-strong); background: transparent;
}
.matrix__row > span[data-on] .dot { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 10px -1px rgba(139, 92, 246, .6); }
.matrix__tek[data-on] .dot { background: var(--purple-bright); border-color: var(--purple-bright); }

/* ---------- 15. STATS / ENGINEERING ---------- */
.stat {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: clamp(22px, 2.6vw, 30px);
    background: rgba(255, 255, 255, .015);
}
.stat__num {
    display: block; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600;
    letter-spacing: -.02em; color: var(--text-primary); margin-bottom: .5rem;
    background: linear-gradient(120deg, var(--text-primary), var(--purple-bright));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { color: var(--text-secondary); font-size: .92rem; }

/* ---------- 15b. TEAM ---------- */
.team-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: clamp(24px, 2.6vw, 32px);
    background: var(--bg-card);
    transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.team-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
/* Replace .team-card__avatar text with <img class="team-card__avatar"> headshot when supplied */
.team-card__avatar {
    width: 60px; height: 60px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1.15rem; letter-spacing: .02em;
    color: var(--purple-bright);
    background: linear-gradient(135deg, rgba(139, 92, 246, .14), rgba(79, 156, 249, .1));
    border: 1px solid var(--border-strong);
    margin-bottom: 1.2rem; object-fit: cover;
}
.team-card__name { font-size: 1.14rem; margin-bottom: .25rem; }
.team-card__role { color: var(--purple-bright); font-size: .86rem; font-weight: 500; margin-bottom: .8rem; }
.team-card__desc { color: var(--text-secondary); font-size: .9rem; }

/* ---------- 16. CTA / CONTACT ---------- */
.section--contact { overflow: hidden; text-align: center; }
.contact { position: relative; z-index: 2; max-width: 760px; margin-inline: auto; }
.contact__title { font-size: clamp(1.9rem, 4.2vw, 3.2rem); margin: 0 auto 1.4rem; }
.contact__sig { color: var(--text-secondary); font-size: clamp(1rem, 1.6vw, 1.2rem); margin-bottom: 2.4rem; }
.contact__actions { justify-content: center; margin-bottom: 2rem; }
.contact__domain {
    display: inline-block; color: var(--text-muted); font-size: .95rem;
    letter-spacing: .04em; transition: color .18s var(--ease);
}
.contact__domain:hover { color: var(--text-secondary); }

.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--bg-card); border: 1px solid var(--border-strong);
    color: var(--text-primary); padding: 12px 22px; border-radius: 10px;
    font-size: .9rem; z-index: 150;
    opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, .6);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.section--partner .section__title { max-width: 20ch; }
.section--partner .section__actions { margin-top: 8px; }

/* ---------- 17. FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding: clamp(48px, 6vw, 72px) 0 32px; background: var(--bg-secondary); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer__tag { color: var(--text-secondary); font-size: .95rem; margin: .8rem 0 .4rem; }
.footer__sig { color: var(--text-muted); font-size: .88rem; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--text-secondary); font-size: .92rem; transition: color .18s var(--ease); }
.footer__links a:hover { color: var(--text-primary); }
.footer__legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer__legal p { color: var(--text-muted); font-size: .84rem; }

/* ---------- 18. ANIMATIONS (reveal) ---------- */
.reveal { opacity: 0; transform: translateY(22px); filter: blur(2px); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* signal travel keyframes are applied via JS timing; base opacity handled inline by JS */

/* ---------- 19. RESPONSIVE ---------- */
@media (max-width: 1100px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__visual { order: 2; max-width: 400px; margin-top: 12px; }
    .hero__title { max-width: 20ch; }
}

@media (max-width: 900px) {
    :root { --gutter: 32px; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .nav__links { display: none; }
    .nav__toggle { display: flex; }
}

@media (max-width: 680px) {
    :root { --gutter: 24px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .team.grid--3 { grid-template-columns: 1fr; }
    .hero__actions .btn, .section__actions .btn, .contact__actions .btn { flex: 1 1 auto; justify-content: center; }
    .thesis-bar__seg { flex: 1 1 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .thesis-bar__seg:last-child { border-bottom: none; }

    /* Matrix -> stacked cards */
    .matrix { border: none; background: none; display: grid; gap: 14px; }
    .matrix__row--head { display: none; }
    .matrix__row {
        display: block; border: 1px solid var(--border); border-radius: var(--radius);
        background: rgba(255, 255, 255, .015); padding: 6px 4px;
    }
    .matrix__row > span { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 16px; text-align: left; }
    .matrix__cap { font-size: 1rem !important; font-weight: 600 !important; color: var(--text-primary) !important; border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 12px !important; }
    .matrix__row > span:not(.matrix__cap) em { display: inline; color: var(--text-secondary); font-style: normal; font-size: .9rem; }
    .matrix__row > span:not([data-on]):not(.matrix__cap) { opacity: .4; }
    .matrix__tek { background: transparent; }
    .matrix__tek[data-on] em { color: var(--purple-bright); font-weight: 600; }
}

@media (min-width: 1600px) {
    :root { --container: 1440px; }
}

/* ---------- 20. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .ambient-gradient { display: none; }
    .pointer-trail { display: none; }
    .reveal { opacity: 1; transform: none; filter: none; }
    .arch__path { stroke-dashoffset: 0; }
    .btn:hover, .product-card:hover, .team-card:hover, .card:hover { transform: none; }
    .back-to-top { transition: none; }
}

/* =========================================================
   BACK TO TOP
========================================================== */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 120;
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--bg-card, rgba(13, 17, 27, .85));
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .28s var(--ease), transform .28s var(--ease),
                visibility .28s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: rgba(139, 92, 246, .55); background: rgba(139, 92, 246, .18); }
.back-to-top:focus-visible { outline: 2px solid var(--purple-bright); outline-offset: 3px; }

@media (max-width: 640px) {
    .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

/* =========================================================
   LEGAL PAGES (terms.html / privacy.html)
========================================================== */
.legal { padding: clamp(96px, 12vw, 140px) 0 clamp(56px, 7vw, 88px); }
.legal__inner { max-width: 820px; margin-inline: auto; }
.legal__title { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: .6rem; }
.legal__updated { color: var(--text-muted); font-size: .9rem; margin-bottom: 2.4rem; }
.legal h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); letter-spacing: -.01em; margin: 2.4rem 0 .8rem; }
.legal h3 { font-size: 1.05rem; margin: 1.6rem 0 .6rem; color: var(--text-primary); }
.legal p, .legal li { color: var(--text-secondary); line-height: 1.7; font-size: 1rem; }
.legal p { margin-bottom: 1rem; }
.legal ul { margin: 0 0 1.2rem 1.2rem; }
.legal li { margin-bottom: .5rem; }
.legal a { color: var(--purple-bright); }
.legal a:hover { text-decoration: underline; }
.legal__contact { margin-top: 2.6rem; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-secondary); }
.legal__contact p { margin-bottom: .35rem; font-size: .95rem; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 2.8rem; color: var(--text-secondary); font-size: .95rem; }
.legal__back:hover { color: var(--text-primary); }
