/* ==============================================
   BIZTECH ERP — SHARED STYLES
   All pages share this stylesheet.
   ============================================== */

/* ==============================================
   DESIGN TOKENS
   ============================================== */
:root {
    --color-bg: #0c0e12;
    --color-bg-raised: #13161c;
    --color-bg-card: #181c24;
    --color-bg-card-hover: #1e2330;
    --color-surface: #1a1e27;
    --color-border: rgba(255,255,255,0.06);
    --color-border-hover: rgba(255,255,255,0.12);
    --color-accent: #22d3a7;
    --color-accent-dim: rgba(34,211,167,0.12);
    --color-accent-glow: rgba(34,211,167,0.25);
    --color-accent-text: #1affa3;
    --color-sage: #6366f1;
    --color-sage-dim: rgba(99,102,241,0.12);
    --color-sage-glow: rgba(99,102,241,0.25);
    --color-text: #e2e4e9;
    --color-text-secondary: #8b8fa3;
    --color-text-dim: #848a9c; /* >=4.5:1 on card backgrounds (WCAG AA small text) */
    --color-white: #ffffff;
    --color-nav-cta-bg: #e8fff8;
    --color-nav-cta-text: #092019;
    --color-nav-cta-hover: #ffffff;
    --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'SF Mono', monospace;
    --container: 1180px;
    --gap: 24px;
    --section-py: 120px;
    --radius: 12px;
    --radius-sm: 8px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.5s;
}

/* ==============================================
   LIGHT THEME
   ============================================== */
[data-theme="light"] {
    --color-bg: #f4f5f7;
    --color-bg-raised: #ebedf0;
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #f8f9fb;
    --color-surface: #f0f1f4;
    --color-border: rgba(0,0,0,0.08);
    --color-border-hover: rgba(0,0,0,0.14);
    --color-accent: #0fa882;
    --color-accent-dim: rgba(15,168,130,0.1);
    --color-accent-glow: rgba(15,168,130,0.2);
    --color-accent-text: #0a8a6a;
    --color-sage: #5558e6;
    --color-sage-dim: rgba(85,88,230,0.1);
    --color-sage-glow: rgba(85,88,230,0.2);
    --color-text: #1a1c22;
    --color-text-secondary: #555a6e;
    --color-text-dim: #6a6f80; /* >=4.5:1 on white cards (WCAG AA small text) */
    --color-white: #111318;
    --color-nav-cta-bg: #123c34;
    --color-nav-cta-text: #ffffff;
    --color-nav-cta-hover: #0b5546;
}

[data-theme="light"] .nav { background: rgba(244,245,247,0.88); border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hero-grid-bg { background-image: linear-gradient(rgba(15,168,130,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(15,168,130,0.06) 1px, transparent 1px); }
[data-theme="light"] .hero-glow { background: radial-gradient(circle, rgba(15,168,130,0.08) 0%, transparent 60%); }
[data-theme="light"] .contact-map iframe { filter: none; }
[data-theme="light"] .nav-toggle span { background: var(--color-text); }
[data-theme="light"] .footer { background: #e4e6ea; border-top-color: rgba(0,0,0,0.06); }
[data-theme="light"] .sage-glow { background: radial-gradient(circle, rgba(85,88,230,0.06) 0%, transparent 60%); }
[data-theme="light"] .hero-stats-card { background: var(--color-bg-card); border-color: var(--color-border); }
[data-theme="light"] .hero-stat { background: var(--color-surface); }
[data-theme="light"] .hero-trust-icon { background: var(--color-accent-dim); }
[data-theme="light"] .service-tags span { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-secondary); }
[data-theme="light"] .problem { border-top-color: rgba(0,0,0,0.06); border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .services-sage, [data-theme="light"] .team { border-top-color: rgba(0,0,0,0.06); border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .process-step-number { background: var(--color-bg-card); }
[data-theme="light"] .sage-card-main { background: var(--color-bg-card); }
[data-theme="light"] .cmd-overlay { background: rgba(0,0,0,0.3); }
[data-theme="light"] .cmd-palette { box-shadow: 0 24px 80px rgba(0,0,0,0.15); }
[data-theme="light"] .scroll-progress { background: linear-gradient(90deg, var(--color-accent), var(--color-sage)); }
[data-theme="light"] .form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555a6e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
[data-theme="light"] .footer-social a { background: var(--color-surface); }
[data-theme="light"] .footer-social svg { fill: var(--color-text-secondary); }
[data-theme="light"] .nav-links > a { color: var(--color-text-secondary); }
[data-theme="light"] .nav-links > a:hover, [data-theme="light"] .nav-links > a.active { color: var(--color-accent); }
[data-theme="light"] .nav-links { background: var(--color-bg); }
[data-theme="light"] .page-header { background: var(--color-bg-raised); }

/* Logo switching */
.logo-dark { display: block; }
.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }
.nav-logo-img.logo-dark { height: 70px; }
.footer-logo-img { width: 230px; height: auto; max-width: 100%; object-fit: contain; }
.footer-logo-img.logo-dark,
.footer-logo-img.logo-light { height: auto; }

/* Theme toggle */
.theme-toggle { width: 36px; height: 36px; border-radius: 8px; background: var(--color-bg-card); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s var(--ease); flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--color-accent); background: var(--color-accent-dim); }
.theme-toggle svg { width: 18px; height: 18px; stroke: var(--color-text-secondary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; }
.theme-toggle:hover svg { stroke: var(--color-accent); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ==============================================
   RESET & BASE
   ============================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-display); color: var(--color-text); background: var(--color-bg); line-height: 1.7; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gap); }

/* ==============================================
   GLOBAL COMPONENTS
   ============================================== */
.section-label { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 7px 12px; border: 1px solid var(--color-border-hover); border: 1px solid color-mix(in srgb, currentColor 24%, transparent); border-radius: 999px; background: var(--color-accent-dim); background: color-mix(in srgb, currentColor 9%, transparent); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-accent); margin-bottom: 18px; }
.section-label::before { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--color-white); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 16px; }
.section-subtitle { font-size: 1.05rem; color: var(--color-text-secondary); max-width: 540px; line-height: 1.7; }
.section-header { margin-bottom: 64px; }
.section-header.center { text-align: center; }
.section-header.center .section-subtitle { margin: 0 auto; }
.section-header.center .section-label::before { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: all var(--duration) var(--ease); white-space: nowrap; }
.btn-accent { background: var(--color-accent); color: var(--color-bg); }
.btn-accent:hover { background: #2ee8b7; box-shadow: 0 0 32px var(--color-accent-glow); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-text); border: 1px solid var(--color-border-hover); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-sage { background: var(--color-sage); color: var(--color-white); }
.btn-sage:hover { background: #818cf8; box-shadow: 0 0 32px var(--color-sage-glow); transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Animations */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--color-accent), var(--color-sage)); z-index: 1001; transition: width 0.05s linear; }

/* ==============================================
   NAVIGATION
   ============================================== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(12, 14, 18, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--color-border); transition: background 0.3s; }
.nav-inner { width: 100%; max-width: none; margin: 0; padding: 0 clamp(40px, calc(1vw + 30px), 48px); display: flex; align-items: center; justify-content: space-between; height: 88px; }
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-img { height: 64px; width: auto; max-width: none; }
.nav-links { display: flex; gap: 40px; }
.nav-links > a { font-size: 0.8rem; font-weight: 500; color: var(--color-text-secondary); letter-spacing: 0.04em; text-transform: uppercase; transition: color 0.3s; position: relative; }
.nav-links > a:hover, .nav-links > a.active { color: var(--color-accent); }
.nav-links > a.nav-huddle { margin: -7px -11px; padding: 7px 11px; border: 1px solid var(--color-border-hover); border: 1px solid color-mix(in srgb, var(--color-accent) 32%, transparent); border-radius: 999px; background: var(--color-accent-dim); color: var(--color-accent); box-shadow: 0 0 18px var(--color-accent-glow), inset 0 0 12px rgba(34,211,167,0.05); text-shadow: 0 0 10px var(--color-accent-glow); }
.nav-links > a.nav-huddle:hover,
.nav-links > a.nav-huddle.active { color: var(--color-accent-text); box-shadow: 0 0 24px var(--color-accent-glow), inset 0 0 14px rgba(34,211,167,0.1); }
/* Extra controls shown inside the mobile dropdown menu only */
.nav-menu-extra { display: none; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-phone { order: 3; font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-text-secondary); letter-spacing: 0.02em; }
.nav-phone:hover { color: var(--color-accent); }
.nav-right > .theme-toggle { order: 1; }
.nav-cta { order: 2; font-size: 0.8rem; padding: 10px 22px; }
.nav-cta,
.nav-menu-cta { background: var(--color-nav-cta-bg); color: var(--color-nav-cta-text); border: 1px solid transparent; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.nav-cta:hover,
.nav-menu-cta:hover { background: var(--color-nav-cta-hover); color: var(--color-nav-cta-text); box-shadow: 0 10px 28px var(--color-accent-glow); }
.nav-cta:focus-visible,
.nav-menu-cta:focus-visible,
.nav-phone:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.nav-toggle { order: 4; display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-white); margin: 5px 0; transition: 0.3s; border-radius: 1px; }

/* ==============================================
   PAGE HEADER (subpages)
   ============================================== */
.page-header {
    padding: 140px 0 60px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.page-header-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34,211,167,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,211,167,0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 60% 80% at 50% 100%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 100%, black 20%, transparent 70%);
}

.page-header .container { position: relative; z-index: 1; }

.page-header .section-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin-bottom: 12px;
}

.page-header .section-subtitle {
    max-width: 600px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-bottom: 24px;
}

.breadcrumb a { color: var(--color-text-secondary); transition: color 0.3s; }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb svg { width: 14px; height: 14px; stroke: var(--color-text-dim); fill: none; stroke-width: 2; }

/* ==============================================
   HERO (homepage only)
   ============================================== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; background: var(--color-bg); }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(34,211,167,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,167,0.07) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%); }
.hero-glow { position: absolute; top: -20%; right: -10%; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(34,211,167,0.06) 0%, transparent 60%); pointer-events: none; }
.hero-content { position: relative; z-index: 2; }
.hero-layout { display: grid; grid-template-columns: 1fr 420px; gap: 80px; align-items: center; }
.hero-text { animation: heroFadeIn 0.9s var(--ease) both; }
@keyframes heroFadeIn { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
.hero-eyebrow { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; color: var(--color-accent); margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.hero-eyebrow::before { content: ''; width: 32px; height: 2px; background: var(--color-accent); }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.04em; color: var(--color-white); margin-bottom: 24px; }
.hero h1 .accent { color: var(--color-accent); }
.hero-typed { color: var(--color-accent); border-right: 3px solid var(--color-accent); animation: cursorBlink 0.7s step-end infinite; }
@keyframes cursorBlink { 0%, 100% { border-right-color: var(--color-accent); } 50% { border-right-color: transparent; } }
.hero-desc { font-size: 1.1rem; color: var(--color-text-secondary); line-height: 1.75; max-width: 520px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-side { animation: heroFadeIn 0.9s var(--ease) 0.2s both; }
.hero-stats-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 36px; position: relative; overflow: hidden; }
.hero-stats-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--color-accent), var(--color-sage)); }
.hero-stats-title { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--color-text-dim); margin-bottom: 28px; }
.hero-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hero-stat { text-align: center; padding: 16px 8px; border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--color-border); }
.hero-stat-value { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: 6px; color: var(--color-white); transition: none; }
.hero-stat-value.teal { color: var(--color-accent); }
.hero-stat-value.purple { color: var(--color-sage); }
.hero-stat-label { font-size: 0.72rem; color: var(--color-text-dim); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.hero-trust { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 12px; }
.hero-trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--color-text-secondary); }
.hero-trust-icon { width: 20px; height: 20px; border-radius: 50%; background: var(--color-accent-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-trust-icon svg { width: 11px; height: 11px; stroke: var(--color-accent); fill: none; stroke-width: 2.5; }

/* ==============================================
   SECTIONS (shared)
   ============================================== */
.problem { padding: var(--section-py) 0; background: var(--color-bg-raised); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.problem-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.problem-points { display: flex; flex-direction: column; gap: 20px; }
.problem-point { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius-sm); border: 1px solid transparent; transition: all 0.4s var(--ease); }
.problem-point:hover { background: var(--color-bg-card); border-color: var(--color-border); }
.problem-point-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--color-accent-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.problem-point-icon svg { width: 20px; height: 20px; stroke: var(--color-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.problem-point h3 { font-size: 1rem; font-weight: 700; color: var(--color-white); margin-bottom: 4px; }
.problem-point p { font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.6; }

/* Services IT */
.services-it { padding: var(--section-py) 0; background: var(--color-bg); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 36px 28px; transition: all 0.4s var(--ease); position: relative; overflow: hidden; --mouse-x: 50%; --mouse-y: 50%; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(320px circle at var(--mouse-x) var(--mouse-y), var(--color-accent-glow) 0%, transparent 60%); opacity: 0; transition: opacity 0.4s var(--ease); z-index: 0; pointer-events: none; }
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }
.service-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); z-index: 2; }
.service-card:hover { background: var(--color-bg-card-hover); border-color: var(--color-border-hover); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon-wrap { width: 48px; height: 48px; border-radius: 10px; background: var(--color-accent-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.service-icon-wrap svg { width: 22px; height: 22px; stroke: var(--color-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--color-white); margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.65; margin-bottom: 20px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.service-tags span { font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-dim); letter-spacing: 0.02em; }

/* Expandable card detail */
.service-detail { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin 0.4s var(--ease); opacity: 0; margin-top: 0; }
.service-card.expanded .service-detail { max-height: 200px; opacity: 1; margin-top: 16px; }
.service-detail p { font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.65; padding-top: 16px; border-top: 1px solid var(--color-border); }
.service-expand { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 0; background: none; border: none; color: var(--color-accent); font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: gap 0.3s var(--ease); }
.service-expand:hover { gap: 10px; }
.service-expand svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform 0.3s var(--ease); }
.service-card.expanded .service-expand svg { transform: rotate(180deg); }

/* Service card link for multi-page */
.service-card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--color-accent); font-size: 0.8rem; font-weight: 600; transition: gap 0.3s var(--ease); }
.service-card-link:hover { gap: 10px; }
.service-card-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Sage */
.services-sage { padding: var(--section-py) 0; background: var(--color-bg-raised); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); position: relative; overflow: hidden; }
.services-sage .section-label { color: var(--color-sage); }
.services-sage .section-label::before { background: var(--color-sage); }
.sage-glow { position: absolute; top: -100px; left: -100px; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,0.04) 0%, transparent 60%); pointer-events: none; }
.sage-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; position: relative; z-index: 1; }
.sage-text .section-subtitle { margin-bottom: 32px; }
.sage-features { display: flex; flex-direction: column; gap: 16px; }
.sage-feature { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--radius-sm); background: var(--color-bg-card); border: 1px solid var(--color-border); transition: all 0.3s var(--ease); }
.sage-feature:hover { border-color: var(--color-sage); background: var(--color-bg-card-hover); }
.sage-feature-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--color-sage-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.sage-feature-icon svg { width: 18px; height: 18px; stroke: var(--color-sage); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sage-feature h4 { font-size: 0.95rem; font-weight: 700; color: var(--color-white); margin-bottom: 3px; }
.sage-feature p { font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.55; }
.sage-card-main { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 40px; position: relative; overflow: hidden; }
.sage-card-main::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--color-sage), transparent); }
.sage-card-main h3 { font-size: 1.4rem; font-weight: 800; color: var(--color-white); margin-bottom: 16px; }
.sage-card-main p { font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.7; margin-bottom: 28px; }
.sage-capabilities { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 32px; }
.sage-cap { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--color-text-secondary); }
.sage-cap::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--color-sage); flex-shrink: 0; }

/* Process */
.process { padding: var(--section-py) 0; background: var(--color-bg); }
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; }
.process-steps::before { content: ''; position: absolute; top: 48px; left: 16.6%; right: 16.6%; height: 1px; background: linear-gradient(90deg, var(--color-accent-dim), var(--color-accent), var(--color-accent-dim)); }
.process-step { text-align: center; padding: 36px 24px; position: relative; }
.process-step-number { width: 64px; height: 64px; border-radius: 50%; background: var(--color-bg-card); border: 2px solid var(--color-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700; color: var(--color-accent); position: relative; z-index: 2; }
.process-step h3 { font-size: 1.15rem; font-weight: 700; color: var(--color-white); margin-bottom: 8px; }
.process-step p { font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.65; max-width: 300px; margin: 0 auto; }

/* Team */
.team { padding: var(--section-py) 0; background: var(--color-bg-raised); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.team-layout { display: flex; flex-direction: column; gap: 64px; }
.team-text .section-subtitle { margin-bottom: 24px; }
.team-story { font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.75; max-width: 640px; }
.team-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.team-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; transition: all 0.4s var(--ease); }
.team-card:hover { border-color: var(--color-border-hover); background: var(--color-bg-card-hover); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.team-avatar { width: 100%; height: 280px; background: var(--color-surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 2rem; font-weight: 800; color: var(--color-text-dim); overflow: hidden; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team-card-body { padding: 24px 28px 28px; }
.team-card-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--color-white); margin-bottom: 2px; }
.team-card-role { font-size: 0.82rem; color: var(--color-accent); font-weight: 600; margin-bottom: 10px; }
.team-card-contact { display: flex; gap: 16px; }
.team-card-contact a { font-size: 0.8rem; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; transition: color 0.3s; }
.team-card-contact a:hover { color: var(--color-accent); }
.team-card-contact svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Contact */
.contact { padding: var(--section-py) 0; background: var(--color-bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-form-wrap { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 40px; }
.contact-form-title { font-size: 1.3rem; font-weight: 700; color: var(--color-white); margin-bottom: 6px; }
.contact-form-subtitle { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 6px; letter-spacing: 0.03em; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 11px 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); font-family: var(--font-display); font-size: 0.9rem; transition: border-color 0.3s, box-shadow 0.3s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-dim); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--color-text-dim); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23848a9c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-group select option { background: var(--color-bg-card); color: var(--color-text); }
.form-submit { width: 100%; padding: 13px; background: var(--color-accent); color: var(--color-bg); border: none; border-radius: var(--radius-sm); font-family: var(--font-display); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; transition: all 0.3s var(--ease); }
.form-submit:hover { background: #2ee8b7; box-shadow: 0 0 24px var(--color-accent-glow); }
.form-success { display: none; text-align: center; padding: 60px 20px; animation: successFadeIn 0.5s var(--ease) both; }
.form-success.show { display: block; }
.form-success-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--color-accent-dim); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.form-success-icon svg { width: 32px; height: 32px; stroke: var(--color-accent); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: checkDraw 0.6s var(--ease) 0.3s forwards; }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
@keyframes successFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.form-success h3 { font-size: 1.3rem; font-weight: 700; color: var(--color-white); margin-bottom: 8px; }
.form-success p { font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.6; margin-bottom: 24px; }
.form-hidden { display: none !important; }
.contact-info { padding-top: 8px; }
.contact-info > p { color: var(--color-text-secondary); font-size: 0.95rem; margin-bottom: 36px; line-height: 1.7; }
.contact-details { display: flex; flex-direction: column; gap: 24px; margin-bottom: 36px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--color-bg-card); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item-icon svg { width: 20px; height: 20px; stroke: var(--color-accent); fill: none; stroke-width: 2; }
.contact-item h4 { font-size: 0.8rem; font-weight: 600; color: var(--color-text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.contact-item p, .contact-item a { font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.5; }
.contact-item a:hover { color: var(--color-accent); }
.contact-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); height: 220px; }
.contact-map iframe { width: 100%; height: 100%; border: 0; filter: invert(0.9) hue-rotate(180deg) saturate(0.3) brightness(0.8); }

/* Footer */
.footer { background: var(--color-bg); border-top: 1px solid var(--color-border); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand { margin-bottom: 12px; }
.footer-desc { font-size: 0.85rem; color: var(--color-text-dim); line-height: 1.7; max-width: 320px; }
.footer h4 { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-text-dim); margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--color-text-secondary); transition: color 0.3s; }
.footer-links a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 0.75rem; color: var(--color-text-dim); }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 34px; height: 34px; border-radius: 8px; background: var(--color-bg-card); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.footer-social a:hover { border-color: var(--color-accent); background: var(--color-accent-dim); }
.footer-social svg { width: 16px; height: 16px; fill: var(--color-text-secondary); }

/* ==============================================
   INTERACTIVE TIMELINE (about page)
   ============================================== */
.timeline {
    position: relative;
    padding: var(--section-py) 0;
    background: var(--color-bg);
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
    transform: translateX(-50%);
}

.timeline-line-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--color-accent), var(--color-sage));
    transition: height 0.1s linear;
}

.timeline-items {
    position: relative;
    z-index: 1;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: center;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
    grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-spacer {
    grid-column: 1;
    grid-row: 1;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 3px solid var(--color-accent);
    transform: translateX(-50%);
    z-index: 2;
    transition: background 0.3s, border-color 0.3s;
}

.timeline-dot.active {
    background: var(--color-accent);
    box-shadow: 0 0 16px var(--color-accent-glow);
}

.timeline-dot.sage {
    border-color: var(--color-sage);
}

.timeline-dot.sage.active {
    background: var(--color-sage);
    box-shadow: 0 0 16px var(--color-sage-glow);
}

.timeline-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.4s var(--ease);
}

.timeline-content:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.timeline-year.sage { color: var(--color-sage); }

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ==============================================
   FAQ ACCORDION (contact page)
   ============================================== */
.faq {
    padding: var(--section-py) 0;
    background: var(--color-bg-raised);
    border-top: 1px solid var(--color-border);
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--color-bg-card);
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--color-border-hover);
}

.faq-item.open {
    border-color: var(--color-accent);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    transition: color 0.3s;
}

.faq-question:hover {
    color: var(--color-accent);
}

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease), background 0.3s;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    background: var(--color-accent-dim);
}

.faq-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--color-accent);
    fill: none;
    stroke-width: 2;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
}

.faq-answer-inner {
    padding: 0 24px 24px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ==============================================
   SERVICE DETAIL PAGE
   ============================================== */
.service-detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding: var(--section-py) 0;
}

.service-sidebar {
    position: sticky;
    top: 108px;
    align-self: start;
}

.sidebar-nav {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.sidebar-nav a.active {
    background: var(--color-accent-dim);
    color: var(--color-accent);
    font-weight: 600;
}

.sidebar-nav a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.service-detail-content section {
    margin-bottom: 80px;
    scroll-margin-top: 108px;
}

.service-detail-content .section-header {
    margin-bottom: 32px;
}

.detail-block {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 20px;
}

.detail-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
}

.detail-block p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.detail-block ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.detail-block li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.detail-block li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
    margin-top: 8px;
}

/* Typical engagement block */
.engagement-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.engagement-step {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.engagement-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-accent-dim);
    border: 1px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-accent);
    flex-shrink: 0;
}

.engagement-step h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 2px;
}

.engagement-step p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ==============================================
   COMMAND PALETTE
   ============================================== */
.cmd-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9998; opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0.25s; }
.cmd-overlay.open { opacity: 1; visibility: visible; }
.cmd-palette { position: fixed; top: 20%; left: 50%; transform: translateX(-50%) scale(0.96); width: 560px; max-width: 92vw; background: var(--color-bg-card); border: 1px solid var(--color-border-hover); border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,0.5); z-index: 9999; opacity: 0; visibility: hidden; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s; overflow: hidden; }
.cmd-palette.open { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
.cmd-input-wrap { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.cmd-input-wrap svg { width: 20px; height: 20px; stroke: var(--color-text-dim); fill: none; stroke-width: 2; flex-shrink: 0; }
.cmd-input { flex: 1; background: none; border: none; outline: none; font-family: var(--font-display); font-size: 1rem; color: var(--color-text); caret-color: var(--color-accent); }
.cmd-input::placeholder { color: var(--color-text-dim); }
.cmd-shortcut { font-family: var(--font-mono); font-size: 0.65rem; color: var(--color-text-dim); background: var(--color-surface); border: 1px solid var(--color-border); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.cmd-results { max-height: 320px; overflow-y: auto; padding: 8px; }
.cmd-results::-webkit-scrollbar { width: 4px; }
.cmd-results::-webkit-scrollbar-thumb { background: var(--color-border-hover); border-radius: 2px; }
.cmd-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; }
.cmd-item:hover, .cmd-item.active { background: var(--color-accent-dim); }
.cmd-item-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--color-surface); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cmd-item-icon svg { width: 16px; height: 16px; stroke: var(--color-accent); fill: none; stroke-width: 2; }
.cmd-item-icon.sage svg { stroke: var(--color-sage); }
.cmd-item-text h4 { font-size: 0.9rem; font-weight: 600; color: var(--color-white); margin-bottom: 1px; }
.cmd-item-text p { font-size: 0.75rem; color: var(--color-text-dim); }
.cmd-empty { text-align: center; padding: 32px 16px; color: var(--color-text-dim); font-size: 0.9rem; }
.cmd-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-top: 1px solid var(--color-border); font-size: 0.7rem; color: var(--color-text-dim); }
.cmd-footer-keys { display: flex; gap: 12px; }
.cmd-footer-keys span { display: flex; align-items: center; gap: 4px; }
.cmd-footer-keys kbd { font-family: var(--font-mono); font-size: 0.6rem; background: var(--color-surface); border: 1px solid var(--color-border); padding: 1px 5px; border-radius: 3px; }

/* ==============================================
   CTA BANNER (reusable across pages)
   ============================================== */
.cta-banner {
    padding: 80px 0;
    background: var(--color-bg-raised);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.cta-banner .section-title {
    margin-bottom: 12px;
}

.cta-banner .section-subtitle {
    margin: 0 auto 32px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1024px) {
    .hero-layout { grid-template-columns: 1fr; gap: 48px; }
    .hero-side { max-width: 500px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .sage-layout { grid-template-columns: 1fr; gap: 48px; }
    .team-cards { grid-template-columns: repeat(3, 1fr); }
    .problem-layout { grid-template-columns: 1fr; gap: 48px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .timeline-item { grid-template-columns: 1fr; gap: 0; }
    .timeline-line { left: 24px; }
    .timeline-dot { left: 24px; }
    .timeline-item:nth-child(even) .timeline-content { grid-column: 1; }
    .timeline-spacer { display: none; }
    /* minmax(0,...) + min-width:0 lets the single column shrink below its
       content's intrinsic width so the sidebar nav scrolls instead of forcing
       the whole page wider than the viewport (prevents the zoomed-out look) */
    .service-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .service-sidebar, .service-detail-content { min-width: 0; }
    .service-sidebar { position: static; }
    .sidebar-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px; }
    .sidebar-nav a { white-space: nowrap; padding: 10px 14px; }
    .engagement-steps { grid-template-columns: 1fr; }
    /* Collapse to the hamburger menu below 1025px: the full desktop bar
       (logo + 5 links + phone + toggle + CTA) needs ~1100px and wraps
       badly on tablets if left expanded */
    .nav-links { display: none; position: absolute; top: 88px; left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); flex-direction: column; padding: 8px var(--gap) 20px; gap: 0; }
    .nav-links.open { display: flex; }
    /* Larger tap targets for the primary menu (>=44px) */
    .nav-links > a { display: block; padding: 13px 0; font-size: 0.95rem; }
    .nav-links > a.nav-huddle { margin: 6px 0; padding: 13px 12px; }
    .nav-links > a + a { border-top: 1px solid var(--color-border); }
    /* Declutter the bar: Quote + theme move into the menu */
    .nav-menu-extra { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-border); }
    .nav-menu-cta { flex: 1; justify-content: center; padding: 13px 16px; font-size: 0.85rem; }
    .nav-right > .theme-toggle, .nav-right > .nav-cta { display: none; }
    .nav-menu-extra .theme-toggle { width: 44px; height: 44px; flex-shrink: 0; }
    .nav-menu-extra .theme-toggle svg { width: 18px; height: 18px; }
    .nav-toggle { display: block; }
}

@media (max-width: 640px) {
    :root { --section-py: 72px; }
    .nav-inner { height: 72px; padding-inline: 16px; }
    .nav-logo-img { height: 44px; }
    .nav-logo-img.logo-dark { height: 48px; }
    .footer-logo-img { width: 200px; height: auto; }
    /* Menu collapse rules live in the 1024px block; only the shorter bar
       and phone-number removal are phone-specific */
    .nav-links { top: 72px; }
    .nav-phone { display: none; }
    .hero { min-height: auto; padding: 96px 0 48px; }
    .hero h1 { font-size: 2rem; }
    .hero-desc { font-size: 1rem; }
    .hero-eyebrow { font-size: 0.65rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-stat-value { font-size: 1.6rem; }
    .services-grid { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr; gap: 12px; }
    .process-steps::before { display: none; }
    .team-cards { grid-template-columns: 1fr; }
    .team-avatar { height: 280px; }
    .form-row { grid-template-columns: 1fr; }
    /* 16px form controls prevent iOS Safari auto-zoom on focus */
    .form-group input, .form-group textarea, .form-group select { font-size: 16px; padding: 12px 14px; }
    /* Larger tap targets for icon controls and contact links (>=40px) */
    .footer-social a { width: 40px; height: 40px; }
    .contact-item a { display: inline-flex; align-items: center; min-height: 40px; }
    .sage-capabilities { grid-template-columns: 1fr; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.95rem; }
    .cmd-palette { top: 10%; width: 95vw; }
    .cmd-footer-keys { display: none; }
    .scroll-progress { height: 2px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .page-header { padding: 100px 0 40px; }
    .timeline-item { margin-bottom: 48px; }
}

/* ==============================================
   REDUCED MOTION
   Respect users who ask the OS to minimise motion.
   JS-driven effects (typing, parallax, counters) are
   additionally guarded in scripts.js.
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
    .hero-text, .hero-side { animation: none !important; }
    .hero-typed { border-right: none; }
}

/* ==============================================
   HUDDLE PRODUCT PAGE
   ============================================== */
.huddle-hero { min-height: 760px; padding: 144px 0 88px; position: relative; overflow: hidden; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.huddle-hero .hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(34,211,167,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,167,0.045) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to right, black 0%, transparent 75%); -webkit-mask-image: linear-gradient(to right, black 0%, transparent 75%); pointer-events: none; }
.huddle-hero-glow { position: absolute; width: 680px; height: 680px; right: -120px; top: 60px; border-radius: 50%; background: radial-gradient(circle, var(--color-accent-glow) 0%, rgba(99,102,241,0.12) 34%, transparent 70%); filter: blur(8px); pointer-events: none; }
.huddle-hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr); align-items: center; gap: clamp(48px, 7vw, 96px); }
.huddle-hero-copy h1 { max-width: 720px; margin-bottom: 24px; color: var(--color-white); font-size: clamp(3rem, 5.3vw, 5.2rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.055em; }
.huddle-hero-copy h1 span { color: var(--color-accent); }
.huddle-hero-copy > p { max-width: 650px; color: var(--color-text-secondary); font-size: 1.08rem; line-height: 1.75; }
.huddle-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.huddle-hero-notes { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.huddle-hero-notes span { display: inline-flex; align-items: center; gap: 7px; color: var(--color-text-dim); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.03em; }
.huddle-hero-notes svg { width: 14px; height: 14px; fill: none; stroke: var(--color-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.huddle-hero-visual { min-height: 630px; position: relative; }
.huddle-phone { overflow: hidden; border: 7px solid var(--color-bg-card); border-radius: 34px; background: #f7f8fd; box-shadow: 0 28px 80px rgba(0,0,0,0.42), 0 0 0 1px var(--color-border-hover); }
.huddle-phone img { width: 100%; height: auto; }
.huddle-phone-main { width: min(300px, 70%); position: absolute; z-index: 2; right: 15%; top: 0; }
.huddle-phone-side { width: min(230px, 54%); position: absolute; z-index: 1; right: -4%; top: 110px; opacity: 0.72; transform: rotate(4deg); }
.huddle-phone-bar { height: 24px; display: flex; align-items: center; justify-content: center; gap: 5px; background: var(--color-bg-card); }
.huddle-phone-bar span { width: 34px; height: 4px; border-radius: 99px; background: var(--color-border-hover); }
.huddle-phone-bar span + span { width: 5px; }
.huddle-floating-note { position: absolute; z-index: 3; left: 0; bottom: 58px; min-width: 210px; padding: 16px 18px; border: 1px solid var(--color-border-hover); border-radius: 12px; background: rgba(24,28,36,0.88); backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0,0,0,0.3); }
.huddle-floating-note strong, .huddle-floating-note span { display: block; }
.huddle-floating-note strong { color: var(--color-accent); font-size: 0.83rem; }
.huddle-floating-note span { margin-top: 3px; color: #aeb3c3; font-size: 0.72rem; }
[data-theme="light"] .huddle-floating-note { background: rgba(255,255,255,0.9); }
[data-theme="light"] .huddle-floating-note span { color: var(--color-text-secondary); }

.huddle-proof { background: var(--color-bg-raised); border-bottom: 1px solid var(--color-border); }
.huddle-proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.huddle-proof-grid > div { min-height: 126px; padding: 28px 24px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--color-border); }
.huddle-proof-grid > div:last-child { border-right: 0; }
.huddle-proof strong { color: var(--color-white); font-size: 1.05rem; }
.huddle-proof span { margin-top: 5px; color: var(--color-text-dim); font-size: 0.78rem; }

.huddle-contrast, .huddle-features, .huddle-showcase, .huddle-staff, .huddle-trust, .huddle-analytics-section { padding: var(--section-py) 0; }
.huddle-contrast { background: var(--color-bg); }
.huddle-compare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.huddle-compare-card { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-card); }
.huddle-compare-card.is-old { opacity: 0.78; }
.huddle-compare-card.is-huddle { border-color: rgba(34,211,167,0.3); background: linear-gradient(145deg, var(--color-bg-card), var(--color-accent-dim)); box-shadow: 0 24px 70px rgba(0,0,0,0.16); }
.huddle-compare-kicker { margin-bottom: 18px; color: var(--color-text-dim); font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.is-huddle .huddle-compare-kicker { color: var(--color-accent); }
.huddle-compare-card h3 { margin-bottom: 24px; color: var(--color-white); font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.25; }
.huddle-compare-card li { position: relative; padding: 11px 0 11px 28px; color: var(--color-text-secondary); border-top: 1px solid var(--color-border); font-size: 0.9rem; }
.huddle-compare-card li::before { content: '×'; position: absolute; left: 2px; color: var(--color-text-dim); font-weight: 700; }
.huddle-compare-card.is-huddle li::before { content: '✓'; color: var(--color-accent); }

.huddle-features { background: var(--color-bg-raised); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.huddle-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.huddle-feature-card { min-height: 270px; padding: 26px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-card); transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease); }
.huddle-feature-card:hover { transform: translateY(-4px); border-color: var(--color-border-hover); background: var(--color-bg-card-hover); }
.huddle-feature-icon { width: 44px; height: 44px; margin-bottom: 28px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--color-accent-dim); color: var(--color-accent); }
.huddle-feature-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.huddle-feature-card h3 { margin-bottom: 10px; color: var(--color-white); font-size: 1rem; }
.huddle-feature-card p { color: var(--color-text-secondary); font-size: 0.82rem; line-height: 1.7; }

.huddle-showcase { background: var(--color-bg); overflow: hidden; }
.huddle-showcase-layout { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(500px, 1.14fr); align-items: center; gap: clamp(56px, 9vw, 112px); }
.huddle-check-list { display: grid; gap: 14px; margin: 30px 0; }
.huddle-check-list div { display: flex; align-items: flex-start; gap: 12px; color: var(--color-text-secondary); font-size: 0.88rem; }
.huddle-check-list svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; fill: none; stroke: var(--color-accent); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.huddle-text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--color-accent); font-size: 0.86rem; font-weight: 700; }
.huddle-text-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.25s var(--ease); }
.huddle-text-link:hover svg { transform: translateX(4px); }
.huddle-screen-pair { min-height: 660px; position: relative; }
.huddle-screen-card { width: 285px; overflow: hidden; position: absolute; left: 0; top: 0; border: 6px solid var(--color-bg-card); border-radius: 28px; background: #fff; box-shadow: 0 26px 70px rgba(0,0,0,0.3); }
.huddle-screen-card.is-offset { left: auto; right: 0; top: 80px; }
.huddle-screen-card img { width: 100%; }
.huddle-screen-card figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 10px 12px; border-radius: 8px; background: rgba(12,14,18,0.86); backdrop-filter: blur(10px); color: #fff; font-size: 0.7rem; text-align: center; }

.huddle-staff { background: var(--color-bg-raised); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.huddle-dashboard { overflow: hidden; border: 1px solid var(--color-border-hover); border-radius: 16px; background: var(--color-bg-card); box-shadow: 0 30px 90px rgba(0,0,0,0.22); }
.huddle-dashboard-bar { height: 44px; padding: 0 16px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--color-border); background: var(--color-bg-card); }
.huddle-dashboard-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-dim); opacity: 0.55; }
.huddle-dashboard-bar span:nth-child(2) { background: var(--color-accent); }
.huddle-dashboard-bar small { margin-left: 8px; color: var(--color-text-dim); font-family: var(--font-mono); font-size: 0.62rem; }
.huddle-dashboard img { width: 100%; }
.huddle-staff-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.huddle-staff-points article { padding: 26px; border-top: 1px solid var(--color-border-hover); }
.huddle-staff-points span { color: var(--color-accent); font-family: var(--font-mono); font-size: 0.68rem; }
.huddle-staff-points h3 { margin: 10px 0 7px; color: var(--color-white); font-size: 1rem; }
.huddle-staff-points p { color: var(--color-text-secondary); font-size: 0.82rem; }

.huddle-trust { background: var(--color-bg); }
.huddle-trust-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(48px, 8vw, 100px); }
.huddle-trust-copy .btn { margin-top: 30px; }
.huddle-trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.huddle-trust-grid article { min-height: 210px; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-card); }
.huddle-trust-grid svg { width: 28px; height: 28px; margin-bottom: 30px; fill: none; stroke: var(--color-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.huddle-trust-grid h3 { margin-bottom: 8px; color: var(--color-white); font-size: 0.96rem; }
.huddle-trust-grid p { color: var(--color-text-secondary); font-size: 0.8rem; line-height: 1.65; }

.huddle-analytics-section { background: var(--color-bg-raised); border-top: 1px solid var(--color-border); }
.huddle-analytics-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr); align-items: center; gap: clamp(42px, 7vw, 90px); }
.huddle-analytics-layout .huddle-dashboard img { aspect-ratio: 1.42 / 1; object-fit: cover; object-position: bottom; }

.huddle-demo { padding: 112px 0; position: relative; overflow: hidden; text-align: center; background: var(--color-bg); border-top: 1px solid var(--color-border); }
.huddle-demo-glow { position: absolute; width: 720px; height: 420px; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(ellipse, var(--color-accent-glow) 0%, transparent 67%); pointer-events: none; }
.huddle-demo .container { position: relative; z-index: 1; }
.huddle-demo .section-label { margin-inline: auto; }
.huddle-demo .section-subtitle { max-width: 680px; margin: 0 auto; }
.huddle-demo .cta-actions { margin-top: 32px; }
.huddle-demo-note { margin-top: 18px; color: var(--color-text-dim); font-family: var(--font-mono); font-size: 0.66rem; }

@media (max-width: 1100px) {
    .nav-links { gap: 24px; }
    .huddle-hero-layout { grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr); gap: 36px; }
    .huddle-feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .huddle-hero { padding-top: 124px; }
    .huddle-hero-layout, .huddle-showcase-layout, .huddle-trust-layout, .huddle-analytics-layout { grid-template-columns: 1fr; }
    .huddle-hero-copy { max-width: 760px; }
    .huddle-hero-visual { width: min(620px, 100%); margin: 10px auto 0; }
    .huddle-proof-grid { grid-template-columns: repeat(2, 1fr); }
    .huddle-proof-grid > div:nth-child(2) { border-right: 0; }
    .huddle-proof-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
    .huddle-showcase-copy { max-width: 680px; }
    .huddle-screen-pair { width: min(600px, 100%); }
    .huddle-analytics-layout > div { max-width: 620px; }
}

@media (max-width: 700px) {
    .huddle-hero { min-height: auto; padding: 104px 0 56px; }
    .huddle-hero-copy h1 { font-size: clamp(2.35rem, 11vw, 3.35rem); }
    .huddle-hero-copy h1 br,
    .huddle-contrast .section-title br,
    .huddle-features .section-title br,
    .huddle-showcase .section-title br,
    .huddle-staff .section-title br,
    .huddle-trust .section-title br,
    .huddle-demo .section-title br { display: none; }
    .huddle-hero-copy > p { font-size: 0.98rem; }
    .huddle-actions { flex-direction: column; }
    .huddle-actions .btn { width: 100%; justify-content: center; }
    .huddle-hero-notes { gap: 10px 16px; }
    .huddle-hero-visual { min-height: 0; width: 100%; margin-top: 36px; display: flex; justify-content: center; }
    .huddle-phone { border-width: 5px; border-radius: 28px; box-shadow: 0 22px 58px rgba(0,0,0,0.34), 0 0 0 1px var(--color-border-hover); }
    .huddle-phone-main { width: min(280px, 82vw); position: relative; right: auto; left: auto; top: auto; }
    .huddle-phone-side, .huddle-floating-note { display: none; }
    .huddle-contrast, .huddle-features, .huddle-showcase, .huddle-staff, .huddle-trust, .huddle-analytics-section { padding: 56px 0; }
    .huddle-proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .huddle-proof-grid > div { min-height: 92px; padding: 18px 14px; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
    .huddle-proof-grid > div:nth-child(even) { border-right: 0; }
    .huddle-proof-grid > div:nth-child(n+3) { border-bottom: 0; }
    .huddle-proof strong { font-size: 0.9rem; }
    .huddle-proof span { font-size: 0.7rem; }
    .huddle-compare-grid, .huddle-feature-grid, .huddle-staff-points, .huddle-trust-grid { grid-template-columns: 1fr; }
    .huddle-compare-card { padding: 22px; }
    .huddle-feature-grid { gap: 12px; }
    .huddle-feature-card { min-height: 0; padding: 18px; display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px; }
    .huddle-feature-card:hover { transform: none; }
    .huddle-feature-icon { width: 42px; height: 42px; margin: 0; grid-row: 1 / 3; }
    .huddle-feature-card h3 { margin: 0; align-self: end; }
    .huddle-feature-card p { grid-column: 2; margin: 0; line-height: 1.55; }
    .huddle-screen-pair { min-height: 0; width: 100%; padding-top: 30px; display: flex; justify-content: center; }
    .huddle-screen-card { width: min(280px, 84vw); position: relative; left: auto; top: auto; }
    .huddle-screen-card.is-offset { display: none; }
    .huddle-dashboard { border-radius: 10px; }
    .huddle-dashboard-bar { height: 38px; }
    .huddle-dashboard-bar small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .huddle-dashboard picture { display: block; }
    .huddle-dashboard img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
    .huddle-staff-points { gap: 0; margin-top: 18px; }
    .huddle-staff-points article { padding: 18px 4px; }
    .huddle-staff-points h3 { margin: 6px 0 4px; }
    .huddle-trust-grid article { min-height: 0; padding: 18px; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
    .huddle-trust-grid svg { width: 25px; height: 25px; margin: 0; grid-row: 1 / 3; }
    .huddle-trust-grid h3 { margin: 0; }
    .huddle-trust-grid p { grid-column: 2; }
    .huddle-analytics-layout > div { order: 1; }
    .huddle-analytics-layout > figure { order: 2; }
    .huddle-analytics-layout .huddle-dashboard img { aspect-ratio: auto; object-fit: contain; object-position: top; }
    .huddle-demo { padding: 72px 0; }
    .huddle-demo .cta-actions { flex-direction: column; }
    .huddle-demo .btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
    .huddle-phone-main { width: min(260px, 82vw); }
    .huddle-screen-card { width: min(270px, 86vw); }
}
