/* ========================================
   Alexandre Rosa — Portfolio
   Design System: Linear / Vercel / Raycast
   Animation Tier: Premium
   ======================================== */

/* --- Tokens --- */

:root {
    --bg: #060b11;
    --surface: #0c1520;
    --surface-2: #111d2b;
    --surface-3: #162436;
    --border: rgba(255, 255, 255, 0.06);
    --border-2: rgba(255, 255, 255, 0.10);
    --border-3: rgba(255, 255, 255, 0.16);
    --text: #e8edf3;
    --text-2: #8896a7;
    --text-3: #5c6b7d;
    --accent: #c49379;
    --accent-light: #e2b59e;
    --accent-glow: rgba(196, 147, 121, 0.12);
    --accent-glow-strong: rgba(196, 147, 121, 0.28);
    --radius-sm: 1.2rem;
    --radius-md: 1.6rem;
    --radius-lg: 2.4rem;
    --radius-xl: 3.2rem;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --container: 116rem;
}

/* --- Reset --- */

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: 10rem;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.6rem;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
button, input { font: inherit; border: none; background: none; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

::selection { color: var(--bg); background: var(--accent-light); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- Utilities --- */

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #f0d0b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title,
.section-head h2,
.contact-copy h2 {
    text-wrap: balance;
}

.hero-lead,
.about-desc,
.bento-card p,
.step-content p,
.accordion-body > p,
.contact-copy p,
.contact-card-inner p,
.footer span,
.footer a {
    text-wrap: pretty;
}

/* --- Noise Overlay --- */

.noise {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.028;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* --- Scroll Progress --- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.2rem;
    z-index: 1100;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% 100%;
    animation: progressShimmer 3s linear infinite;
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
}

@keyframes progressShimmer {
    to { background-position: -200% 0; }
}

/* --- Parallax Scene --- */

.parallax-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    inset: -12%;
    will-change: transform;
    transition: transform 0.08s linear;
}

.parallax-layer--grid {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 8rem 8rem;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

.parallax-layer--glow {
    background:
        radial-gradient(circle at 20% 20%, rgba(196, 147, 121, 0.07), transparent 45%),
        radial-gradient(circle at 80% 60%, rgba(100, 140, 200, 0.05), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(196, 147, 121, 0.04), transparent 35%);
    filter: blur(0.4rem);
    animation: glowBreathe 8s ease-in-out infinite alternate;
}

.parallax-layer--sacred {
    background-image:
        radial-gradient(circle at center, rgba(196, 147, 121, 0.08) 0 1px, transparent 1px),
        radial-gradient(circle at center, rgba(196, 147, 121, 0.05) 0 1px, transparent 1px);
    background-size: 21rem 21rem, 34rem 34rem;
    background-position: 0 0, 10rem 8rem;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 22%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 22%, transparent 78%);
    opacity: 0.34;
    animation: sacredPulse 12s ease-in-out infinite alternate;
}

.parallax-layer--orbit {
    background:
        radial-gradient(circle at 22% 24%, rgba(196, 147, 121, 0.08) 0, rgba(196, 147, 121, 0.02) 24%, transparent 44%),
        radial-gradient(circle at 78% 68%, rgba(196, 147, 121, 0.06) 0, rgba(196, 147, 121, 0.01) 22%, transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(226, 181, 158, 0.06) 0, transparent 26%);
    mix-blend-mode: screen;
    opacity: 0.3;
    filter: blur(0.2rem);
    animation: orbitDrift 26s linear infinite;
}

@keyframes glowBreathe {
    0%   { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes sacredPulse {
    0% { opacity: 0.18; transform: scale(0.98); }
    100% { opacity: 0.34; transform: scale(1.02); }
}

@keyframes orbitDrift {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(360deg) scale(1.04); }
}

/* --- Pointer Orb --- */

.pointer-orb {
    position: fixed;
    width: 50rem;
    height: 50rem;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 147, 121, 0.07) 0%, rgba(196, 147, 121, 0.02) 40%, transparent 70%);
    filter: blur(3rem);
    transform: translate3d(-50%, -50%, 0);
    will-change: transform;
}

/* --- Layout --- */

main { position: relative; z-index: 1; }

section {
    position: relative;
    width: min(calc(100% - 6rem), var(--container));
    margin: 0 auto;
    padding: 12rem 0;
}

/* --- Skip Link --- */

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1200;
    padding: 1rem 1.6rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

/* --- Floating WhatsApp --- */

.whatsapp-float {
    position: fixed;
    right: 2.4rem;
    bottom: 2.4rem;
    z-index: 920;
    display: grid;
    place-items: center;
    width: 5.6rem;
    height: 5.6rem;
    border-radius: 50%;
    background: linear-gradient(180deg, #28d161 0%, #1faa4a 100%);
    color: #ffffff;
    font-size: 2.4rem;
    box-shadow: 0 1.2rem 3rem rgba(24, 170, 73, 0.34);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s var(--ease);
    will-change: transform;
    isolation: isolate;
}

.whatsapp-float::before,
.whatsapp-float::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: -1;
}

.whatsapp-float::before {
    background: radial-gradient(circle, rgba(37, 211, 102, 0.34) 0%, rgba(37, 211, 102, 0) 72%);
    transform: scale(1.18);
    opacity: 0.9;
}

.whatsapp-float::after {
    border: 1px solid rgba(77, 255, 145, 0.7);
    opacity: 0;
    animation: whatsappPulse 2.2s ease-out infinite;
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 1.6rem 3.6rem rgba(24, 170, 73, 0.42);
    filter: saturate(1.08);
}

@keyframes whatsappPulse {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    75% {
        opacity: 0;
        transform: scale(1.38);
    }
    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

/* --- Labels --- */

.kicker,
.eyebrow,
.contact-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--accent-light);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.eyebrow::before {
    content: '';
    width: 2.4rem;
    height: 1px;
    background: var(--accent);
}

/* --- Section Head --- */

.section-head { max-width: 72rem; margin-bottom: 6rem; }

.section-head h2 {
    margin-top: 1.6rem;
    font-size: clamp(3.2rem, 4vw, 5.4rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.section-head p {
    margin-top: 1.6rem;
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--text-2);
}

/* --- Buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.4rem 2.4rem;
    min-height: 5.2rem;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    font-size: 1.4rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.4s var(--ease);
    will-change: transform;
}

.btn-primary {
    border-color: transparent;
    color: var(--bg);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: 0 0 0 0 var(--accent-glow), 0 1rem 3rem rgba(196, 147, 121, 0.15);
}

.btn-primary:hover {
    box-shadow: 0 0 50px var(--accent-glow-strong), 0 1.4rem 4.5rem rgba(196, 147, 121, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-lg {
    padding: 1.8rem 3.2rem;
    min-height: 5.8rem;
    font-size: 1.6rem;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    position: fixed;
    top: 1.6rem;
    left: 50%;
    width: min(calc(100% - 3rem), calc(var(--container) + 2rem));
    transform: translateX(-50%) translateY(-120%);
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 1.4rem;
    z-index: 1000;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(6, 11, 17, 0.6);
    backdrop-filter: blur(2rem) saturate(1.2);
    -webkit-backdrop-filter: blur(2rem) saturate(1.2);
    transition:
        background 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

body.loaded .header {
    transform: translateX(-50%) translateY(0);
    transition:
        transform 0.9s var(--ease),
        background 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.header.sticky {
    background: rgba(6, 11, 17, 0.92);
    border-color: var(--border-2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo { display: flex; align-items: center; gap: 1.2rem; }

.logo-badge {
    display: grid;
    place-items: center;
    width: 4.4rem;
    height: 4.4rem;
    padding: 0.4rem;
    border: 1px solid var(--border-2);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.04);
}

.logo-text { display: flex; flex-direction: column; gap: 0.1rem; }
.logo-text strong { font-size: 1.5rem; letter-spacing: -0.02em; }

.logo-text span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--text-3);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.navbar a {
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.25s ease;
}

.navbar a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.navbar a.active {
    color: var(--accent-light);
    background: rgba(196, 147, 121, 0.08);
}

.header-cta {
    margin-left: 0.8rem;
    padding: 1rem 1.8rem;
    min-height: unset;
    font-size: 1.3rem;
}

.menu-btn {
    display: none;
    margin-left: auto;
    font-size: 1.8rem;
    color: var(--text);
    cursor: pointer;
}

/* ========================================
   HERO
   ======================================== */

.hero {
    padding-top: 16rem;
    padding-bottom: 6rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100rem;
    height: 70rem;
    background: radial-gradient(circle, rgba(196, 147, 121, 0.06) 0%, transparent 60%);
    pointer-events: none;
    animation: glowBreathe 8s ease-in-out infinite alternate;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-copy { position: relative; z-index: 1; }

/* --- Hero Entrance Orchestration --- */

.hero-copy .eyebrow,
.hero-copy .hero-lead,
.hero-copy .hero-actions {
    opacity: 0;
    transform: translateY(2.4rem);
    filter: blur(6px);
}

body.loaded .hero-copy .eyebrow {
    animation: heroFadeUp 0.9s var(--ease) 0.15s forwards;
}

body.loaded .hero-copy .hero-lead {
    animation: heroFadeUp 0.9s var(--ease) 0.65s forwards;
}

body.loaded .hero-copy .hero-actions {
    animation: heroFadeUp 0.9s var(--ease) 0.85s forwards;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: none;
        filter: blur(0);
    }
}

/* --- Hero Title Word Animation --- */

.hero-title {
    margin-top: 2.4rem;
    font-size: clamp(4rem, 5.5vw, 7.2rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.word-inner {
    display: inline-block;
    transform: translateY(115%);
    transition: transform 0.8s var(--ease);
    will-change: transform;
}

body.loaded .word-inner {
    transform: translateY(0);
    transition-delay: calc(var(--word-i, 0) * 0.07s + 0.25s);
}

/* --- Hero subtitle (text-gradient words) --- */

.word-inner.is-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, #f0d0b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    margin-top: 2.4rem;
    max-width: 48rem;
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--text-2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 3.6rem;
}

.hero-aside {
    position: relative;
    display: grid;
    justify-items: end;
}

.hermetic-triad {
    --phi: 1.618033989;
    --phi-step: 0.618s;
    --phi-cycle: calc(var(--phi-step) * 16.18);
    margin: 0;
    width: min(100%, 52rem);
    aspect-ratio: var(--phi);
    padding: clamp(1.8rem, 2.2vw, 2.8rem);
    display: grid;
    place-items: center;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(11, 18, 29, 0.95), rgba(8, 13, 20, 0.84));
    box-shadow:
        0 0 0 1px var(--border),
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 0 90px rgba(196, 147, 121, 0.08);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
}

.triad-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 26rem;
    margin: 0 auto;
    isolation: isolate;
    --p-top-x: 50%;
    --p-top-y: 24%;
    --p-left-x: 24%;
    --p-left-y: 69%;
    --p-right-x: 76%;
    --p-right-y: 69%;
    --edge-size: 52%;
}

.phi-architecture {
    position: absolute;
    inset: 8% 8%;
    pointer-events: none;
    --arch-w: 74%;
    --arch-h: calc(var(--arch-w) / var(--phi));
}

.arch-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(198, 162, 139, 0.22);
    opacity: 0;
    transform-origin: center;
    filter: drop-shadow(0 0 6px rgba(198, 162, 139, 0.18));
}

.arch-square { border-radius: 0.2rem; }
.arch-circle { border-radius: 50%; }

.arch-square--1 {
    width: var(--arch-w);
    height: var(--arch-h);
    animation: archSquareCycle var(--phi-cycle) linear infinite;
}

.arch-square--2 {
    width: calc(var(--arch-w) / var(--phi));
    height: calc(var(--arch-h) / var(--phi));
    animation: archSquareCycle var(--phi-cycle) linear infinite;
    animation-delay: calc(var(--phi-step) * 1.618);
}

.arch-square--3 {
    width: calc(var(--arch-w) / (var(--phi) * var(--phi)));
    height: calc(var(--arch-h) / (var(--phi) * var(--phi)));
    animation: archSquareCycle var(--phi-cycle) linear infinite;
    animation-delay: calc(var(--phi-step) * 3.236);
}

.arch-diamond--1 {
    width: calc(var(--arch-w) * 0.84);
    height: calc(var(--arch-h) * 0.84);
    animation: archDiamondCycle var(--phi-cycle) linear infinite;
}

.arch-diamond--2 {
    width: calc((var(--arch-w) * 0.84) / var(--phi));
    height: calc((var(--arch-h) * 0.84) / var(--phi));
    animation: archDiamondCycle var(--phi-cycle) linear infinite;
    animation-delay: calc(var(--phi-step) * 2.618);
}

.arch-circle--1 {
    width: 56%;
    aspect-ratio: 1 / 1;
    animation: archCircleCycle var(--phi-cycle) linear infinite;
    animation-delay: calc(var(--phi-step) * 2);
}

.phi-genesis {
    position: absolute;
    inset: 8% 10%;
    pointer-events: none;
    z-index: 2;
}

.phi-origin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe8da 0%, #d9a98b 65%, #8b6550 100%);
    box-shadow: 0 0 18px rgba(206, 155, 127, 0.9);
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
    animation: phiOriginCycle var(--phi-cycle) linear infinite;
}

.phi-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(196, 147, 121, 0.36);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(196, 147, 121, 0.24));
}

.phi-ring--1 {
    width: 64%;
    height: 64%;
    animation: phiRingCycleA var(--phi-cycle) linear infinite;
}

.phi-ring--2 {
    width: 39.55%;
    height: 39.55%;
    animation: phiRingCycleB var(--phi-cycle) linear infinite;
}

.phi-ring--3 {
    width: 24.45%;
    height: 24.45%;
    animation: phiRingCycleC var(--phi-cycle) linear infinite;
}

.phi-spiral {
    position: absolute;
    inset: 12%;
    width: 76%;
    height: 76%;
    opacity: 0;
}

.phi-spiral path {
    fill: none;
    stroke: rgba(213, 170, 146, 0.24);
    stroke-width: 0.9;
    stroke-linecap: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    filter: drop-shadow(0 0 4px rgba(213, 170, 146, 0.18));
    animation: phiSpiralCycle var(--phi-cycle) linear infinite;
}

.phi-fibonacci {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

.fib-square {
    fill: none;
    stroke: rgba(192, 162, 142, 0.09);
    stroke-width: 0.8;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    animation: fibSquareCycle var(--phi-cycle) linear infinite;
    animation-delay: var(--delay, 0s);
}

.fib-arc {
    fill: none;
    stroke: rgba(230, 191, 168, 0.34);
    stroke-width: 0.95;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 4px rgba(214, 173, 149, 0.22));
    opacity: 0;
    animation: fibArcCycle var(--phi-cycle) linear infinite;
    animation-delay: var(--delay, 0s);
}

.triad-edge {
    position: relative;
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 147, 121, 0.62), transparent);
    filter: drop-shadow(0 0 10px rgba(196, 147, 121, 0.45));
    transform-origin: left center;
    opacity: 0;
    z-index: 5;
}

.triad-edge--left,
.triad-edge--right,
.triad-edge--base {
    position: absolute;
    width: var(--edge-size);
    top: var(--p-left-y);
    left: var(--p-left-x);
}

.triad-edge--left {
    top: var(--p-top-y);
    left: var(--p-top-x);
    --edge-transform: rotate(120deg);
    transform: var(--edge-transform) scaleX(0);
    animation: triadEdgeLeftCycle var(--phi-cycle) linear infinite;
}
.triad-edge--right {
    top: var(--p-top-y);
    left: var(--p-top-x);
    --edge-transform: rotate(60deg);
    transform: var(--edge-transform) scaleX(0);
    animation: triadEdgeRightCycle var(--phi-cycle) linear infinite;
}
.triad-edge--base {
    --edge-transform: rotate(0deg);
    transform: var(--edge-transform) scaleX(0);
    animation: triadEdgeBaseCycle var(--phi-cycle) linear infinite;
}

.triad-point {
    position: absolute;
    display: grid;
    place-items: center;
    text-align: center;
    opacity: 0;
    z-index: 6;
}

.triad-point--top {
    top: var(--p-top-y);
    left: var(--p-top-x);
    transform: translateX(-50%) scale(0.2);
    animation: triadPointTopCycle var(--phi-cycle) linear infinite;
}
.triad-point--left {
    top: var(--p-left-y);
    left: var(--p-left-x);
    transform: translate(-50%, -50%) scale(0.2);
    animation: triadPointLeftCycle var(--phi-cycle) linear infinite;
}
.triad-point--right {
    top: var(--p-right-y);
    left: var(--p-right-x);
    transform: translate(-50%, -50%) scale(0.2);
    animation: triadPointRightCycle var(--phi-cycle) linear infinite;
}

.triad-dot {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffe9dc 0%, #f0c0a4 45%, #c49379 100%);
    box-shadow:
        0 0 0 4px rgba(196, 147, 121, 0.18),
        0 0 16px rgba(196, 147, 121, 0.9),
        0 0 32px rgba(196, 147, 121, 0.5);
    animation: triadPulseCycle var(--phi-cycle) ease-in-out infinite;
}

.triad-name {
    margin-top: 1rem;
    font-size: clamp(0.95rem, 0.3vw + 0.85rem, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(225, 231, 240, 0.92);
    font-family: 'IBM Plex Mono', monospace;
    text-shadow: 0 0 12px rgba(9, 15, 24, 0.95);
}

@keyframes phiOriginCycle {
    0%, 4% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.35); }
    18% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    48% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.84); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
}

@keyframes archSquareCycle {
    0%, 12% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.62);
    }
    26% {
        opacity: 0.32;
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    44% {
        opacity: 0.16;
        transform: translate(-50%, -50%) rotate(0deg) scale(1.06);
    }
    58% {
        opacity: 0.08;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.96);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.62);
    }
}

@keyframes archDiamondCycle {
    0%, 20% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(45deg) scale(0.65);
    }
    36% {
        opacity: 0.34;
        transform: translate(-50%, -50%) rotate(45deg) scale(1);
    }
    54% {
        opacity: 0.14;
        transform: translate(-50%, -50%) rotate(45deg) scale(1.08);
    }
    66% {
        opacity: 0.08;
        transform: translate(-50%, -50%) rotate(45deg) scale(0.95);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(45deg) scale(0.65);
    }
}

@keyframes archCircleCycle {
    0%, 16% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }
    32% {
        opacity: 0.24;
        transform: translate(-50%, -50%) scale(1);
    }
    48% {
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }
}

@keyframes fibSquareCycle {
    0%, 26% {
        opacity: 0;
        stroke-dashoffset: 1;
    }
    34%, 72% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fibArcCycle {
    0%, 28% {
        opacity: 0;
        stroke-dashoffset: var(--len, 300);
    }
    38% {
        opacity: 0.45;
    }
    54%, 82% {
        opacity: 0.38;
        stroke-dashoffset: 0;
    }
    100% {
        opacity: 0;
        stroke-dashoffset: var(--len, 300);
    }
}

@keyframes phiRingCycleA {
    0%, 10% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
    26% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
    52% { opacity: 0.12; transform: translate(-50%, -50%) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
}

@keyframes phiRingCycleB {
    0%, 18% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
    34% { opacity: 0.52; transform: translate(-50%, -50%) scale(1); }
    58% { opacity: 0.1; transform: translate(-50%, -50%) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
}

@keyframes phiRingCycleC {
    0%, 26% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
    42% { opacity: 0.48; transform: translate(-50%, -50%) scale(1); }
    62% { opacity: 0.08; transform: translate(-50%, -50%) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
}

@keyframes phiSpiralCycle {
    0%, 16% { opacity: 0; stroke-dashoffset: 220; }
    34% { opacity: 0.85; stroke-dashoffset: 110; }
    52% { opacity: 0.32; stroke-dashoffset: 0; }
    100% { opacity: 0; stroke-dashoffset: 220; }
}

@keyframes triadPointTopCycle {
    0%, 18% { opacity: 0; transform: translateX(-50%) scale(0.2); }
    26% { opacity: 1; transform: translateX(-50%) scale(1.12); }
    32%, 88% { opacity: 1; transform: translateX(-50%) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) scale(0.2); }
}

@keyframes triadPointLeftCycle {
    0%, 34% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    42% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
    48%, 88% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes triadPointRightCycle {
    0%, 54% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    62% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
    68%, 88% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
}

@keyframes triadEdgeLeftCycle {
    0%, 40% { opacity: 0; transform: var(--edge-transform) scaleX(0); }
    56%, 88% { opacity: 1; transform: var(--edge-transform) scaleX(1); }
    100% { opacity: 0; transform: var(--edge-transform) scaleX(0); }
}

@keyframes triadEdgeBaseCycle {
    0%, 66% { opacity: 0; transform: var(--edge-transform) scaleX(0); }
    82%, 88% { opacity: 1; transform: var(--edge-transform) scaleX(1); }
    100% { opacity: 0; transform: var(--edge-transform) scaleX(0); }
}

@keyframes triadEdgeRightCycle {
    0%, 66% { opacity: 0; transform: var(--edge-transform) scaleX(0); }
    82%, 88% { opacity: 1; transform: var(--edge-transform) scaleX(1); }
    100% { opacity: 0; transform: var(--edge-transform) scaleX(0); }
}

@keyframes triadPulseCycle {
    0%, 74% {
        transform: scale(1);
        filter: brightness(1);
    }
    82% {
        transform: scale(1.2);
        filter: brightness(1.22);
    }
    88% {
        transform: scale(1.06);
        filter: brightness(1.08);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

/* ========================================
   MARQUEE
   ======================================== */

.marquee {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
    will-change: transform;
}

.marquee-track span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-3);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.12rem;
    transition: color 0.3s ease;
}

@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* ========================================
   ABOUT / METRICS
   ======================================== */

.about { text-align: center; }
.about .section-head { margin-left: auto; margin-right: auto; }

.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.metric {
    position: relative;
    padding: 4rem 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    text-align: center;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.metric::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--accent-glow), transparent 55%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.metric:hover::before { opacity: 1; }

.metric:hover {
    border-color: var(--border-3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 60px var(--accent-glow);
}

.metric-value {
    position: relative;
    display: block;
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(180deg, var(--text), var(--text-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    position: relative;
    display: block;
    margin-top: 1.2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--text-3);
}

.about-desc {
    max-width: 68rem;
    margin: 4rem auto 0;
    font-size: 1.8rem;
    line-height: 1.7;
    color: var(--text-2);
}

/* ========================================
   BENTO GRID (SERVICES)
   ======================================== */

.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1.6rem;
}

.bento-card {
    position: relative;
    padding: 3.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    transition: border-color 0.4s ease, box-shadow 0.5s ease;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--accent-glow), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.bento-card:hover::before { opacity: 1; }

.bento-card:hover {
    border-color: var(--border-3);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), 0 0 100px var(--accent-glow);
}

.bento-featured {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(180deg, rgba(196, 147, 121, 0.03), transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.bento-glow {
    position: absolute;
    top: -20%;
    right: -20%;
    width: 50rem;
    height: 50rem;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
    filter: blur(4rem);
    animation: glowBreathe 8s ease-in-out infinite alternate;
}

.bento-card i {
    position: relative;
    display: grid;
    place-items: center;
    width: 4.8rem;
    height: 4.8rem;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    background: var(--accent-glow);
    color: var(--accent-light);
    font-size: 1.8rem;
    transition: all 0.4s var(--ease);
}

.bento-card:hover i {
    box-shadow: 0 0 30px var(--accent-glow-strong);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.bento-card h3 {
    position: relative;
    margin-top: 2rem;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.bento-card p {
    position: relative;
    margin-top: 1rem;
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-2);
}

/* ========================================
   TIMELINE (METHOD)
   ======================================== */

.timeline {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    gap: 3.2rem;
}

.timeline-line {
    position: absolute;
    left: 4.1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-line-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--accent), var(--accent-light));
    border-radius: 999px;
    box-shadow: 0 0 12px var(--accent-glow-strong);
    transition: height 0.08s linear;
}

.timeline-step {
    display: grid;
    grid-template-columns: 8.2rem 1fr;
    gap: 3.2rem;
    align-items: start;
}

.step-marker {
    display: grid;
    place-items: center;
    width: 8.2rem;
    height: 8.2rem;
    border: 2px solid var(--border-2);
    border-radius: 50%;
    background: var(--surface);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent-light);
    transition: all 0.5s var(--ease);
    z-index: 1;
}

.step-marker.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow-strong), 0 0 80px var(--accent-glow);
    transform: scale(1.1);
}

.timeline-step:hover .step-marker {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow-strong);
    transform: scale(1.08);
}

.step-content { padding: 2.4rem 0; }

.step-content h3 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.step-content p {
    margin-top: 1.2rem;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-2);
}

/* ========================================
   ACCORDION (SOLUTIONS)
   ======================================== */

.accordion {
    max-width: 84rem;
    margin: 0 auto;
    display: grid;
    gap: 1.2rem;
}

.accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
    overflow: hidden;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.accordion-item.is-open {
    border-color: var(--border-3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 60px var(--accent-glow);
}

.accordion-trigger {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding: 2.4rem 3rem;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background 0.3s ease;
}

.accordion-trigger:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-light);
    min-width: 3rem;
}

.accordion-title { font-size: 1.8rem; font-weight: 600; flex: 1; }

.accordion-tags { display: flex; gap: 0.8rem; }

.accordion-tags span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    color: var(--text-3);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.accordion-item.is-open .accordion-tags span {
    border-color: var(--border-3);
    color: var(--text-2);
}

.accordion-icon {
    font-size: 1.4rem;
    color: var(--text-3);
    transition: transform 0.5s var(--ease);
}

.accordion-item.is-open .accordion-icon { transform: rotate(180deg); }

.accordion-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease);
}

.accordion-item.is-open .accordion-body {
    grid-template-rows: 1fr;
}

.accordion-body > p {
    overflow: hidden;
    padding: 0 3rem 0 8rem;
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--text-2);
}

.accordion-item.is-open .accordion-body > p {
    padding-bottom: 2.4rem;
}

/* ========================================
   CONTACT
   ======================================== */

.contact { padding-bottom: 6rem; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.2rem;
    align-items: center;
}

.contact-copy h2 {
    margin-top: 1.6rem;
    font-size: clamp(3.2rem, 4vw, 5rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.contact-copy p {
    margin-top: 1.6rem;
    font-size: 1.7rem;
    line-height: 1.6;
    color: var(--text-2);
}

.contact-card {
    position: relative;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), var(--accent-glow-strong), transparent 55%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.contact-card:hover {
    border-color: var(--border-3);
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.25), 0 0 80px var(--accent-glow);
}

.contact-card-inner {
    position: relative;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    background: linear-gradient(180deg, rgba(12, 21, 32, 0.85), rgba(6, 11, 17, 0.95));
}

.contact-card-inner h3 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.contact-card-inner p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-2);
}

.contact-card-inner .btn { align-self: flex-start; margin-top: 1rem; }

/* ========================================
   FOOTER
   ======================================== */

.footer {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 6rem), var(--container));
    margin: 0 auto;
    padding: 3rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    font-size: 1.3rem;
    color: var(--text-3);
}

.footer a {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-2);
    transition: color 0.2s ease;
}

.footer a:hover { color: var(--accent-light); }

/* ========================================
   REVEAL SYSTEM
   ======================================== */

.reveal-item {
    opacity: 0;
    will-change: transform, opacity;
}

.reveal-item:not([data-reveal]) {
    transform: translateY(4rem);
}

.reveal-item[data-reveal="left"] {
    transform: translateX(-5rem);
}

.reveal-item[data-reveal="right"] {
    transform: translateX(5rem);
}

.reveal-item[data-reveal="scale"] {
    transform: scale(0.88);
}

.reveal-item[data-reveal="blur"] {
    transform: translateY(2rem);
    filter: blur(4px);
}

.reveal-item.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    transition:
        opacity 1s var(--ease),
        transform 1s var(--ease),
        filter 1s var(--ease);
    transition-delay: calc(var(--i, 0) * 0.1s);
}

/* Section-level reveal for headings */
.section-head {
    opacity: 0;
    transform: translateY(3rem);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.section-head.is-visible {
    opacity: 1;
    transform: none;
}

/* ========================================
   3D TILT
   ======================================== */

.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-card > * {
    transform: translateZ(2rem);
}

/* ========================================
   MAGNETIC BUTTON
   ======================================== */

.btn.is-magnetic {
    will-change: transform;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* ---------- Tablet landscape ---------- */

@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; }
    .hero-aside { max-width: 56rem; justify-items: stretch; }
    .hermetic-triad { width: 100%; max-width: 56rem; aspect-ratio: var(--phi); }
    .bento { grid-template-columns: 1fr 1fr; }
    .bento-featured { grid-row: span 1; }
    .metrics-row { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* ---------- Tablet / Mobile ---------- */
/* Spacing grid: --gutter controls ALL horizontal breathing.
   Every container (header, section, footer) uses the same --gutter
   so edges are pixel-aligned across the entire page. */

@media (max-width: 768px) {

    /* --- Spacing tokens --- */

    :root {
        --gutter: 2rem;           /* 20px per side — unified edge inset */
        --section-py: 6.4rem;     /* vertical breathing between sections */
        --head-mb: 3.6rem;        /* section-head to content distance */
        --card-px: 2.4rem;        /* horizontal padding inside all cards */
        --card-py: 2.4rem;        /* vertical padding inside all cards */
        --grid-gap: 1.2rem;       /* gap inside all card grids */
    }

    /* --- Base mobile resets --- */

    body {
        -webkit-tap-highlight-color: transparent;
        -webkit-text-size-adjust: 100%;
        overscroll-behavior-y: none;
    }

    /* --- Unified container widths --- */

    section {
        width: calc(100% - var(--gutter) * 2);
        padding: var(--section-py) 0;
    }

    .footer {
        width: calc(100% - var(--gutter) * 2);
    }

    /* --- Safe-area for notched phones --- */

    .header {
        padding-left: max(1.2rem, env(safe-area-inset-left));
        padding-right: max(1.2rem, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(2.4rem, env(safe-area-inset-bottom));
    }

    /* --- Header mobile --- */

    .header {
        top: 0.8rem;
        width: calc(100% - var(--gutter) * 2);
        border-radius: 2rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        gap: 0.8rem;
    }

    .logo { gap: 1rem; }

    .logo-badge {
        width: 3.8rem;
        height: 3.8rem;
    }

    .logo-text strong { font-size: 1.4rem; }
    .logo-text span { font-size: 0.9rem; }

    .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 4.4rem;
        height: 4.4rem;
        margin-left: auto;
        font-size: 1.8rem;
        color: var(--text);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .header-cta { display: none; }

    .navbar {
        position: absolute;
        top: calc(100% + 0.8rem);
        left: 0;
        width: 100%;
        display: grid;
        gap: 0.4rem;
        padding: 0.8rem;
        border: 1px solid var(--border-2);
        border-radius: 2rem;
        background: rgba(6, 11, 17, 0.97);
        backdrop-filter: blur(2rem);
        -webkit-backdrop-filter: blur(2rem);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-0.8rem) scale(0.98);
        transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
    }

    .navbar.active {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .navbar a {
        padding: 1.4rem 1.6rem;
        border-radius: 1.4rem;
        font-size: 1.5rem;
    }

    .navbar a:hover,
    .navbar a.active {
        background: rgba(255, 255, 255, 0.04);
    }

    /* --- Hero mobile --- */

    .hero {
        padding-top: 11rem;
        padding-bottom: 3.2rem;
    }

    .hero::before {
        width: 50rem;
        height: 40rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3.2rem;
    }

    .hero-copy,
    .section-head,
    .contact-copy {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(3rem, 9vw, 4.8rem);
        margin-top: 2rem;
        letter-spacing: -0.04em;
    }

    .hero-lead {
        font-size: 1.6rem;
        margin-top: 2rem;
        max-width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2.8rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 5.4rem;
        font-size: 1.5rem;
    }

    .hermetic-triad {
        max-width: 100%;
        border-radius: var(--radius-md);
        aspect-ratio: var(--phi);
        padding: 1.8rem 1.6rem;
    }

    .triad-canvas {
        max-width: min(78vw, 22rem);
    }

    /* --- Section head mobile --- */

    .section-head { margin-bottom: var(--head-mb); }

    .section-head h2 {
        font-size: clamp(2.6rem, 7vw, 3.6rem);
        margin-top: 1.2rem;
        letter-spacing: -0.03em;
    }

    .section-head p {
        font-size: 1.5rem;
        margin-top: 1.2rem;
    }

    .kicker { font-size: 1.1rem; letter-spacing: 0.18rem; }

    /* --- Marquee mobile (full-bleed intentional) --- */

    .marquee { padding: 2rem 0; }

    .marquee-track { gap: 3rem; }

    .marquee-track span { font-size: 1.2rem; }

    /* --- Metrics mobile --- */

    .about { padding-bottom: var(--section-py); }

    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--grid-gap);
        align-items: stretch;
    }

    .metric {
        padding: var(--card-py) var(--card-px);
        border-radius: var(--radius-md);
        min-height: 15rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .metric-value { font-size: 4.4rem; }

    .metric-label {
        font-size: 1.05rem;
        margin-top: 0.8rem;
    }

    .about-desc {
        font-size: 1.5rem;
        margin-top: 2.8rem;
        line-height: 1.7;
    }

    /* --- Bento grid mobile --- */

    .bento {
        grid-template-columns: 1fr;
        gap: var(--grid-gap);
    }

    .bento-card {
        padding: var(--card-py) var(--card-px);
        border-radius: var(--radius-md);
        min-height: 18.4rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .bento-card i {
        width: 4.4rem;
        height: 4.4rem;
        font-size: 1.6rem;
        border-radius: var(--radius-sm);
    }

    .bento-card h3 {
        font-size: 1.9rem;
        margin-top: 1.6rem;
    }

    .bento-card p {
        font-size: 1.4rem;
        margin-top: 0.8rem;
    }

    .bento-glow {
        width: 24rem;
        height: 24rem;
    }

    /* --- Timeline mobile --- */

    .timeline { gap: 2rem; }

    .timeline-step {
        grid-template-columns: 5.2rem 1fr;
        gap: 1.6rem;
    }

    .step-marker {
        width: 5.2rem;
        height: 5.2rem;
        font-size: 1.4rem;
    }

    .timeline-line { left: 2.5rem; }

    .step-content { padding: 1.4rem 0; }

    .step-content h3 { font-size: 2rem; }

    .step-content p {
        font-size: 1.4rem;
        margin-top: 0.8rem;
    }

    /* --- Accordion mobile --- */

    .accordion { gap: var(--grid-gap); }

    .accordion-item { border-radius: var(--radius-md); }

    .accordion-trigger {
        flex-wrap: wrap;
        padding: var(--card-py) var(--card-px);
        gap: 1rem;
    }

    .accordion-num { min-width: 2.6rem; font-size: 1.3rem; }

    .accordion-title {
        font-size: 1.6rem;
        flex: 1;
        min-width: calc(100% - 8rem);
        line-height: 1.28;
    }

    .accordion-tags {
        order: 4;
        width: 100%;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .accordion-tags span {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .accordion-icon { font-size: 1.2rem; }

    .accordion-body > p {
        padding: 0 var(--card-px) 0 var(--card-px);
        font-size: 1.4rem;
        line-height: 1.7;
    }

    .accordion-item.is-open .accordion-body > p {
        padding-bottom: var(--card-py);
    }

    /* --- Contact mobile --- */

    .contact { padding-bottom: 3.2rem; }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.8rem;
    }

    .contact-copy h2 {
        font-size: clamp(2.6rem, 7vw, 3.6rem);
        margin-top: 1.2rem;
    }

    .contact-copy p {
        font-size: 1.5rem;
        margin-top: 1.2rem;
    }

    .contact-card { border-radius: var(--radius-lg); }

    .contact-card-inner {
        padding: var(--card-py) var(--card-px);
        gap: 1.2rem;
        align-items: flex-start;
    }

    .contact-card-inner h3 { font-size: 2.4rem; }
    .contact-card-inner p { font-size: 1.4rem; }

    .contact-card-inner .btn {
        width: 100%;
        font-size: 1.5rem;
        margin-top: 0.4rem;
    }

    /* --- Footer mobile --- */

    .footer {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
        font-size: 1.2rem;
        padding-top: 2.4rem;
        padding-bottom: calc(max(2.4rem, env(safe-area-inset-bottom)) + 7.6rem);
        line-height: 1.6;
    }

    /* --- Disable desktop-only effects --- */

    .pointer-orb { display: none; }
    .parallax-layer { display: none; }
    .tilt-card { transform: none !important; }
    .btn.is-magnetic { transform: none !important; }

    .whatsapp-float {
        right: var(--gutter);
        bottom: max(var(--gutter), calc(env(safe-area-inset-bottom) + 0.8rem));
        width: 5.2rem;
        height: 5.2rem;
        font-size: 2.2rem;
    }

    /* --- Buttons base mobile --- */

    .btn {
        min-height: 5rem;
        padding: 1.2rem 2rem;
        font-size: 1.4rem;
    }

    .btn-lg {
        min-height: 5.4rem;
        padding: 1.4rem 2.4rem;
        font-size: 1.5rem;
    }

    /* --- Mobile reveal: softer, no big offset --- */

    .reveal-item:not([data-reveal]) {
        transform: translateY(2rem);
    }

    .reveal-item[data-reveal="left"] {
        transform: translateX(-2rem);
    }

    .reveal-item[data-reveal="right"] {
        transform: translateX(2rem);
    }

    .reveal-item[data-reveal="scale"] {
        transform: scale(0.93);
    }

    .reveal-item[data-reveal="blur"] {
        transform: translateY(1rem);
        filter: blur(2px);
    }

    .reveal-item.is-visible {
        transition-duration: 0.8s;
    }

    .reveal-item.is-visible,
    .reveal-item[data-reveal].is-visible {
        transform: none;
        filter: none;
    }

    /* --- Mobile hero entrance: snapper --- */

    body.loaded .hero-copy .eyebrow {
        animation-duration: 0.7s;
        animation-delay: 0.1s;
    }

    body.loaded .hero-copy .hero-lead {
        animation-duration: 0.7s;
        animation-delay: 0.5s;
    }

    body.loaded .hero-copy .hero-actions {
        animation-duration: 0.7s;
        animation-delay: 0.7s;
    }

    body.loaded .word-inner {
        transition-duration: 0.65s;
        transition-delay: calc(var(--word-i, 0) * 0.05s + 0.18s);
    }

    /* --- Scroll progress thinner on mobile --- */

    .scroll-progress { height: 0.15rem; }

    /* --- Eyebrow line shorter --- */

    .eyebrow::before { width: 1.6rem; }
    .eyebrow { gap: 0.8rem; }
}

/* ---------- Small phones ---------- */

@media (max-width: 480px) {

    :root {
        --gutter: 1.6rem;
        --section-py: 5.2rem;
        --head-mb: 3.2rem;
        --card-px: 2rem;
        --card-py: 2rem;
        --grid-gap: 1rem;
    }

    .hero {
        padding-top: 10rem;
        padding-bottom: 2.4rem;
    }

    .hero-title {
        font-size: clamp(2.6rem, 10vw, 3.8rem);
    }

    .hero-lead { font-size: 1.5rem; }

    .section-head h2 { font-size: clamp(2.2rem, 7vw, 3rem); }

    .metric-value { font-size: 3.6rem; }
    .metric-label { font-size: 1rem; }

    .about-desc { font-size: 1.4rem; }

    .bento-card h3 { font-size: 1.8rem; }
    .bento-card p { font-size: 1.3rem; }

    .step-content h3 { font-size: 1.9rem; }
    .step-content p { font-size: 1.3rem; }

    .timeline-step {
        grid-template-columns: 4.6rem 1fr;
        gap: 1.2rem;
    }

    .step-marker {
        width: 4.6rem;
        height: 4.6rem;
        font-size: 1.3rem;
    }

    .timeline-line { left: 2.2rem; }

    .accordion-title { font-size: 1.5rem; }

    .contact-copy h2 { font-size: clamp(2.2rem, 7vw, 3rem); }
    .contact-card-inner h3 { font-size: 2.2rem; }

    .footer { font-size: 1.1rem; }
}

/* ---------- Very small phones (SE, 5s) ---------- */

@media (max-width: 360px) {

    :root {
        --gutter: 1.2rem;
        --section-py: 4.4rem;
        --head-mb: 2.8rem;
        --card-px: 1.6rem;
        --card-py: 1.8rem;
        --grid-gap: 0.8rem;
    }

    .logo-badge { width: 3.4rem; height: 3.4rem; }
    .logo-text strong { font-size: 1.3rem; }

    .hero { padding-top: 9.2rem; }

    .hero-title { font-size: 2.4rem; }

    .hero-actions .btn { font-size: 1.3rem; min-height: 4.8rem; }

    .metric-value { font-size: 3.2rem; }

    .bento-card h3 { font-size: 1.6rem; }
    .accordion-title { font-size: 1.4rem; }
    .accordion-tags span { font-size: 0.9rem; }

    .contact-card-inner h3 { font-size: 2rem; }

    .footer { font-size: 1rem; }
}

/* ---------- Landscape phones ---------- */

@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --section-py: 4rem;
    }

    .hero { padding-top: 9rem; padding-bottom: 2rem; }

    .hero-title { font-size: clamp(2.4rem, 5vw, 3.2rem); }
    .hero-lead { font-size: 1.4rem; }
    .hero-actions { flex-direction: row; }
    .hero-actions .btn { width: auto; }

    .metrics-row { grid-template-columns: repeat(4, 1fr); }
    .metric { padding: 2rem 1rem; }
    .metric-value { font-size: 3.2rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .reveal-item,
    .section-head,
    .hero-copy .eyebrow,
    .hero-copy .hero-lead,
    .hero-copy .hero-actions {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .word-inner { transform: none; }
    .marquee-track { animation: none; }
    .t-cursor { animation: none; }
    .whatsapp-float::after { animation: none; }
}
