/* =========================================
   DESIGN SYSTEM & VARIABLES : Preset B "Midnight Luxe"
   ========================================= */
:root {
    /* Palette */
    --obsidian: #0D0D12;
    --champagne: #C9A84C;
    --ivory: #FAF8F5;
    --slate: #2A2A35;

    /* Functional Map */
    --primary: var(--obsidian);
    --accent: var(--champagne);
    --bg-light: var(--ivory);
    --text-dark: var(--slate);
    --text-light: #E0E0E5;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-drama: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing & Radii */
    --radius-lg: 2rem;
    --radius-xl: 3rem;
}

/* =========================================
   RESET & BASE 
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary);
    color: var(--text-light);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
    /* Custom Scrollbar for premium feel */
    scrollbar-width: thin;
    scrollbar-color: var(--slate) var(--primary);
}

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: var(--primary);
}

body::-webkit-scrollbar-thumb {
    background-color: var(--slate);
    border-radius: 4px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* =========================================
   GLOBAL EFFECTS
   ========================================= */
/* SVG Noise Overlay @ 0.05 opacity */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
}

.noise-overlay svg {
    width: 100%;
    height: 100%;
}

/* Utility Colors */
.accent-text {
    color: var(--accent);
}

.string-mono {
    font-family: var(--font-mono);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-slate {
    background-color: var(--slate);
}

.bg-ivory {
    background-color: var(--ivory);
}

.text-dark {
    color: var(--text-dark);
}

.text-light {
    color: var(--text-light);
}

.m-auto {
    margin: 0 auto;
    display: table;
}

.text-center {
    text-align: center;
}

/* Typography Scale */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    font-weight: 600;
}

.section-heading {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.philosophy .section-heading { margin-bottom: 4.5rem; }

/* =========================================
   BUTTONS & MICRO-INTERACTIONS
   ========================================= */
/* Magnetic Button base styles */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    overflow: hidden;
    cursor: pointer;
    border: none;
    background: transparent;
    z-index: 1;
    /* GSAP will handle the scale, but smooth translation here */
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn:hover {
    transform: translateY(-1px);
}

/* Sliding background logic for hover */
.btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: -1;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scaleY(0);
    transform-origin: bottom;
}

.btn:hover .btn-bg {
    transform: scaleY(1);
    transform-origin: top;
}

.btn-accent {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-accent .btn-bg {
    background-color: var(--accent);
}

.btn-accent:hover {
    color: var(--primary);
}

.cta-large {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
}

/* General interactive lift */
a:not(.btn):hover {
    transform: translateY(-1px) scale(1.01);
}

/* =========================================
   DOCK NAV (Apple-Style Magnification Dock)
   ========================================= */

/* Brand pill — fixed to far left, text edge aligns with page content (5rem) */
.dock-brand-pill {
    position: fixed;
    top: 1cm;
    left: 5rem; /* pill left edge aligns with page content margin */
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 1.4rem;
    height: 56px;
    border-radius: 20px;
    background: rgba(13, 13, 18, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(201, 168, 76, 0.18);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: default;
}

.dock-brand-pill.scrolled {
    background: rgba(13, 13, 18, 0.75);
    border-color: rgba(201, 168, 76, 0.28);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Italic wordmark — as it was originally */
.dock-brand {
    font-family: var(--font-drama);
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: var(--ivory);
    white-space: nowrap;
    opacity: 0.9;
    letter-spacing: -0.01em;
    transition: opacity 0.3s ease;
}

.dock-brand-pill:hover .dock-brand { opacity: 1; }

/* Centred nav pill */
.dock-nav {
    position: fixed;
    top: 1cm;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

/* The pill container */
.dock-bar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.55rem 1.2rem;
    border-radius: 20px;
    height: 56px;
    background: rgba(13, 13, 18, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(201, 168, 76, 0.18);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    overflow: visible;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* More opaque when scrolled */
.dock-nav.scrolled .dock-bar {
    background: rgba(13, 13, 18, 0.75);
    border-color: rgba(201, 168, 76, 0.28);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Each nav item */
.dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    /* no width — icon-wrap defines its own */
}

/* The circular icon button */
.dock-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(250, 248, 245, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    will-change: transform;
    transition: background 0.2s ease;
}

.dock-item:hover .dock-icon-wrap {
    background: rgba(201, 168, 76, 0.12);
}

/* CTA item — accent ring */
.dock-cta .dock-icon-wrap {
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

.dock-cta:hover .dock-icon-wrap {
    background: rgba(201, 168, 76, 0.22);
    border-color: rgba(201, 168, 76, 0.55);
}

/* Icon SVG styling */
.dock-icon-wrap svg {
    width: 18px;
    height: 18px;
    stroke: rgba(224, 224, 229, 0.65);
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease;
}

.dock-item:hover .dock-icon-wrap svg {
    stroke: var(--ivory);
}

.dock-cta .dock-icon-wrap svg {
    stroke: var(--accent);
}

.dock-cta:hover .dock-icon-wrap svg {
    stroke: var(--accent);
}

/* Hover tooltip label */
.dock-label {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    background: rgba(13, 13, 18, 0.92);
    border: 1px solid rgba(201, 168, 76, 0.22);
    color: rgba(224, 224, 229, 0.9);
    font-size: 0.68rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    /* start hidden, shifted down slightly */
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dock-item:hover .dock-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Thin vertical separator between nav links and CTA */
.dock-divider {
    width: 1px;
    height: 24px;
    background: rgba(201, 168, 76, 0.2);
    border-radius: 1px;
    margin: 0 0.15rem;
    flex-shrink: 0;
}

/* =========================================
   HERO GEOMETRIC SHAPES (ElegantShape)
   Floating pill accents — brand-adapted from shape-landing-hero.tsx
   ========================================= */
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.elegant-shape {
    position: absolute;
    border-radius: 9999px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 2px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.05);
    will-change: transform, opacity;
}

.elegant-shape::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 70%);
}

/* Shape 1 — large, top-left, champagne gold */
.shape-1 {
    width: 600px;
    height: 140px;
    left: -5%;
    top: 20%;
    background: linear-gradient(to right, rgba(201, 168, 76, 0.13), transparent);
}

/* Shape 2 — medium, bottom-right, ivory */
.shape-2 {
    width: 500px;
    height: 120px;
    right: 0;
    top: 75%;
    background: linear-gradient(to right, rgba(250, 248, 245, 0.07), transparent);
}

/* Shape 3 — small, bottom-left, champagne */
.shape-3 {
    width: 300px;
    height: 80px;
    left: 10%;
    bottom: 10%;
    background: linear-gradient(to right, rgba(201, 168, 76, 0.09), transparent);
}

/* Shape 4 — small, top-right, ivory */
.shape-4 {
    width: 200px;
    height: 60px;
    right: 20%;
    top: 15%;
    background: linear-gradient(to right, rgba(250, 248, 245, 0.06), transparent);
}

/* Shape 5 — tiny, top-centre-left, gold */
.shape-5 {
    width: 150px;
    height: 40px;
    left: 25%;
    top: 10%;
    background: linear-gradient(to right, rgba(201, 168, 76, 0.08), transparent);
}

/* =========================================
   HERO ("The Opening Shot")
   ========================================= */
.hero {
    position: relative;
    height: 100dvh;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding: 5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Slightly dim initial image so gradient pops */
    opacity: 0.8;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--primary) 0%, rgba(13, 13, 18, 0) 70%);
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    padding-bottom: 2rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.hero-sans {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: -0.03em;
    color: var(--ivory);
    margin-bottom: -10px;
}

.hero-serif {
    font-family: var(--font-drama);
    font-style: italic;
    font-size: 7rem;
    line-height: 1;
    color: var(--accent);
    white-space: nowrap;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(224, 224, 229, 0.8);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* =========================================
   FEATURES ("Interactive Functional Artifacts")
   ========================================= */
.features {
    padding: 8rem 5%;
    background-color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--slate);
    border: 1px solid rgba(250, 248, 245, 0.05);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* For standard card lift */
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--ivory);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: rgba(224, 224, 229, 0.6);
    font-size: 0.95rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Card 1: Diagnostic Shuffler */
.shuffler-container {
    position: relative;
    height: 200px;
    perspective: 1000px;
    /* Flex for fallback layout, GSAP will handle absolute positioning */
    display: flex;
    align-items: center;
    justify-content: center;
}

.shuffle-item {
    position: absolute;
    width: 100%;
    padding: 1.5rem;
    background: rgba(13, 13, 18, 0.8);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 1rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    /* The transform/opacity is controlled entirely by GSAP */
}

/* Card 2: Telemetry Typewriter */
.live-feed-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(201, 168, 76, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.code-window {
    background: var(--obsidian);
    border-radius: 1rem;
    border: 1px solid rgba(250, 248, 245, 0.1);
    overflow: hidden;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.code-header {
    background: rgba(250, 248, 245, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.4rem;
    border-bottom: 1px solid rgba(250, 248, 245, 0.1);
}

.code-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(250, 248, 245, 0.2);
}

.code-body {
    padding: 1.5rem;
    color: var(--ivory);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

.cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--accent);
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(201, 168, 76, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
    }
}

/* Card 3: Cursor Protocol Scheduler */
.scheduler-ui {
    background: var(--obsidian);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(250, 248, 245, 0.1);
    position: relative;
    height: 200px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: rgba(250, 248, 245, 0.5);
}

.day-cells {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cell {
    height: 30px;
    background: rgba(250, 248, 245, 0.05);
    border-radius: 4px;
    transition: all 0.3s;
}

.scheduler-btn {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.5rem;
    background: rgba(250, 248, 245, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 1px solid rgba(250, 248, 245, 0.1);
}

.animated-cursor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    /* GSAP timeline will move this */
}

/* =========================================
   PHILOSOPHY ("The Manifesto")
   ========================================= */
.philosophy {
    position: relative;
    padding: 12rem 5%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    border-top: 1px solid rgba(250, 248, 245, 0.05);
    overflow: hidden;
}

.philosophy-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* for parallax */
    opacity: 0.15;
    z-index: 1;
}

.philosophy-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}

.philosophy-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    text-align: center;
}

.philosophy-neutral {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: rgba(250, 248, 245, 0.5);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.philosophy-drama {
    font-family: var(--font-drama);
    font-size: 3.75rem;
    line-height: 1.1;
    color: var(--ivory);
    font-style: italic;
}

/* =========================================
   PROTOCOL ("Sticky Stacking Archive")
   ========================================= */
.protocol-wrapper {
    position: relative;
    padding: 0;
    width: 100%;
    height: 500vh; /* 5 cards × 100vh — keeps content after the stack from being buried */
}

/* ── Protocol Card 04: Collaborators ── */
.collab-logos-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 340px;
}
.collab-logo-row {
    padding: 1.75rem 0;
    display: flex;
    align-items: center;
}
.collab-logo-row + .collab-logo-row {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.collab-logo-img {
    height: 32px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.35s ease;
}
.collab-logo-img:hover { opacity: 1; }

/* FN Markets: filter on img, blend on wrapper — kept separate to avoid
   the filter/mix-blend-mode same-element compositing conflict */
.fn-blend { display: inline-block; mix-blend-mode: screen; line-height: 0; }
.fn-blend img { filter: contrast(10) brightness(1.2); }

/* ── Protocol Card 05: Endorsements ── */
.card-inner--endorsements {
    grid-template-columns: 1fr 1.5fr;
    align-items: center;
}
.endorsements-display {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    justify-content: center;
}

.stack-card {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    position: relative;
    overflow: hidden;
    /* Borders added to differentiate the layered panels */
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.card-inner {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.card-text {
    max-width: 600px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 10rem;
    line-height: 1;
    opacity: 0.1;
    margin-bottom: -40px;
    font-weight: 700;
}

.card-text h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.card-text p {
    font-size: 1.25rem;
    opacity: 0.8;
}

.card-text p strong {
    color: var(--accent);
    opacity: 1;
}

/* SVGs and Visuals for Stack Cards */
.card-visual {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.gear-spinner {
    width: 300px;
    height: 300px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.scanner-grid {
    width: 100%;
    height: 300px;
    border: 1px solid rgba(250, 248, 245, 0.1);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(250, 248, 245, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(250, 248, 245, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.laser-line {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 15px 5px rgba(201, 168, 76, 0.4);
    /* Animation driven by GSAP */
}

.ekg-wave {
    width: 100%;
    height: 200px;
    filter: drop-shadow(0 0 10px rgba(42, 42, 53, 0.5));
}

/* The stroke drawing animation is driven by GSAP */

/* =========================================
   CLIENT LOGOS ("Trusted By" Banner)
   ========================================= */
.logo-cloud-section {
    background: var(--primary);
    padding: 8rem 0;
    border-top: 1px solid rgba(250, 248, 245, 0.05);
    border-bottom: 1px solid rgba(250, 248, 245, 0.05);
}

.logo-cloud-heading {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 5%;
}

.logo-cloud-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(224, 224, 229, 0.35);
    margin-bottom: 0.75rem;
}

.logo-cloud-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: rgba(224, 224, 229, 0.75);
    letter-spacing: -0.02em;
}

.logo-cloud-title em {
    font-family: var(--font-drama);
    font-style: italic;
    color: var(--ivory);
    font-weight: 600;
}

.logo-cloud-divider {
    height: 1px;
    max-width: 320px;
    margin: 1.75rem auto 0;
    background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.2), transparent);
}

/* Slider */
.logo-slider-wrapper {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
    mask-image: linear-gradient(to right, transparent, black 18%, black 82%, transparent);
    padding: 0.5rem 0;
}

/*
 * Two-set technique: .logo-slider-inner contains two identical .logo-set divs.
 * Animating to -50% moves exactly one set's width → seamless infinite loop.
 */
.logo-slider-inner {
    display: flex;
    width: max-content;
    animation: logo-marquee 30s linear infinite;
}

.logo-slider-inner:hover {
    animation-play-state: paused;
}

@keyframes logo-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.logo-set {
    display: flex;
    align-items: center;
    gap: 80px;
    flex-shrink: 0;
    /* padding-right = gap so the trailing space after the last item
       matches every inter-item gap — loop boundary is invisible. */
    padding-right: 80px;
}

.logo-wordmark {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(224, 224, 229, 0.45);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: default;
    transition: color 0.3s ease;
}

.logo-wordmark:hover {
    color: rgba(224, 224, 229, 0.9);
}

.logo-img {
    height: 28px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    /* No colour filter — all three logos are designed for dark backgrounds
       (ThinkMarkets dark-screen SVG: white + green fills;
        Quant Tekel SVG: white fills; Alpha Futures PNG: white fills).
       opacity alone gives the standard muted logo-cloud look. */
    opacity: 0.55;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    user-select: none;
}

.logo-img:hover {
    opacity: 1;
}

/* =========================================
   FOOTER & FINAL CTA
   ========================================= */
.final-cta {
    padding: 10rem 5% 5rem;
    background: var(--primary);
}

.footer {
    background-color: var(--obsidian);
    border-top: 1px solid rgba(250, 248, 245, 0.05);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 6rem 5% 2rem;
    margin-top: -2rem;
    /* Pull up to overlap slightly */
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto 6rem;
}

.footer-brand h2 {
    font-family: var(--font-drama);
    font-style: italic;
    font-size: 2.5rem;
    color: var(--ivory);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(224, 224, 229, 0.6);
    max-width: 400px;
    margin-bottom: 2rem;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(250, 248, 245, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: max-content;
}

.pulse-dot.green {
    background-color: #2ED47A;
    box-shadow: 0 0 10px #2ED47A;
    animation: none;
    /* simple static or steady pulse can be added */
}

.status-mono {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ivory);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(224, 224, 229, 0.4);
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--ivory);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links-right {
    text-align: right;
    align-items: flex-end;
    justify-self: end;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(250, 248, 245, 0.1);
    color: rgba(224, 224, 229, 0.4);
    font-size: 0.85rem;
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-section {
    padding: 6rem 5% 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    border-top: 1px solid rgba(250, 248, 245, 0.05);
    border-bottom: 1px solid rgba(250, 248, 245, 0.05);
}

.testimonials-label {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    font-family: var(--font-mono);
}

.testimonials-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.testimonial-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.testimonial-avatar-wrap {
    position: relative;
}

.testimonial-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(201, 168, 76, 0.25);
    display: block;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.testimonial-item:hover .testimonial-avatar {
    border-color: var(--accent);
    transform: scale(1.05);
}

.testimonial-bubble {
    position: absolute;
    bottom: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--ivory);
    color: var(--slate);
    padding: 1.1rem 1.3rem 0.9rem;
    border-radius: 12px;
    width: 290px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(201, 168, 76, 0.12);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.testimonial-typed-text {
    font-size: 0.78rem;
    line-height: 1.65;
    color: var(--slate);
    min-height: 76px;
    font-family: var(--font-heading);
}

.testimonial-cursor {
    display: inline-block;
    animation: blink 0.8s step-end infinite;
    color: var(--accent);
    font-weight: 700;
}

.testimonial-sig-name {
    margin-top: 0.75rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--slate);
    font-family: var(--font-heading);
}

.testimonial-sig-role {
    text-align: right;
    font-size: 0.7rem;
    color: #8a8a9a;
    margin-top: 0.1rem;
    font-family: var(--font-mono);
}

/* Bubble tail — two diminishing dots */
.bubble-tail {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.bubble-tail::before,
.bubble-tail::after {
    content: '';
    display: block;
    background: var(--ivory);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bubble-tail::before {
    width: 7px;
    height: 7px;
}

.bubble-tail::after {
    width: 4px;
    height: 4px;
}

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(13, 13, 18, 0.97);
    border-top: 1px solid rgba(201, 168, 76, 0.18);
    backdrop-filter: blur(14px);
    transform: translateY(100%);
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-banner-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.cookie-banner-text p:last-child {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: rgba(224, 224, 229, 0.55);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--accent);
    text-decoration: none;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.65rem;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn-secondary {
    background: transparent;
    color: rgba(224, 224, 229, 0.45);
    border: 1px solid rgba(224, 224, 229, 0.14);
}

.cookie-btn-secondary:hover {
    border-color: rgba(224, 224, 229, 0.35);
    color: rgba(224, 224, 229, 0.75);
}

.cookie-btn-primary {
    background: var(--accent);
    color: var(--primary);
    border: 1px solid transparent;
    font-weight: 600;
}

.cookie-btn-primary:hover {
    background: #d4b05c;
}

/* =========================================
   RESPONSIVE adjustments
   ========================================= */

/* ---- Tablet (≤1024px) ---- */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero-serif { font-size: 5rem; white-space: normal; }
    .philosophy-drama { font-size: 2.63rem; }
    .card-inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {

    /* --- Brand pill: smaller, top-left --- */
    .dock-brand-pill {
        top: 0.75rem;
        left: 1rem;
        height: 40px;
        padding: 0 0.9rem;
        border-radius: 14px;
    }
    .dock-brand { font-size: 1.05rem; }

    /* --- Dock nav: move to bottom, show all items --- */
    .dock-nav {
        top: auto;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .dock-bar {
        gap: 0.23rem;
        padding: 0.45rem 0.68rem;
        height: 69px;
    }

    .dock-label { display: none; }
    .dock-icon-wrap { width: 45px; height: 45px; border-radius: 12px; }
    .dock-icon-wrap svg { width: 21px; height: 21px; }

    /* --- Hero --- */
    .hero { padding: 5rem 1.5rem 2.5rem; align-items: flex-end; }
    .hero-content { padding-bottom: 5.5rem; max-width: 100%; }
    .hero-sans { font-size: 1.75rem; }
    .hero-serif { font-size: 3.25rem; white-space: normal; }
    .hero-subtitle { font-size: 1rem; line-height: 1.65; margin-bottom: 2rem; }

    /* Scale down shapes, hide smallest ones */
    .shape-1 { width: 260px; height: 65px; }
    .shape-2 { width: 200px; height: 55px; }
    .shape-3, .shape-4, .shape-5 { display: none; }

    /* --- Global typography --- */
    .section-heading { font-size: 2rem; margin-bottom: 2rem; }

    /* --- Features --- */
    .features { padding: 5rem 1.5rem; }
    .feature-card { padding: 1.75rem; gap: 1.5rem; }
    .card-header h3 { font-size: 1.25rem; }
    .card-header p { font-size: 0.875rem; }
    .flex-between { flex-direction: column; gap: 0.75rem; }
    .shuffler-container { height: 160px; }

    /* --- Philosophy --- */
    .philosophy { padding: 6rem 1.5rem; min-height: auto; }
    .philosophy-drama { font-size: 1.69rem; line-height: 1.3; }

    /* --- Logo cloud --- */
    .logo-cloud-section { padding: 4rem 0; }
    .logo-cloud-title { font-size: 1.5rem; }

    /* --- Testimonials --- */
    .testimonials-section { padding: 4rem 1.5rem 3rem; gap: 2rem; }
    .testimonials-container { gap: 2rem; }
    .testimonial-bubble {
        width: 230px;
        /* Keep bubble on screen for left-side avatar */
        left: 0;
        transform: translateX(0);
    }
    /* Right-side avatar: keep bubble from overflowing right */
    .testimonial-item:last-child .testimonial-bubble {
        left: auto;
        right: 0;
        transform: translateX(0);
    }

    /* --- Protocol stack cards — stationary on mobile --- */
    .protocol-wrapper { height: auto; }
    .stack-card { height: auto; min-height: 0; padding: 4rem 1.5rem 3rem; }
    .stack-card.card-past { opacity: 0.4; filter: blur(8px); transition: opacity 0.5s ease, filter 0.5s ease; }
    .card-visual { height: 180px; }
    .gear-spinner { width: 180px; height: 180px; }
    .scanner-grid { height: 180px; }
    .ekg-wave { height: 150px; }
    .step-num { font-size: 5rem; margin-bottom: -24px; }
    .card-text h2 { font-size: 2rem; margin-bottom: 1rem; }
    .card-text p { font-size: 1rem; }

    /* --- Protocol cards 04 & 05 --- */
    .collab-logos-stack { max-width: 100%; }
    .collab-logo-img { height: 22px; }
    .card-inner--endorsements { grid-template-columns: 1fr; gap: 1.5rem; }
    .endorsements-display { flex-direction: column; align-items: center; gap: 1.5rem; }

    /* --- Final CTA --- */
    .final-cta { padding: 5rem 1.5rem 7rem; /* extra bottom clears bottom dock */ }
    .final-cta .section-heading { font-size: 1.75rem; }
    .cta-large { padding: 1rem 2rem; font-size: 1rem; width: 100%; text-align: center; }

    /* --- Footer --- */
    .footer { padding: 4rem 1.5rem; padding-bottom: 6.5rem; /* clear bottom dock */ }
    .footer-bottom { font-size: 0.8rem; }

    /* --- Cookie banner --- */
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
        padding: 1rem 1.25rem 1.25rem;
    }
    .cookie-banner-actions { width: 100%; justify-content: flex-end; }

    /* --- Legal pages --- */
    .legal-page { padding: 7rem 1.25rem 5rem; }
    .legal-title { font-size: 2.25rem; }
    .legal-data-table { font-size: 0.78rem; }
    .legal-data-table th,
    .legal-data-table td { padding: 0.5rem 0.35rem; }
    .legal-contact-block { padding: 1rem; }
}

/* ---- Small mobile (≤480px) ---- */
@media (max-width: 480px) {
    .hero-sans { font-size: 1.5rem; }
    .hero-serif { font-size: 2.6rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .philosophy-drama { font-size: 1.43rem; }
    .section-heading { font-size: 1.75rem; }
    .card-text h2 { font-size: 1.65rem; }
    .testimonial-bubble { width: 200px; }
    .testimonial-typed-text { font-size: 0.72rem; min-height: 64px; }
    .legal-title { font-size: 1.9rem; }
    .logo-cloud-title { font-size: 1.25rem; }
    .dock-bar { gap: 0.15rem; padding: 0.38rem 0.53rem; }
    .dock-icon-wrap { width: 40px; height: 40px; }
    .dock-icon-wrap svg { width: 18px; height: 18px; }
}