/**
 * DevWharf Landing Sections v7.2 — Awwwards Edition
 * 
 * CRITICAL RULES:
 * - NEVER use clip-path on text (clips descenders: g, p, y, j, q)
 * - NEVER use opacity: 0 as initial state (elements get stuck invisible)
 * - Use translateY + transition for scroll reveals (always readable if JS fails)
 * - Use 'both' fill mode on all keyframe animations
 * - overflow: hidden on sections (80px+ padding prevents card clipping)
 *
 * @package DevWharf_Theme
 * @version 7.2.0
 */

/* =============================================================
   @property REGISTRATIONS
   ============================================================= */
@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@property --bg-rotate {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@property --hero-parallax {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}

@property --card-glow-x {
    syntax: '<percentage>';
    initial-value: 50%;
    inherits: false;
}

@property --card-glow-y {
    syntax: '<percentage>';
    initial-value: 50%;
    inherits: false;
}

@property --shimmer-pos {
    syntax: '<percentage>';
    initial-value: -100%;
    inherits: false;
}

/* =============================================================
   SECTIONS — Full-width with CSS animated backgrounds
   ============================================================= */
.dw-section {
    position: relative;
    width: 100%;
    /* clip (not hidden) — same visual clipping but does NOT create a
       new scroll container, which would break animation-timeline: view()
       on child elements. Sections have 80px+ padding so card hover
       lift (-8px) never reaches the boundary. */
    overflow: clip;
}

/* Animated conic-gradient background */
.dw-section::before {
    content: '';
    position: absolute;
    inset: -20%;
    width: 140%;
    height: 140%;
    pointer-events: none;
    z-index: 0;
    transform-origin: center center;
    animation: dw-bg-rotate 45s linear infinite;
}

@keyframes dw-bg-rotate {
    to { transform: rotate(360deg); }
}

.dw-section > * {
    position: relative;
    z-index: 1;
}

/* Per-section backgrounds */
.dw-section-hero { background: #08080c !important; overflow: clip; }
.dw-section-hero::before { display: none; }

/* Noise texture overlay for premium depth */
.dw-section-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
    mix-blend-mode: overlay;
}

/* Scroll-driven parallax on hero canvas */
.dw-hero-canvas {
    animation: dw-hero-parallax-scroll linear both;
    animation-timeline: --page-scroll;
    animation-range: 0% 30%;
}

@keyframes dw-hero-parallax-scroll {
    from { transform: translateY(0) scale(1); }
    to   { transform: translateY(-80px) scale(1.05); opacity: 0.3; }
}

.dw-section-services { background: #0a0f1a !important; }
.dw-section-services::before {
    background: conic-gradient(from 0deg at 25% 75%,
        rgba(16,185,129,0.04) 0deg, transparent 60deg,
        rgba(6,182,212,0.03) 120deg, transparent 180deg,
        rgba(16,185,129,0.02) 240deg, transparent 360deg);
    opacity: 0.7;
    animation: dw-bg-rotate 50s linear infinite;
}

.dw-section-vision { background: #0d0a1a !important; }
.dw-section-vision::before {
    background: conic-gradient(from 0deg at 70% 35%,
        rgba(139,92,246,0.05) 0deg, transparent 90deg,
        rgba(99,102,241,0.03) 180deg, transparent 270deg,
        rgba(139,92,246,0.04) 360deg);
    opacity: 0.6;
    animation: dw-bg-rotate 55s linear infinite reverse;
}

.dw-section-methodology { background: #0a1018 !important; }
.dw-section-methodology::before {
    background: conic-gradient(from 0deg at 50% 20%,
        rgba(59,130,246,0.04) 0deg, transparent 72deg,
        rgba(6,182,212,0.03) 144deg, transparent 216deg,
        rgba(59,130,246,0.02) 288deg, transparent 360deg);
    opacity: 0.6;
    animation: dw-bg-rotate 48s linear infinite;
}

.dw-section-tech { background: #100a18 !important; }
.dw-section-tech::before {
    background: conic-gradient(from 0deg at 80% 50%,
        rgba(139,92,246,0.04) 0deg, transparent 120deg,
        rgba(6,182,212,0.03) 240deg, transparent 360deg);
    opacity: 0.6;
    animation: dw-bg-rotate 52s linear infinite reverse;
}

.dw-section-faq { background: #0c1018 !important; }
.dw-section-faq .dw-faq-item,
.dw-section-faq .dw-faq-trigger,
.dw-section-faq .dw-faq-answer,
.dw-section-faq .dw-faq-item *:not(.dw-faq-toggle-bar) {
    background-color: transparent !important;
}
.dw-section-faq::before {
    background: conic-gradient(from 0deg at 30% 60%,
        rgba(245,158,11,0.03) 0deg, transparent 90deg,
        rgba(99,102,241,0.02) 180deg, transparent 270deg,
        rgba(245,158,11,0.02) 360deg);
    opacity: 0.5;
    animation: dw-bg-rotate 60s linear infinite;
}

.dw-section-cta { background: #12081a !important; }
.dw-section-cta::before {
    background: conic-gradient(from 0deg at 50% 50%,
        rgba(139,92,246,0.06) 0deg, transparent 90deg,
        rgba(99,102,241,0.04) 180deg, transparent 270deg,
        rgba(139,92,246,0.05) 360deg);
    opacity: 0.5;
    animation: dw-bg-rotate 40s linear infinite reverse;
}

.dw-section-contact { background: #08100c !important; }
.dw-section-contact::before {
    background: conic-gradient(from 0deg at 50% 80%,
        rgba(16,185,129,0.04) 0deg, transparent 120deg,
        rgba(16,185,129,0.02) 240deg, transparent 360deg);
    opacity: 0.5;
    animation: dw-bg-rotate 55s linear infinite;
}

.dw-section-links { background: #08080c !important; }
.dw-section-links::before { display: none; }

/* Section inner wrapper */
.dw-section-inner {
    max-width: min(94vw, 1800px);
    margin: 0 auto;
    text-align: center;
    margin-bottom: clamp(40px, 6vh, 80px);
}

/* =============================================================
   SCROLL REVEAL SYSTEM — translateY only, NO clip-path, NO opacity:0
   Elements start shifted down, slide into place when observed.
   If JS fails, elements are visible (just shifted slightly).
   ============================================================= */

/* Section label */
.dw-section-label {
    font-family: var(--dw-font-mono, monospace);
    font-size: 1.425rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    /* Animated gradient replaces solid color */
    background: linear-gradient(var(--gradient-angle, 135deg),
        #6366f1, #8b5cf6, #06b6d4, #10b981, #f59e0b, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        dw-gradient-rotate 8s linear infinite,
        dw-gradient-shift 6s ease-in-out infinite alternate;
    margin-bottom: 16px;
    /* IO scroll reveal — start hidden, slide from left */
    opacity: 0;
    transform: translateX(-20px) translateY(10px);
    filter: blur(4px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-section-label.dw-in-view {
    opacity: 1;
    transform: translateX(0) translateY(0);
    filter: blur(0);
}

/* Section title */
.dw-section-title {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--dw-text-primary, #f0f0f0);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 24px;
    /* IO scroll reveal — start hidden, dramatic scale + slide */
    opacity: 0;
    transform: translateY(40px) scale(0.94);
    filter: blur(8px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}
.dw-section-title.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Section description */
.dw-section-desc {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--dw-text-secondary, #a0a0b0);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    /* IO scroll reveal — start hidden, soft rise */
    opacity: 0;
    transform: translateY(25px);
    filter: blur(4px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
.dw-section-desc.dw-in-view {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Shared reveal keyframes — used by labels, titles, descs */
@keyframes dw-text-reveal-up {
    from {
        opacity: 0;
        transform: translateY(35px) scale(0.97);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Enhanced label reveal — subtle slide + fade from left */
@keyframes dw-label-reveal {
    from {
        opacity: 0;
        transform: translateX(-20px) translateY(10px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
        filter: blur(0);
    }
}

/* Title reveal — dramatic scale + slide */
@keyframes dw-title-reveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.94);
        filter: blur(8px);
        letter-spacing: 0.05em;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
        letter-spacing: -0.02em;
    }
}

/* Description reveal — soft fade with gentle rise */
@keyframes dw-desc-reveal {
    from {
        opacity: 0;
        transform: translateY(25px);
        filter: blur(4px);
    }
    50% {
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Accent text colors */
.dw-text-accent-emerald { color: #10b981; }
.dw-text-accent-violet  { color: #8b5cf6; }
.dw-text-accent-blue    { color: #3b82f6; }
.dw-text-accent-cyan    { color: #06b6d4; }
.dw-text-accent-amber   { color: #f59e0b; }
.dw-text-accent-rose    { color: #f43f5e; }

/* Animated gradient text — @property driven for buttery-smooth GPU animation */
.dw-gradient-text {
    background: linear-gradient(var(--gradient-angle, 135deg),
        #6366f1, #8b5cf6, #06b6d4, #10b981, #f59e0b, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: dw-gradient-rotate 8s linear infinite,
               dw-gradient-shift 6s ease-in-out infinite alternate;
}

@keyframes dw-gradient-rotate {
    to { --gradient-angle: 495deg; }
}

@keyframes dw-gradient-shift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* =============================================================
   HERO SECTION
   ============================================================= */
.dw-section-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dw-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.dw-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(180px, 25vh, 260px) clamp(20px, 5vw, 80px) clamp(80px, 12vh, 140px);
    max-width: 1100px;
    margin: 0 auto;
    /* Scroll-driven fade + parallax as user scrolls past hero */
    animation: dw-hero-content-scroll linear both;
    animation-timeline: --page-scroll;
    animation-range: 0% 25%;
}

@keyframes dw-hero-content-scroll {
    from { transform: translateY(0); opacity: 1; filter: blur(0); }
    to   { transform: translateY(-60px); opacity: 0; filter: blur(6px); }
}

/* Hero tagline — slide-up entrance with glow pulse */
.dw-hero-tagline {
    font-family: var(--dw-font-mono, monospace);
    font-size: 1.475rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    /* Animated gradient text */
    background: linear-gradient(var(--gradient-angle, 135deg),
        #6366f1, #8b5cf6, #06b6d4, #10b981, #f59e0b, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation:
        dw-gradient-rotate 8s linear infinite,
        dw-gradient-shift 6s ease-in-out infinite alternate,
        dw-hero-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

/* HERO-specific slide-up: transform only, NO opacity (prevents hover disappear) */
@keyframes dw-hero-slide-up {
    from { transform: translateY(30px); }
    to   { transform: translateY(0); }
}

/* Hero title — NO clip-path, NO opacity change */
.dw-hero-title {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: clamp(3rem, 8vw, 6rem) !important;
    font-weight: 800;
    color: var(--dw-text-primary, #f0f0f0) !important;
    letter-spacing: -0.03em;
    line-height: 1.15; /* Extra space for descenders (g, p, y) */
    margin-bottom: 32px;
    animation: dw-hero-slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
    transition: text-shadow 0.5s ease, letter-spacing 0.5s ease, filter 0.5s ease;
    cursor: default;
}

/* Modern hero title hover — luminous glow pulse, NO positional shift */
.dw-hero-title:hover {
    text-shadow:
        0 0 20px rgba(99, 102, 241, 0.4),
        0 0 60px rgba(139, 92, 246, 0.2),
        0 0 100px rgba(6, 182, 212, 0.1);
    letter-spacing: -0.01em;
    filter: brightness(1.15);
    animation: dw-hero-slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both !important;
}

/* Hero gradient text — enhanced hover glow */
.dw-hero-title .dw-gradient-text {
    transition: filter 0.5s ease, text-shadow 0.5s ease;
}
.dw-hero-title:hover .dw-gradient-text {
    filter: brightness(1.25) saturate(1.3);
    -webkit-text-fill-color: transparent;
}

/* Hero subtitle */
.dw-hero-subtitle {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--dw-text-secondary, #a0a0b0);
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto 40px;
    animation: dw-hero-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

/* Hero CTA buttons */
.dw-hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: dw-hero-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

/* =============================================================
   BUTTONS — Shimmer sweep + glow on hover
   ============================================================= */
.dw-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease, border-color 0.3s ease;
}
.dw-btn:focus-visible {
    outline: 2px solid var(--dw-accent-cyan, #06b6d4);
    outline-offset: 3px;
}

.dw-btn-primary {
    background: linear-gradient(135deg, #18181b 0%, #1e1e24 50%, #252530 100%);
    color: #e0e0e8 !important;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
}
.dw-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: dw-btn-shimmer 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes dw-btn-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dw-btn-primary:hover {
    color: #fff !important;
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 50px rgba(0,0,0,0.45),
                0 0 40px rgba(99,102,241,0.15),
                0 0 80px rgba(139,92,246,0.08),
                inset 0 1px 0 rgba(255,255,255,0.15);
}
.dw-btn-primary:hover::before { animation-play-state: paused; }

.dw-btn-ghost {
    background: rgba(255,255,255,0.03);
    color: var(--dw-text-secondary, #a0a0b0) !important;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
}
.dw-btn-ghost:hover {
    color: var(--dw-text-primary, #f0f0f0) !important;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.dw-btn-large { padding: 18px 48px; font-size: 1.1rem; }

/* =============================================================
   BORDER BEAM BUTTONS — Spinning conic-gradient border effect
   The outer shell (.border-beam) uses overflow:hidden to clip
   the rotating gradient. A ::before pseudo spins the beam,
   and ::after masks the center, revealing only a 2px border.
   ============================================================= */

/* --- Border Beam Variables --- */
:root {
    --beam-1: #3b82f6;         /* Beam color 1 (Blue) */
    --beam-2: #8b5cf6;         /* Beam color 2 (Purple) */
    --beam-3: #ec4899;         /* Beam color 3 (Pink) */
    --beam-border-width: 2px;  /* Thickness of the beam */
    --btn-bg-beam: #18181b;    /* The inside color of the button */
    --btn-hover-beam: #27272a; /* The inside color when hovered */
}

/* Base beam button overrides */
.btn.border-beam,
.dw-btn.border-beam {
    position: relative;
    padding: 1em 2.5em;
    font-weight: 600;
    color: #ffffff;
    background: transparent;
    border: none;
    border-radius: 9999px !important;
    cursor: pointer;
    outline: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease;
    z-index: 1;
}

/* Hover & Active States */
.btn.border-beam:hover,
.dw-btn.border-beam:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}
.btn.border-beam:active,
.dw-btn.border-beam:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

/* 1. The Spinning Gradient (The Beam) */
.border-beam::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: conic-gradient(
        from 0deg,
        transparent 70%,
        var(--beam-1) 80%,
        var(--beam-2) 90%,
        var(--beam-3) 100%
    );
    transform: translate(-50%, -50%);
    animation: dw-beam-spin 3s linear infinite;
    z-index: -2;
}

/* 2. The Inner Mask (Hides the middle of the gradient, leaving only the border) */
.border-beam::after {
    content: '';
    position: absolute;
    inset: var(--beam-border-width);
    background: var(--btn-bg-beam);
    border-radius: 9999px;
    z-index: -1;
    transition: background 0.3s ease;
}

/* Make the inner mask slightly lighter when hovered */
.btn.border-beam:hover::after,
.dw-btn.border-beam:hover::after {
    background: var(--btn-hover-beam);
}

/* --- Border Beam Animation Keyframes --- */
@keyframes dw-beam-spin {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Also apply border-beam to WP buttons with the class */
.wp-block-button .wp-block-button__link.border-beam {
    position: relative;
    overflow: hidden;
    border-radius: 9999px;
    border: none;
    z-index: 1;
}
.wp-block-button .wp-block-button__link.border-beam::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: conic-gradient(
        from 0deg,
        transparent 70%,
        var(--beam-1) 80%,
        var(--beam-2) 90%,
        var(--beam-3) 100%
    );
    transform: translate(-50%, -50%);
    animation: dw-beam-spin 3s linear infinite;
    z-index: -2;
}
.wp-block-button .wp-block-button__link.border-beam::after {
    content: '';
    position: absolute;
    inset: var(--beam-border-width);
    background: var(--btn-bg-beam);
    border-radius: 9999px;
    z-index: -1;
    transition: background 0.3s ease;
}
.wp-block-button .wp-block-button__link.border-beam:hover::after {
    background: var(--btn-hover-beam);
}

/* Apply beam effect to primary CTA buttons automatically */
.dw-btn-primary.border-beam::after {
    background: linear-gradient(135deg, #18181b 0%, #1e1e24 50%, #252530 100%);
}
.dw-btn-primary.border-beam:hover::after {
    background: linear-gradient(135deg, #1f1f26 0%, #26262e 50%, #2e2e3a 100%);
}

/* Override shimmer ::before when border-beam is active */
.dw-btn-primary.border-beam::before {
    background: conic-gradient(
        from 0deg,
        transparent 70%,
        var(--beam-1) 80%,
        var(--beam-2) 90%,
        var(--beam-3) 100%
    );
    background-size: unset;
    animation: dw-beam-spin 3s linear infinite;
    inset: auto;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%);
    z-index: -2;
}
.dw-btn-primary.border-beam:hover::before {
    animation: dw-beam-spin 2s linear infinite;
    animation-play-state: running;
}

/* Ghost beam button inner fill */
.dw-btn-ghost.border-beam::after {
    background: rgba(12, 12, 20, 0.95);
}
.dw-btn-ghost.border-beam:hover::after {
    background: rgba(20, 20, 30, 0.95);
}

/* =============================================================
   SCROLL INDICATOR
   ============================================================= */
.dw-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    transition: opacity 0.5s ease;
}
.dw-scroll-indicator.dw-scroll-hidden {
    opacity: 0;
    pointer-events: none;
}

.dw-scroll-indicator-text {
    font-family: var(--dw-font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--dw-text-muted, #606070);
}

.dw-scroll-mouse {
    width: 24px; height: 38px;
    border: 2px solid var(--dw-text-muted, #606070);
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
}

.dw-scroll-mouse-wheel {
    width: 4px; height: 8px;
    background: var(--dw-accent-indigo, #6366f1);
    border-radius: 2px;
    animation: dw-mouse-scroll 2s ease-in-out infinite;
}

@keyframes dw-mouse-scroll {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(10px); opacity: 0.3; }
    100% { transform: translateY(0); }
}

.dw-scroll-indicator-line {
    width: 1px; height: 30px;
    background: linear-gradient(to bottom, var(--dw-accent-indigo, #6366f1), transparent);
    animation: dw-scroll-pulse 2s ease-in-out infinite;
}

@keyframes dw-scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50%      { opacity: 1; transform: scaleY(1.3); }
}

/* =============================================================
   CARD GRIDS — Slide-up reveal, flashlight hover
   ============================================================= */
.dw-cards-grid {
    display: grid;
    gap: 24px;
    max-width: min(94vw, 1800px);
    margin: 0 auto;
}

.dw-cards-grid--3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.dw-cards-grid--4 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Individual cards */
.dw-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: clamp(24px, 2.5vw, 32px);
    position: relative;
    overflow: clip; /* clip, not hidden — preserves animation-timeline: view() */
    --mouse-x: 50%;
    --mouse-y: 50%;

    /* Scroll-driven reveal — @supports gate ensures browsers without
       animation-timeline support fall back to IO + transitions instead
       of an instant-playing animation that flashes content on load. */

    transition: box-shadow 0.5s ease,
                border-color 0.4s ease,
                background 0.4s ease;

    /* Top accent bar */
    &::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 2px;
        background: var(--card-accent, var(--dw-accent-indigo, #6366f1));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Mouse-tracking border flashlight */
    &::after {
        content: '';
        position: absolute;
        inset: 0;
        padding: 1px;
        border-radius: inherit;
        background: radial-gradient(500px circle at var(--mouse-x) var(--mouse-y),
            rgba(255,255,255,0.25), transparent 40%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        z-index: 5;
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    &:hover {
        transform: translateY(-8px) perspective(800px) rotateX(2deg);
        background: rgba(255,255,255,0.04);
        border-color: rgba(255,255,255,0.1);
        box-shadow: 0 20px 60px rgba(0,0,0,0.4),
                    0 0 30px rgba(99,102,241,0.06),
                    0 0 0 1px rgba(99,102,241,0.08);
        background-image: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(255,255,255,0.03), transparent 40%);
        &::before { transform: scaleX(1); }
        &::after  { opacity: 1; }
    }

    &:focus-within {
        border-color: var(--card-accent, var(--dw-accent-indigo));
    }
}

/* CSS scroll-driven card reveal keyframes */
@keyframes dw-card-fly-in {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.94) rotateX(6deg);
        filter: blur(6px);
    }
    60% {
        opacity: 0.8;
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0);
    }
}

/* IO scroll reveal for cards — IntersectionObserver adds .dw-in-view.
   NO animation-timeline: view() — scroll-driven animations override
   hover transforms (animation layer > normal styles in the cascade),
   which kills card lift on hover. Transitions don't have this problem. */
.dw-card {
    opacity: 0;
    transform: translateY(50px) scale(0.94) rotateX(6deg);
    filter: blur(6px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease,
                border-color 0.4s ease,
                background 0.4s ease;
}
.dw-card.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
}
/* Hover MUST beat .dw-in-view — higher specificity ensures card lift works */
.dw-card.dw-in-view:hover {
    transform: translateY(-8px) perspective(800px) rotateX(2deg);
}

.dw-link-card {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(4px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                border-color 0.4s ease,
                background 0.4s ease;
}
.dw-link-card.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}
.dw-link-card.dw-in-view:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Stagger delays for transition fallback */
.dw-card:nth-child(1) { transition-delay: 0s; }
.dw-card:nth-child(2) { transition-delay: 0.08s; }
.dw-card:nth-child(3) { transition-delay: 0.16s; }
.dw-card:nth-child(4) { transition-delay: 0.24s; }

/* Card header */
.dw-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-card:hover .dw-card-header { transform: translateX(4px); }

/* Card icon — animate on hover */
.dw-card-icon {
    color: var(--card-accent, var(--dw-accent-indigo));
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    top: 9px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dw-card-icon svg {
    transition: filter 0.4s ease;
}
.dw-card:hover .dw-card-icon {
    transform: scale(1.15) rotate(5deg);
}
.dw-card:hover .dw-card-icon svg {
    filter: drop-shadow(0 0 8px var(--card-accent, #6366f1));
}

/* Card number */
.dw-card-number {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: 1.8rem; font-weight: 800;
    color: var(--card-accent, var(--dw-accent-indigo));
    opacity: 0.35; line-height: 1;
    display: inline-flex; align-items: center; vertical-align: middle;
    margin-right: 14px; flex-shrink: 0;
    position: relative; top: 7px;
    transition: opacity 0.4s ease, text-shadow 0.4s ease;
}
.dw-card:hover .dw-card-number {
    opacity: 0.7;
    text-shadow: 0 0 20px var(--card-accent, #6366f1);
}

.dw-card-title {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: 1.15rem !important; font-weight: 600;
    color: var(--dw-text-primary, #f0f0f0) !important;
    margin-bottom: 0; letter-spacing: -0.01em;
    display: inline; vertical-align: middle; line-height: 1.3;
    transition: letter-spacing 0.3s ease, text-shadow 0.3s ease;
}
.dw-card:hover .dw-card-title {
    letter-spacing: 0.01em;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.dw-card-desc {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 0.95rem; font-weight: 400;
    color: var(--dw-text-secondary, #a0a0b0) !important;
    line-height: 1.7; letter-spacing: 0.01em;
    margin-top: 10px;
}

/* =============================================================
   TECH SHOWCASE — Split layout
   ============================================================= */
.dw-tech-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    max-width: min(94vw, 1800px);
    margin: 0 auto;
    align-items: start;
    /* IO scroll reveal */
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    filter: blur(6px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-tech-split.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.dw-tech-split-left {
    display: flex; flex-direction: column; gap: 32px; padding-top: 20px;
}

.dw-tech-quote {
    border-left: 3px solid var(--dw-accent-violet, #8b5cf6);
    padding: 0 0 0 24px; margin: 0;
    transition: border-color 0.4s ease;
}
.dw-tech-quote:hover { border-color: var(--dw-accent-cyan, #06b6d4); }
.dw-tech-quote p {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: clamp(1.2rem, 2.2vw, 1.65rem);
    font-weight: 700; font-style: italic;
    color: var(--dw-text-primary, #f0f0f0);
    line-height: 1.5; letter-spacing: -0.01em;
}

.dw-tech-philosophy {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--dw-text-secondary, #a0a0b0);
    line-height: 1.85; margin: 0;
}

.dw-tech-split-right { display: flex; flex-direction: column; gap: 28px; }

.dw-tech-badge-heading {
    font-family: var(--dw-font-mono, monospace);
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--dw-text-muted, #606070);
    margin-bottom: 14px;
}

.dw-tech-badges { display: flex; flex-wrap: wrap; gap: 10px; }

/* Tech badges — organic float */
.dw-tech-badge {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 0.85rem;
    color: var(--dw-text-secondary, #a0a0b0);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 18px; border-radius: 100px;
    cursor: default; position: relative; white-space: nowrap;
    transition: color 0.35s ease, background 0.35s ease,
                border-color 0.35s ease,
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease;
    animation: dw-badge-float 5s ease-in-out infinite;
    animation-delay: calc(var(--badge-index, 0) * -0.7s);
}
.dw-tech-badge:hover {
    color: var(--dw-text-primary, #f0f0f0);
    background: rgba(139,92,246,0.12);
    border-color: rgba(139,92,246,0.35);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(139,92,246,0.15);
    animation-play-state: paused;
}

@keyframes dw-badge-float {
    0%, 100% { transform: translateY(0); }
    25%      { transform: translateY(-3px) translateX(1px); }
    50%      { transform: translateY(-1px); }
    75%      { transform: translateY(-4px) translateX(-1px); }
}

/* Badge tooltip */
.dw-tech-badge[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(12,12,20,0.95);
    border: 1px solid rgba(139,92,246,0.25);
    color: var(--dw-text-primary, #f0f0f0);
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 0.78rem; line-height: 1.5;
    padding: 8px 14px; border-radius: 8px;
    white-space: normal; width: max-content; max-width: 260px;
    text-align: center; pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
}
.dw-tech-badge[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(12,12,20,0.95);
    pointer-events: none; opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 101;
}
.dw-tech-badge[data-tooltip]:hover::after {
    opacity: 1; transform: translateX(-50%) translateY(0);
}
.dw-tech-badge[data-tooltip]:hover::before { opacity: 1; }

@media (max-width: 900px) {
    .dw-tech-split { grid-template-columns: 1fr; gap: 40px; }
    .dw-tech-split-left  { order: 2; }
    .dw-tech-split-right { order: 1; }
}

/* =============================================================
   FAQ — Clean editorial accordion, NO blue pill borders
   ============================================================= */
.dw-faq-list {
    max-width: min(94vw, 1600px);
    margin: 0 auto;
    display: flex; flex-direction: column; gap: 0;
    /* IO scroll reveal */
    opacity: 0;
    transform: translateY(30px);
    filter: blur(4px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-faq-list.dw-in-view {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.dw-faq-item {
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
    background: transparent !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background 0.4s ease;
}
.dw-faq-item:last-child { border-bottom: 1px solid rgba(255,255,255,0.06); }
.dw-faq-item:hover { background: rgba(255,255,255,0.015) !important; }

/* Left accent bar on open */
.dw-faq-item::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--faq-accent, var(--dw-accent-amber, #f59e0b));
    border-radius: 0 2px 2px 0;
    transform: scaleY(0); transform-origin: top;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-faq-item.dw-faq-open { background: rgba(255,255,255,0.02) !important; }
.dw-faq-item.dw-faq-open::before { transform: scaleY(1); }

.dw-faq-trigger {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 100%; padding: 32px 24px 20px;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer; text-align: center;
    gap: 8px; color: inherit;
    transition: all 0.3s ease;
}
.dw-faq-trigger:focus-visible {
    outline: 2px solid var(--dw-accent-cyan, #06b6d4) !important;
    outline-offset: -2px;
}

.dw-faq-number-large {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 900;
    line-height: 1; color: rgba(255,255,255,0.06);
    letter-spacing: -0.03em; user-select: none;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}
.dw-faq-item:hover .dw-faq-number-large { color: rgba(255,255,255,0.15); }
.dw-faq-item.dw-faq-open .dw-faq-number-large {
    color: var(--faq-accent, var(--dw-accent-amber, #f59e0b));
    text-shadow: 0 0 40px var(--faq-accent, rgba(245,158,11,0.3));
}

.dw-faq-content {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px; text-align: center;
}

.dw-faq-question {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 600;
    color: var(--dw-text-primary, #f0f0f0);
    line-height: 1.4; max-width: 90%; margin: 0 auto;
    transition: color 0.3s ease;
}
.dw-faq-item:hover .dw-faq-question { color: #fff; }

.dw-faq-hint {
    font-family: var(--dw-font-mono, monospace);
    font-size: 0.7rem; letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dw-text-muted, #606070);
    transition: color 0.3s ease;
}
.dw-faq-item.dw-faq-open .dw-faq-hint {
    color: var(--faq-accent, var(--dw-accent-amber, #f59e0b));
}

.dw-faq-toggle {
    width: 24px; height: 24px;
    position: relative; display: flex;
    align-items: center; justify-content: center;
    margin-top: 4px;
}
.dw-faq-toggle-bar {
    position: absolute; width: 16px; height: 2px;
    background: var(--dw-text-muted, #606070);
    border-radius: 1px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-faq-toggle-bar--v { transform: rotate(90deg); }
.dw-faq-item.dw-faq-open .dw-faq-toggle-bar {
    background: var(--faq-accent, var(--dw-accent-amber, #f59e0b));
}
.dw-faq-item.dw-faq-open .dw-faq-toggle-bar--v {
    transform: rotate(0deg); opacity: 0;
}

/* Answer reveal — grid-template-rows 0fr → 1fr */
.dw-faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 24px; text-align: center;
}
.dw-faq-answer > * { overflow: hidden; }
.dw-faq-item.dw-faq-open .dw-faq-answer {
    grid-template-rows: 1fr; padding-bottom: 28px;
}
.dw-faq-answer p {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 1.05rem; color: var(--dw-text-secondary, #a0a0b0);
    line-height: 1.85; max-width: 700px;
    margin: 0 auto; padding-top: 8px;
}

@media (max-width: 640px) {
    .dw-faq-trigger { padding: 24px 16px 16px; }
    .dw-faq-number-large { font-size: 1.8rem; }
}

/* =============================================================
   CTA SECTION
   ============================================================= */
.dw-cta-content {
    text-align: center;
    max-width: min(94vw, 900px);
    margin: 0 auto;
    /* IO scroll reveal */
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(6px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-cta-content.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

@keyframes dw-cta-entrance {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.dw-cta-title {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
    color: var(--dw-text-primary, #f0f0f0);
    letter-spacing: -0.03em; line-height: 1.1;
    margin-bottom: 24px;
}

.dw-cta-desc {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--dw-text-secondary, #a0a0b0);
    line-height: 1.8; margin-bottom: 40px;
}

/* =============================================================
   CONTACT FORM
   ============================================================= */
.dw-contact-form-wrap {
    max-width: min(94vw, 800px);
    margin: 0 auto;
    /* IO scroll reveal */
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    filter: blur(6px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-contact-form-wrap.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.dw-contact-form { display: flex; flex-direction: column; gap: 20px; }
.dw-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .dw-form-row { grid-template-columns: 1fr; } }

.dw-form-group {
    display: flex; flex-direction: column; gap: 8px; position: relative;
}
.dw-form-group::after {
    content: '';
    position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--dw-accent-indigo, #6366f1), transparent);
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 1px;
}
.dw-form-group:focus-within::after { width: 100%; }
.dw-form-group label {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 0.85rem; font-weight: 500;
    color: var(--dw-text-secondary, #a0a0b0);
}

.dw-form-input, .dw-form-textarea {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 1rem; color: var(--dw-text-primary, #f0f0f0);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 14px 16px;
    outline: none; width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.dw-form-input:focus, .dw-form-textarea:focus {
    border-color: var(--dw-accent-indigo, #6366f1);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    background: rgba(255,255,255,0.06);
}
.dw-form-input::placeholder, .dw-form-textarea::placeholder {
    color: var(--dw-text-muted, #606070);
}
.dw-form-textarea { min-height: 150px; resize: vertical; }

/* Contact form submit button — constrained width, not full-stretch */
.dw-contact-form .dw-btn[type="submit"] {
    width: 190px;
    align-self: flex-start;
}

.dw-email-link {
    color: var(--dw-accent-emerald, #10b981) !important;
    font-family: var(--dw-font-mono, monospace);
    font-size: 0.95rem;
    transition: text-shadow 0.3s ease;
}
.dw-email-link:hover { text-shadow: 0 0 15px rgba(16,185,129,0.4); }

/* =============================================================
   QUICK ACCESS LINK CARDS
   ============================================================= */
.dw-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: min(94vw, 1800px);
    margin: 0 auto;
}

.dw-link-card {
    display: flex; flex-direction: column;
    padding: clamp(20px, 2.5vw, 28px);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    text-decoration: none !important;
    position: relative;
    overflow: visible;
    backdrop-filter: blur(4px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Scroll-driven animation gated by @supports block above */
}

/* Top accent bar */
.dw-link-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--link-accent, var(--dw-accent-indigo, #6366f1));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 14px 14px 0 0;
}

/* Hover glow */
.dw-link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%,
        var(--link-accent, rgba(99,102,241,0.1)) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0; pointer-events: none;
}

.dw-link-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--link-accent, rgba(99,102,241,0.25));
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3),
                0 0 25px var(--link-accent, rgba(99,102,241,0.08)),
                0 0 0 1px rgba(255,255,255,0.05);
}
.dw-link-card:hover::before { transform: scaleX(1); }
.dw-link-card:hover::after  { opacity: 0.5; }

.dw-link-card:focus-visible {
    outline: 2px solid var(--link-accent, var(--dw-accent-indigo));
    outline-offset: 3px;
}

.dw-link-icon {
    font-size: 1.6rem !important;
    color: var(--link-accent, var(--dw-accent-indigo, #6366f1));
    margin-right: 12px; position: relative; top: -3px;
    z-index: 1; vertical-align: middle;
    display: inline-flex; flex-shrink: 0;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}
.dw-link-card:hover .dw-link-icon {
    transform: scale(1.15);
    text-shadow: 0 0 20px var(--link-accent, rgba(99,102,241,0.5));
}

.dw-link-card-header {
    display: flex; align-items: center;
    margin-bottom: 10px; width: 100%;
}

.dw-link-title {
    font-family: var(--dw-font-display, 'Sansita', sans-serif);
    font-size: 1.15rem; font-weight: 600;
    color: var(--dw-text-primary, #f0f0f0) !important;
    margin-bottom: 0; position: relative;
    z-index: 1; display: inline; vertical-align: middle;
    line-height: 1.3; flex: 1;
}

.dw-link-card p {
    font-family: var(--dw-font-body, 'Spinnaker', sans-serif);
    font-size: 0.95rem;
    color: var(--dw-text-secondary, #a0a0b0) !important;
    line-height: 1.6; flex: 1;
    position: relative; z-index: 1;
}

.dw-link-arrow {
    font-size: 1.5rem;
    color: var(--link-accent, var(--dw-accent-indigo, #6366f1));
    position: relative; z-index: 1;
    margin-left: auto; flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-link-card:hover .dw-link-arrow { transform: translateX(8px); }

/* =============================================================
   GEOMETRIC SHAPES
   ============================================================= */
.dw-geo-shapes {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0; overflow: clip;
}
.dw-geo-shape {
    position: absolute;
    width: var(--geo-size, 80px); height: var(--geo-size, 80px);
    top: var(--geo-top, 50%);
    left: var(--geo-left, auto); right: var(--geo-right, auto);
    opacity: 0; pointer-events: none;
}
.dw-geo-shapes:has(~ .dw-section-canvas) .dw-geo-shape { display: none; }
.dw-section-canvas {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0; opacity: 0.35;
}

/* =============================================================
   CROSS-PAGE SCROLL REVEALS — GITS-OS cards & windows
   Used by: blog.html, projects.html, my-sites.html, single.html
   Mirrors the .dw-card system but targets GITS-OS class names.
   ============================================================= */

/* IO scroll reveals for cross-page elements (NO animation-timeline: view()).
   Scroll-driven animations override hover transforms and fire at imperceptible
   ranges. IO + transitions work universally across all browsers. */
.gits-card,
.dw-glass-card,
.gits-site-card {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(4px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease,
                border-color 0.4s ease,
                background 0.4s ease;
}
.gits-card.dw-in-view,
.dw-glass-card.dw-in-view,
.gits-site-card.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}
/* Hover lift must beat .dw-in-view */
.gits-card.dw-in-view:hover,
.dw-glass-card.dw-in-view:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 159, 0.35) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35),
                0 0 25px rgba(0, 255, 159, 0.06);
}
.gits-site-card.dw-in-view:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 159, 0.4) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35),
                0 0 30px rgba(0, 255, 159, 0.08);
}

.gits-window {
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    filter: blur(6px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.gits-window.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.dw-glow-text {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(3px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-glow-text.dw-in-view {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.dw-neon-heading {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(6px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-neon-heading.dw-in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Stagger delays for GITS-OS cards (transition fallback) */
.gits-card:nth-child(1),
.dw-glass-card:nth-child(1),
.gits-site-card:nth-child(1) { transition-delay: 0s; }
.gits-card:nth-child(2),
.dw-glass-card:nth-child(2),
.gits-site-card:nth-child(2) { transition-delay: 0.08s; }
.gits-card:nth-child(3),
.dw-glass-card:nth-child(3),
.gits-site-card:nth-child(3) { transition-delay: 0.16s; }
.gits-card:nth-child(4),
.dw-glass-card:nth-child(4),
.gits-site-card:nth-child(4) { transition-delay: 0.24s; }

/* =============================================================
   LEGACY COMPAT
   ============================================================= */
.dw-reveal { /* No hidden state — JS observer adds .dw-in-view */ }

.dw-section-bg-clip {
    position: absolute; inset: 0; z-index: 0;
    pointer-events: none; display: flex;
}
.dw-bg-column {
    flex: 1; background: inherit;
    transform: scaleY(0); transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.dw-section.dw-in-view .dw-bg-column { transform: scaleY(1); }

/* =============================================================
   FOOTER
   ============================================================= */
.dw-footer {
    background: var(--dw-bg-secondary, #0c0c14);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.dw-footer a {
    color: var(--dw-text-muted, #606070) !important;
    transition: color 0.25s ease;
}
.dw-footer a:hover { color: var(--dw-text-primary, #f0f0f0) !important; }

/* =============================================================
   REDUCED MOTION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        animation-timeline: none !important;
    }
    .dw-section-label, .dw-section-title, .dw-section-desc,
    .dw-card, .dw-cta-content, .dw-contact-form-wrap,
    .dw-faq-list, .dw-tech-split, .dw-links-grid,
    .dw-hero-tagline, .dw-hero-title, .dw-hero-subtitle, .dw-hero-cta,
    .dw-hero-content, .dw-hero-canvas, .dw-link-card,
    .gits-card, .dw-glass-card, .gits-site-card,
    .gits-window, .dw-glow-text, .dw-neon-heading {
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
        animation: none !important;
    }
    .dw-gradient-text,
    .dw-section-label,
    .dw-hero-tagline {
        animation: none !important;
        background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
        background-size: 100% 100%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    /* Disable scroll progress bar */
    body::after {
        display: none !important;
    }
}
