/* ══════════════════════════════════════════════
   Totail.ai — Warm Editorial Design System
   Aesthetic: Editorial magazine meets premium consultancy
   Fonts: Syne (display) + Outfit (body)
   Palette: Cream + Charcoal + Coral accent
   ══════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
    /* Palette */
    --cream:        #FAF8F5;
    --cream-dark:   #F0EDE8;
    --charcoal:     #1C1917;
    --warm-black:   #141210;
    --coral:        #5B5BD6;
    --coral-light:  #7B7FE6;
    --coral-dark:   #4747B5;
    --coral-glow:   rgba(91, 91, 214, 0.15);

    /* Neutrals */
    --stone-700:    #44403C;
    --stone-500:    #78716C;
    --stone-400:    #A8A29E;
    --stone-300:    #D6D3D1;
    --stone-200:    #E7E5E3;
    --stone-100:    #F5F5F4;

    /* Functional */
    --border-light: #E7E5E3;
    --border-dark:  #292524;
    --surface-dark: #1C1917;

    /* Shadows */
    --shadow-sm:    0 1px 2px rgba(28,25,23,0.05);
    --shadow-md:    0 4px 16px rgba(28,25,23,0.08);
    --shadow-lg:    0 12px 40px rgba(28,25,23,0.12);
    --shadow-coral: 0 8px 30px rgba(91,91,214,0.25);

    /* Typography */
    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body:    'Outfit', sans-serif;
    --text-hero:    clamp(3.2rem, 7vw, 6rem);
    --text-h1:      clamp(2.1rem, 5vw, 4rem);
    --text-h2:      clamp(2rem, 4vw, 3rem);
    --text-h3:      clamp(1.3rem, 2vw, 1.6rem);
    --text-h4:      clamp(1.05rem, 1.5vw, 1.2rem);
    --text-xl:      1.25rem;
    --text-lg:      1.125rem;
    --text-base:    1rem;
    --text-sm:      0.875rem;
    --text-xs:      0.75rem;
    --leading-tight:  1.2;
    --leading-snug:   1.25;
    --leading-normal: 1.6;
    --tracking-tight: -0.03em;
    --tracking-wide:  0.06em;
    --tracking-wider: 0.12em;

    /* Spacing */
    --section-y: clamp(5rem, 10vw, 8rem);
    --section-x: clamp(1.5rem, 5vw, 4rem);
    --max-content: 1200px;
    --max-text: 680px;
    --max-narrow: 540px;

    /* Radius */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 100px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--charcoal);
    background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Container ── */
.container { max-width: var(--max-content); margin: 0 auto; }

/* ── Grain Texture (pseudo-element overlay) ── */
.grain { position: relative; }
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    mix-blend-mode: multiply;
    z-index: 0;
}


/* ══════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--coral);
    width: 0%;
    z-index: 10001;
    pointer-events: none;
}


/* ══════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════ */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem var(--section-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
    background: transparent;
}
nav.scrolled {
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

/* Logo: mark + wordmark */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    z-index: 200;
}
.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    transition: color 0.3s;
}
.logo-accent { color: var(--coral); }

/* Logo staggered fade-in on load */
.logo-mark .mark-bg {
    opacity: 0;
    animation: logoFillIn 0.4s ease 0.05s forwards;
}
.logo-mark .mark-t {
    opacity: 0;
    animation: logoFillIn 0.3s ease 0.25s forwards;
}
.logo-mark .mark-l {
    opacity: 0;
    animation: logoFillIn 0.3s ease 0.4s forwards;
}
@keyframes logoFillIn {
    to { opacity: 1; }
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}
.nav-links a {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--stone-500);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    transition: color 0.2s;
    text-decoration: none;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coral);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover,
.nav-links a.active { color: var(--charcoal); }

/* Nav CTA */
.nav-cta {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    margin: 6px 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5.5px, 5.5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5.5px, -5.5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--warm-black);
    z-index: 150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(250,248,245,0.6);
    text-decoration: none;
    transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--cream); }
.mobile-menu .btn { margin-top: 1rem; font-size: 1rem; }


/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    position: relative;
}

/* Primary — coral fill */
.btn-primary {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
}
.btn-primary:hover {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-coral);
}

/* Secondary — charcoal outline */
.btn-secondary {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--stone-300);
}
.btn-secondary:hover {
    background: var(--charcoal);
    color: var(--cream);
    border-color: var(--charcoal);
    transform: translateY(-2px);
}

/* Ghost — text with arrow */
.btn-ghost {
    background: transparent;
    color: var(--coral);
    border: none;
    padding: 0.5rem 0;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: var(--text-base);
}
.btn-ghost::after {
    content: '\2192';
    transition: transform 0.3s;
}
.btn-ghost:hover::after { transform: translateX(4px); }

/* Light outline (on dark backgrounds) */
.btn-outline-light {
    background: transparent;
    color: var(--cream);
    border-color: rgba(250,248,245,0.2);
}
.btn-outline-light:hover {
    background: rgba(250,248,245,0.1);
    border-color: rgba(250,248,245,0.4);
}

/* Nav button */
.btn-nav {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
    padding: 0.6rem 1.25rem;
    font-size: var(--text-xs);
}
.btn-nav:hover {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
}


/* ══════════════════════════════════════
   SECTION PRIMITIVES
   ══════════════════════════════════════ */

.section {
    padding: var(--section-y) var(--section-x);
    position: relative;
}
.section.dark {
    background: var(--warm-black);
    color: var(--cream);
}
.section.alt {
    background: var(--cream-dark);
}

/* Dot pattern for dark sections */
.section.dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(250,248,245,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Section header */
.section-header {
    max-width: 650px;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}
.section-header .hr-coral {
    width: 48px;
    height: 3px;
    background: var(--coral);
    border: none;
    margin-bottom: 1.5rem;
    border-radius: 2px;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    line-height: 1.3;
    margin-bottom: 1rem;
    padding: 0.15em 0;
}
.section-header p {
    color: var(--stone-500);
    font-size: var(--text-lg);
    font-weight: 300;
    line-height: var(--leading-normal);
}
.section.dark .section-header p { color: var(--stone-400); }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-header.center .hr-coral { margin-left: auto; margin-right: auto; }


/* ══════════════════════════════════════
   PAGE HERO
   ══════════════════════════════════════ */

.page-hero {
    padding: 10rem var(--section-x) 5rem;
    position: relative;
    background: var(--cream);
}
.page-hero .hero-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--coral-glow);
    color: var(--coral);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: 2rem;
}
.page-hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: var(--tracking-tight);
    max-width: 800px;
    margin-bottom: 1.5rem;
    color: var(--charcoal);
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding: 0.15em 0;
}
.page-hero h1 .accent { color: var(--coral); }
.page-hero .hero-sub {
    font-size: var(--text-xl);
    font-weight: 300;
    color: var(--stone-500);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}
.page-hero .hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero load animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-anim {
    animation-fill-mode: both;
    animation-duration: 0.7s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-anim-1 { animation-name: fadeUp; animation-delay: 0.1s; }
.hero-anim-2 { animation-name: fadeUp; animation-delay: 0.25s; }
.hero-anim-3 { animation-name: fadeUp; animation-delay: 0.4s; }
.hero-anim-4 { animation-name: fadeUp; animation-delay: 0.55s; }
.hero-anim-5 { animation-name: fadeUp; animation-delay: 0.7s; }


/* ══════════════════════════════════════
   STATS STRIP
   ══════════════════════════════════════ */

.stats-strip {
    padding: 3.5rem var(--section-x);
    background: var(--warm-black);
    position: relative;
}
.stats-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(250,248,245,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.stats-grid {
    display: flex;
    gap: clamp(3rem, 6vw, 6rem);
    max-width: var(--max-content);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--coral);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
}
.stat-label {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--stone-400);
    letter-spacing: var(--tracking-wide);
}


/* ══════════════════════════════════════
   MARQUEE TICKER
   ══════════════════════════════════════ */

.marquee {
    overflow: hidden;
    background: var(--charcoal);
    padding: 0.85rem 0;
    white-space: nowrap;
}
.marquee-inner {
    display: inline-flex;
    align-items: center;
    animation: marquee-scroll 30s linear infinite;
    will-change: transform;
}
.marquee-inner span {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--cream);
    padding: 0 1.25rem;
    flex-shrink: 0;
}
.marquee-inner .dot {
    color: var(--coral);
    font-size: 1.2rem;
    padding: 0 0.5rem;
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-inner { animation: none; }
}


/* ══════════════════════════════════════
   FEATURE GRID
   ══════════════════════════════════════ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}
/* Card watermark numbers */
.card-number {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    color: var(--stone-200);
    line-height: 1;
    pointer-events: none;
    transition: color 0.35s;
    user-select: none;
}
.feature-card:hover .card-number {
    color: rgba(91, 91, 214, 0.12);
}
.section.dark .card-number {
    color: rgba(250,248,245,0.06);
}
.section.dark .feature-card:hover .card-number {
    color: rgba(91,91,214,0.15);
}

.feature-card {
    padding: 2.5rem;
    background: var(--cream);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--coral);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover {
    transform: translateY(-4px) scale(1.005);
    border-color: var(--coral);
    box-shadow: 0 0 0 1px var(--coral), var(--shadow-lg);
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--coral-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--coral);
}
.feature-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    padding: 0.15em 0;
}
.feature-card p {
    color: var(--stone-500);
    font-size: var(--text-base);
    font-weight: 300;
    line-height: 1.7;
    flex: 1;
}
.feature-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    color: var(--coral);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: gap 0.3s;
}
.feature-card:hover .card-link { gap: 0.75rem; }

/* Dark variant */
.section.dark .feature-card {
    background: rgba(250,248,245,0.04);
    border-color: rgba(250,248,245,0.08);
}
.section.dark .feature-card:hover {
    border-color: var(--coral);
    background: rgba(250,248,245,0.06);
    box-shadow: 0 0 0 1px var(--coral), 0 20px 40px rgba(0,0,0,0.3);
}
.section.dark .feature-card h3 { color: var(--cream); }
.section.dark .feature-card p { color: var(--stone-400); }
.section.dark .feature-icon {
    background: rgba(91,91,214,0.15);
    color: var(--coral-light);
}


/* ══════════════════════════════════════
   INDUSTRY / USE-CASE CARDS
   ══════════════════════════════════════ */

.use-cases {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}
.use-case {
    padding: 2rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.use-case:hover {
    border-color: var(--coral);
    transform: translateY(-2px);
}
.use-case h4 {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    padding: 0.15em 0;
}
.use-case p {
    color: var(--stone-500);
    font-size: var(--text-base);
    font-weight: 300;
    line-height: 1.7;
}

/* Dark use-cases */
.section.dark .use-case {
    border-color: rgba(250,248,245,0.08);
    background: rgba(250,248,245,0.03);
}
.section.dark .use-case:hover {
    border-color: var(--coral);
    background: rgba(250,248,245,0.05);
}
.section.dark .use-case h4 { color: var(--cream); }
.section.dark .use-case p { color: var(--stone-400); }


/* ══════════════════════════════════════
   CAPABILITY / BEFORE-AFTER CARDS
   ══════════════════════════════════════ */

.capability-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}
.capability-card {
    padding: 2rem;
    background: var(--cream-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}
.capability-card h4 {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--coral);
    padding: 0.15em 0;
}
.capability-card .before-after {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.capability-card .ba-item { display: flex; flex-direction: column; gap: 0.15rem; }
.capability-card .label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}
.capability-card .label.before { color: var(--stone-400); }
.capability-card .label.after { color: var(--coral); }
.capability-card .desc {
    color: var(--stone-500);
    font-size: var(--text-sm);
    font-weight: 300;
    line-height: 1.6;
}


/* ══════════════════════════════════════
   PROCESS STEPS
   ══════════════════════════════════════ */

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}
.process-grid::before {
    content: '';
    position: absolute;
    top: 2rem;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--stone-300);
    z-index: 0;
}
.section.dark .process-grid::before { background: var(--border-dark); }
.process-step {
    text-align: center;
    position: relative;
    z-index: 1;
}
.step-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 800;
    color: var(--coral);
    line-height: 1;
    margin-bottom: 1rem;
}
.process-step h4 {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    padding: 0.15em 0;
}
.process-step p {
    color: var(--stone-500);
    font-size: var(--text-sm);
    font-weight: 300;
    line-height: 1.6;
}
.section.dark .process-step p { color: var(--stone-400); }


/* ══════════════════════════════════════
   SERVICE BLOCKS (alternating layout)
   ══════════════════════════════════════ */

.service-block {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
    padding: var(--section-y) var(--section-x);
    position: relative;
}
.service-block.reverse { grid-template-columns: 3fr 2fr; }
.service-block.reverse .service-visual { order: 2; }
.service-block.reverse .service-content { order: 1; }

.service-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-number {
    font-family: var(--font-display);
    font-size: clamp(6rem, 12vw, 12rem);
    font-weight: 800;
    color: var(--coral-glow);
    line-height: 1;
    user-select: none;
}
.service-content .service-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--coral-glow);
    color: var(--coral);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.service-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    line-height: 1.3;
    margin-bottom: 1rem;
    padding: 0.15em 0;
}
.service-content > p {
    color: var(--stone-500);
    font-size: var(--text-lg);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.includes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.includes-grid .item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--stone-700);
    font-weight: 400;
}
.includes-grid .check {
    color: var(--coral);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}


/* ══════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════ */

.cta {
    padding: var(--section-y) var(--section-x);
    text-align: center;
    position: relative;
    background: var(--warm-black);
    color: var(--cream);
}
.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(250,248,245,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.cta h2 {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 800;
    letter-spacing: var(--tracking-tight);
    line-height: 1.3;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    padding: 0.15em 0;
}
.cta > p {
    color: var(--stone-400);
    font-size: var(--text-lg);
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: var(--max-narrow);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.cta-contact {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}
.cta-contact a {
    color: var(--stone-400);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    text-decoration: none;
}
.cta-contact a:hover { color: var(--cream); }
.cta-contact a svg { width: 18px; height: 18px; }


/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */

footer {
    padding: 3.5rem var(--section-x);
    border-top: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 3rem;
    align-items: center;
    background: var(--cream);
}
.footer-brand .logo-text {
    font-size: 1.3rem;
}
.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: var(--text-sm);
    color: var(--stone-500);
    transition: color 0.2s;
    text-decoration: none;
}
.footer-links a:hover { color: var(--charcoal); }
.footer-social {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}
.footer-social a {
    color: var(--stone-400);
    transition: color 0.2s;
    display: flex;
}
.footer-social a:hover { color: var(--coral); }
.footer-social a svg { width: 20px; height: 20px; }
footer .copyright {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--stone-400);
    font-size: var(--text-xs);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}


/* ══════════════════════════════════════
   MODAL / CONTACT FORM
   ══════════════════════════════════════ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20,18,16,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 60px rgba(20,18,16,0.3);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--stone-400);
    transition: color 0.2s;
    z-index: 10;
}
.modal-close:hover { color: var(--charcoal); }
.modal h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.modal > p {
    color: var(--stone-500);
    font-weight: 300;
    margin-bottom: 1.5rem;
    font-size: var(--text-sm);
}
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: 0.4rem;
    color: var(--stone-700);
}
.form-group label .required { color: var(--coral); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: var(--font-body);
    font-weight: 400;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: var(--charcoal);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px var(--coral-glow);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.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 12 12'%3E%3Cpath fill='%2378716C' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
.modal .btn { width: 100%; padding: 1rem; margin-top: 0.5rem; }
.form-success { text-align: center; padding: 2rem 0; }
.form-success .checkmark {
    width: 64px;
    height: 64px;
    background: var(--coral-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.form-success .checkmark svg { color: var(--coral); }
.form-success h3 { margin-bottom: 0.5rem; }
.form-success p { color: var(--stone-500); font-weight: 300; }


/* ══════════════════════════════════════
   SCROLL REVEAL SYSTEM
   ══════════════════════════════════════ */

/* Default: fade up */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade from right */
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up reveal (cards) */
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Heading reveal (fade up — no clip-path to avoid Syne font clipping) */
.reveal-clip {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-clip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay via custom property */
.reveal[style*="--delay"],
.reveal-left[style*="--delay"],
.reveal-right[style*="--delay"],
.reveal-scale[style*="--delay"],
.reveal-clip[style*="--delay"] {
    transition-delay: var(--delay);
}

/* Auto-stagger children in grids */
.stagger-children > *:nth-child(1) { --delay: 0s; }
.stagger-children > *:nth-child(2) { --delay: 0.07s; }
.stagger-children > *:nth-child(3) { --delay: 0.14s; }
.stagger-children > *:nth-child(4) { --delay: 0.21s; }
.stagger-children > *:nth-child(5) { --delay: 0.28s; }
.stagger-children > *:nth-child(6) { --delay: 0.35s; }


/* ══════════════════════════════════════
   ANIMATED HR-CORAL
   ══════════════════════════════════════ */

.hr-coral-anim {
    width: 0;
    height: 3px;
    background: var(--coral);
    border: none;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 1.5rem;
}
.hr-coral-anim.visible {
    width: 48px;
}


/* ══════════════════════════════════════
   CARD 3D TILT EFFECT
   ══════════════════════════════════════ */

@media (pointer: fine) {
    .feature-grid {
        perspective: 1000px;
    }
    .tilt-card {
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    border-color 0.4s ease;
    }
    .tilt-card .tilt-shine {
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(
            circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(91, 91, 214, 0.08) 0%,
            transparent 60%
        );
        opacity: 0;
        transition: opacity 0.4s;
        pointer-events: none;
        z-index: 1;
    }
    .tilt-card:hover .tilt-shine { opacity: 1; }
}


/* ══════════════════════════════════════
   MAGNETIC BUTTON
   ══════════════════════════════════════ */

@media (pointer: fine) {
    .magnetic {
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}


/* ══════════════════════════════════════
   STAT COUNTER ANIMATION
   ══════════════════════════════════════ */

.stat-number[data-count] {
    font-variant-numeric: tabular-nums;
}


/* ══════════════════════════════════════
   NAV LOAD ANIMATION
   ══════════════════════════════════════ */

@keyframes navFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nav-anim {
    animation: navFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.nav-anim-1 { animation-delay: 0.05s; }
.nav-anim-2 { animation-delay: 0.1s; }
.nav-anim-3 { animation-delay: 0.15s; }
.nav-anim-4 { animation-delay: 0.2s; }
.nav-anim-5 { animation-delay: 0.25s; }
.nav-anim-6 { animation-delay: 0.3s; }


/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
    .process-grid::before { display: none; }
    .service-block,
    .service-block.reverse { grid-template-columns: 1fr; gap: 2rem; }
    .service-block.reverse .service-visual { order: 0; }
    .service-block.reverse .service-content { order: 0; }
    .service-number { font-size: 6rem; }
}

@media (max-width: 768px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .hamburger { display: block; }

    .page-hero { padding: 7rem 1.5rem 3.5rem; }
    .page-hero h1 { hyphens: auto; -webkit-hyphens: auto; }
    .page-hero .hero-buttons { flex-direction: column; gap: 0.75rem; }
    .page-hero .hero-buttons .btn { width: 100%; text-align: center; padding: 1rem; }

    .section { padding: 3.5rem 1.5rem; }
    .stats-strip { padding: 2.5rem 1.5rem; }
    .stats-grid { flex-direction: column; gap: 1.5rem; }

    .feature-grid { grid-template-columns: 1fr; }
    .use-cases { grid-template-columns: 1fr; }
    .capability-cards { grid-template-columns: 1fr; }
    .process-grid { grid-template-columns: 1fr; gap: 2rem; }

    .service-block,
    .service-block.reverse { padding: 3rem 1.5rem; grid-template-columns: 1fr; }
    .service-number { font-size: 5rem; }
    .includes-grid { grid-template-columns: 1fr; }

    .cta { padding: 4rem 1.5rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .cta-buttons .btn { width: 100%; max-width: 320px; text-align: center; }
    .cta-contact { flex-direction: column; gap: 1rem; }

    footer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 2.5rem 1.5rem;
    }
    .footer-links { justify-content: center; }
    .footer-social { justify-content: center; }

    .modal { padding: 1.5rem; border-radius: var(--radius-md); max-height: calc(100vh - 3rem); }
    .modal h3 { font-size: 1.3rem; padding-right: 2rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 16px; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-clip {
        opacity: 1 !important;
        transform: none !important;
    }
}
