/* DevBox Main Stylesheet */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll animation base */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card animation delays */
.scroll-animate.stagger-1 { transition-delay: 0.1s; }
.scroll-animate.stagger-2 { transition-delay: 0.2s; }
.scroll-animate.stagger-3 { transition-delay: 0.3s; }
.scroll-animate.stagger-4 { transition-delay: 0.4s; }
.scroll-animate.stagger-5 { transition-delay: 0.5s; }

/* Focus styles for accessibility.
   Outline color = `electric` token (#2E75B6, tailwind.config.js / DESIGN-PRINCIPLES §2.1)
   — declared ONCE here (UX-033). The staff-sidebar selectors are grouped in to defend
   the ring against Tailwind `focus:outline-none` utilities on the dark sidebar (their
   id specificity outranks the utility); they match nothing on public pages. */
*:focus-visible,
#staff-sidebar a:focus-visible,
#staff-sidebar button:focus-visible,
#staff-sidebar-drawer a:focus-visible,
#staff-sidebar-drawer button:focus-visible {
    outline: 2px solid #2E75B6;
    outline-offset: 2px;
}

*:focus-visible {
    border-radius: 4px;
}

/* Form focus override for Tailwind */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F8F9FA;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Hero gradient animation */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Selection color */
::selection {
    background: #2E75B6; /* `electric` token (§2.1) */
    color: white;
}

/* Button hover polish */
.btn-primary {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(46, 117, 182, 0.3);
}

/* Scroll-aware navbar */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-transparent {
    background-color: transparent !important;
    border-bottom-color: transparent !important;
}

.nav-link-default {
    color: #6B7280; /* `gray` DEFAULT token (§2.1) — keep in sync with tailwind.config.js */
}

.navbar-transparent .nav-link {
    color: #6B7280; /* `gray` DEFAULT token (§2.1) */
}

.navbar-transparent .nav-link:hover {
    color: #1B2A4A; /* `navy` token (§2.1) */
}

/* The hero terminal mockup, its typing cursor and the network canvas were
   removed with the 2026-09-17 storefront redesign (see "Storefront redesign"
   below); their rules and scripts went with them. */
}

/* 3D tilt cards */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
    overflow: hidden;
}

.tilt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 200px at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(46, 117, 182, 0.12),
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* WCAG AA contrast fix: avoid text-gray-400 (#9CA3AF) on white backgrounds.
   Use text-gray-500 (#6B7280, ~4.6:1 contrast) or darker for body text. */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-gradient,
    .animate-float,
    .animate-pulse-soft {
        animation: none;
    }

    .tilt-card {
        transform: none !important;
    }

    /* Home "what we do" service cards: the hover elevation is a transform
       (`hover:-translate-y-1`), so it needs the same neutralisation as
       .tilt-card above. !important because the Tailwind hover utility carries
       equal specificity; the colour transitions are dropped too so the card
       state change is instant rather than animated. */
    .service-card,
    .service-card * {
        transition: none !important;
    }

    .service-card:hover {
        transform: none !important;
    }

    .tilt-card::before {
        opacity: 0.5;
        background: radial-gradient(circle at 50% 50%, rgba(46, 117, 182, 0.06), transparent 70%);
    }

    .btn-primary:hover {
        transform: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================================
   Storefront redesign (operator-approved design, 2026-09-17)
   Home + /case-studies/. Plain CSS on purpose: the Tailwind bundle is
   precompiled and purged, so components live here and the templates use
   only utilities the bundle already carries (plus the paper/rule/mute
   tokens and font-display added to tailwind.config.js for this change).
   Palette: paper #F4F5F2 · ink #1D1D1B · mute #5E625C · rule #D6D8D2 ·
   electric #2E75B6 · navy #1B2A4A · light #8FBDE0.
   ===================================================================== */
.sf { --sf-paper: #F4F5F2; --sf-ink: #1D1D1B; --sf-mute: #5E625C; --sf-rule: #D6D8D2; --sf-blue: #2E75B6; --sf-blue-deep: #1F5A91; --sf-navy: #1B2A4A; --sf-light: #8FBDE0; }
.sf .sf-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-mute); font-weight: 500; }
.sf .sf-display { font-family: 'Schibsted Grotesk', 'Inter', system-ui, sans-serif; font-weight: 800; letter-spacing: -.03em; line-height: 1.02; text-wrap: balance; }
.sf .sf-h1 { font-size: clamp(2.25rem, 6vw, 4.75rem); line-height: .98; letter-spacing: -.035em; }
.sf .sf-h2 { font-size: clamp(1.625rem, 3.4vw, 2.75rem); }
.sf .sf-h3 { font-family: 'Schibsted Grotesk', 'Inter', system-ui, sans-serif; font-weight: 700; letter-spacing: -.015em; line-height: 1.1; }
.sf .sf-rule-ink { border-top: 1px solid var(--sf-ink); }
.sf .sf-rule { border-top: 1px solid var(--sf-rule); }
.sf .sf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; background: var(--sf-blue); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 2px; transition: background .2s; }
.sf .sf-btn:hover { background: var(--sf-blue-deep); }
.sf .sf-sec-h { display: grid; gap: 8px; margin-bottom: 28px; }
@media (min-width: 768px) { .sf .sf-sec-h { grid-template-columns: 1fr 2fr; gap: 48px; align-items: baseline; } .sf .sf-sec-h .sf-lead { grid-column: 2; margin-top: -14px; } }
.sf .sf-lead { color: var(--sf-mute); max-width: 52ch; }

/* Hero facts strip */
.sf .sf-facts { display: grid; border-top: 1px solid var(--sf-ink); border-bottom: 1px solid var(--sf-rule); }
.sf .sf-facts > div { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; }
.sf .sf-facts > div + div { border-top: 1px solid var(--sf-rule); }
.sf .sf-facts b { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -.03em; line-height: 1; white-space: nowrap; min-width: 64px; font-variant-numeric: tabular-nums; }
.sf .sf-facts span { font-size: 14px; color: var(--sf-mute); line-height: 1.3; }
@media (min-width: 768px) {
    .sf .sf-facts { grid-template-columns: repeat(3, 1fr); }
    .sf .sf-facts > div { padding: 16px 18px 18px 0; }
    .sf .sf-facts > div + div { border-top: 0; border-left: 1px solid var(--sf-rule); padding-left: 18px; }
    .sf .sf-facts b { font-size: 34px; min-width: 0; }
}

/* Three options (numbered doors) */
.sf .sf-doors { border-top: 1px solid var(--sf-ink); }
.sf .sf-door { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; padding: 22px 0; border-bottom: 1px solid var(--sf-rule); align-items: baseline; text-decoration: none; color: inherit; }
.sf .sf-door .sf-num { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: var(--sf-blue); }
.sf .sf-door h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); }
.sf .sf-door p { font-size: 15px; color: var(--sf-mute); grid-column: 2; }
.sf .sf-door .sf-proof { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; line-height: 1.4; grid-column: 2; }
.sf .sf-door:hover h3 { color: var(--sf-blue); }
@media (min-width: 768px) {
    .sf .sf-door { grid-template-columns: 56px 1.05fr 1.45fr 170px; gap: 24px; }
    .sf .sf-door p, .sf .sf-door .sf-proof { grid-column: auto; }
    .sf .sf-door .sf-proof { text-align: right; }
}

/* Packages */
.sf .sf-pks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sf .sf-pk { display: grid; grid-template-rows: auto 1fr auto auto; gap: 14px; align-content: start; padding: 18px 16px; background: #fff; border: 1px solid var(--sf-rule); color: inherit; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.sf .sf-pk:last-child { grid-column: 1 / -1; }
.sf .sf-pk svg { width: 32px; height: 32px; color: var(--sf-blue); }
.sf .sf-pk h3 { font-size: clamp(1.1875rem, 1.9vw, 1.5rem); align-self: end; }
.sf .sf-pk p { font-size: 14.5px; color: var(--sf-mute); line-height: 1.4; }
.sf .sf-pk span { font-weight: 600; font-size: 14px; color: var(--sf-blue); margin-top: 4px; }
.sf .sf-pk:hover { background: var(--sf-ink); border-color: var(--sf-ink); color: #fff; }
.sf .sf-pk:hover svg, .sf .sf-pk:hover span { color: var(--sf-light); }
.sf .sf-pk:hover p { color: #C9CDC6; }
@media (min-width: 768px) {
    .sf .sf-pks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .sf .sf-pk { padding: 24px 20px 22px; min-height: 15em; }
    .sf .sf-pk:last-child { grid-column: auto; }
}

/* Filter chips (home projects + case-studies grid) */
.sf .sf-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 4px; }
.sf .sf-chip { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 500; font-size: 14px; line-height: 1; min-height: 40px; padding: 0 14px; border: 1px solid var(--sf-ink); background: transparent; color: var(--sf-ink); border-radius: 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sf .sf-chip span { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; color: var(--sf-mute); }
.sf .sf-chip[aria-pressed="true"] { background: var(--sf-ink); color: var(--sf-paper); }
.sf .sf-chip[aria-pressed="true"] span { color: #B9BDB5; }

/* Device frames for live products */
.sf .sf-browser { border: 1px solid #CFD2CB; border-radius: 10px; overflow: hidden; background: #E6E7E3; box-shadow: 0 1px 0 rgba(29,29,27,.04), 0 18px 40px -24px rgba(29,29,27,.35); }
.sf .sf-browser .sf-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; }
.sf .sf-browser .sf-bar i { width: 7px; height: 7px; border-radius: 50%; background: #C9CCC4; }
.sf .sf-browser .sf-bar span { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; line-height: 1.4; color: #6A6E67; background: #F4F5F2; border-radius: 4px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf .sf-browser img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.sf .sf-phone { border: 6px solid #1D1D1B; border-radius: 20px; overflow: hidden; background: #1D1D1B; box-shadow: 0 18px 40px -20px rgba(29,29,27,.45); }
.sf .sf-phone img { display: block; width: 100%; aspect-ratio: 390 / 760; object-fit: cover; object-position: top; border-radius: 14px; }
.sf .sf-devices { position: relative; padding-right: 13%; }
.sf .sf-devices .sf-phone { position: absolute; right: 0; bottom: -16px; width: 24%; }

/* Home projects grid */
.sf .sf-projects { display: grid; grid-template-columns: 1fr; gap: 44px; padding-top: 24px; }
.sf .sf-project { display: grid; gap: 26px; align-content: start; }
.sf .sf-project[hidden] { display: none; }
.sf .sf-project .sf-meta { display: grid; gap: 8px; align-content: start; padding-top: 4px; }
.sf .sf-project .sf-kind { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--sf-blue); font-weight: 500; }
.sf .sf-project h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); }
.sf .sf-project .sf-desc { font-size: 15px; color: var(--sf-mute); max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sf .sf-project .sf-links { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: 14.5px; }
.sf .sf-project .sf-links a { color: var(--sf-blue); text-decoration: none; }
@media (min-width: 768px) { .sf .sf-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 48px; padding-top: 32px; } }

/* Results band (navy) */
.sf .sf-band { background: var(--sf-navy); color: #fff; }
.sf .sf-nums { display: grid; border-top: 1px solid rgba(255,255,255,.35); }
.sf .sf-nums a { display: grid; gap: 6px; align-content: start; padding: 16px 0; color: inherit; text-decoration: none; }
.sf .sf-nums a + a { border-top: 1px solid rgba(255,255,255,.18); }
.sf .sf-nums b { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 800; font-size: clamp(2.5rem, 5.6vw, 4.25rem); letter-spacing: -.04em; line-height: .95; color: var(--sf-light); font-variant-numeric: tabular-nums; }
.sf .sf-nums h3 { font-size: 16px; }
.sf .sf-nums p { font-size: 14px; color: #B9C6D8; }
.sf .sf-nums a:hover h3 { color: var(--sf-light); }
@media (min-width: 768px) {
    .sf .sf-nums { grid-template-columns: repeat(3, 1fr); }
    .sf .sf-nums a { padding: 18px 18px 0 0; }
    .sf .sf-nums a + a { border-top: 0; border-left: 1px solid rgba(255,255,255,.18); padding-left: 18px; }
}

/* Steps + close */
.sf .sf-steps { display: flex; flex-wrap: wrap; gap: 10px 32px; font-size: 15px; padding: 22px 0; border-bottom: 1px solid var(--sf-rule); }
.sf .sf-steps b { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: var(--sf-blue); margin-right: 8px; }
/* The team row in #nosotros (2026-09-24) */
.sf .sf-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-top: 12px; }
.sf .sf-member { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; background: #fff; border: 1px solid var(--sf-rule); }
.sf .sf-member img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.sf .sf-member .sf-h3 { font-size: 17px; }
.sf .sf-member .sf-role { font-size: 14px; color: var(--sf-mute); margin-top: 3px; }
.sf .sf-member-li { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--sf-ink); border: 1px solid var(--sf-rule); border-radius: 2px; transition: color .2s, border-color .2s; }
.sf .sf-member-li:hover { color: var(--sf-blue); border-color: var(--sf-blue); }
.sf .sf-member-li:focus-visible { outline: 2px solid var(--sf-blue); outline-offset: 2px; }
.sf .sf-member-li svg { width: 18px; height: 18px; }

/* Case-studies grid */
.sf .sf-cs-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 28px 0 8px; }
.sf .sf-cs { display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--sf-rule); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.sf .sf-cs:hover { border-color: var(--sf-ink); transform: translateY(-2px); }
.sf .sf-cs[hidden] { display: none; }
.sf .sf-cover { width: 100%; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: var(--sf-paper); border-bottom: 1px solid var(--sf-rule); }
.sf .sf-cover-live { padding: 18px 18px 0; align-items: end; }
.sf .sf-cover-live .sf-browser { width: 100%; box-shadow: none; border-radius: 8px 8px 0 0; border-bottom: 0; }
.sf .sf-cover-live img { aspect-ratio: 16 / 9.2; }
.sf .sf-cover-logo img { width: 52%; max-height: 40%; object-fit: contain; }
.sf .sf-cover-type, .sf .sf-cover-conf { padding: 22px; place-items: end start; align-content: end; justify-items: start; text-align: left; }
.sf .sf-cover-type span, .sf .sf-cover-conf span { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-mute); margin-bottom: 8px; font-weight: 500; }
.sf .sf-cover-type b, .sf .sf-cover-conf b { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--sf-ink); max-width: 14ch; }
.sf .sf-cover-conf b { color: var(--sf-mute); font-weight: 700; max-width: 10ch; }
.sf .sf-cs-body { padding: 18px 20px 20px; display: grid; gap: 8px; align-content: start; }
.sf .sf-cs-body .sf-kind { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--sf-blue); font-weight: 500; }
.sf .sf-cs-body h2 { font-size: clamp(1.125rem, 1.8vw, 1.375rem); }
.sf .sf-cs-body .sf-desc { font-size: 14px; color: var(--sf-mute); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf .sf-cs-body .sf-met { margin-top: 6px; font-size: 13.5px; color: var(--sf-mute); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sf .sf-cs-body .sf-met b { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--sf-ink); font-variant-numeric: tabular-nums; }
.sf .sf-cs-body .sf-met span { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.sf .sf-cs-body .sf-more { font-weight: 600; font-size: 14px; color: var(--sf-blue); margin-top: 4px; }
@media (min-width: 768px) { .sf .sf-cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* --- Hero animation: three scenes, one per option --------------------- */
.sf .sf-anim { font-size: clamp(8.5px, 1.05vw, 13px); display: grid; gap: .9em; }
.sf .sf-stage { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--sf-ink); background: #fff; overflow: hidden; }
.sf .sf-scene { position: absolute; inset: 0; padding: 2.2em 2.2em 5em; opacity: 0; visibility: hidden; transition: opacity .5s; }
/* Without JS (and for crawlers/previews) the first scene is visible at rest. */
.sf .sf-scene:first-child { opacity: 1; visibility: visible; }
.sf .sf-stage:has(.sf-scene.on) .sf-scene:first-child:not(.on) { opacity: 0; visibility: hidden; }
.sf .sf-scene.on { opacity: 1; visibility: visible; }
.sf .sf-badge { position: absolute; right: 2.2em; bottom: 1.8em; font-family: 'JetBrains Mono', monospace; font-size: 1em; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--sf-ink); padding: .7em .9em; opacity: 0; transform: translateY(.6em); font-weight: 500; }
.sf .sf-scene.on .sf-badge { animation: sf-pop .4s 3.6s forwards; }
.sf .sf-anim-cap { display: flex; justify-content: space-between; align-items: center; gap: 1em; font-family: 'JetBrains Mono', monospace; font-size: 1.05em; line-height: 1.3; color: var(--sf-mute); font-weight: 500; }
.sf .sf-anim-cap .sf-cap-title { color: var(--sf-ink); }
.sf .sf-dots { display: flex; gap: .5em; }
.sf .sf-dots i { width: 1.6em; height: .25em; background: var(--sf-rule); }
.sf .sf-dots i.on { background: var(--sf-blue); }
@keyframes sf-pop { to { opacity: 1; transform: none; } }
@keyframes sf-in { to { opacity: 1; transform: none; } }
@keyframes sf-grow { to { transform: scaleX(1); } }
@keyframes sf-rise { to { transform: scaleY(1); } }
@keyframes sf-fly { 60% { opacity: 1; } to { opacity: 0; transform: translate(14em, -1em) scale(.4) rotate(0); } }
@keyframes sf-ring { to { transform: scale(2); opacity: 0; } }
@keyframes sf-wave { to { height: 1.6em; } }
/* scene 1: a website assembles */
.sf .sf-win { height: 100%; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--sf-rule); background: var(--sf-paper); }
.sf .sf-win-bar { display: flex; align-items: center; gap: .4em; padding: .55em .8em; border-bottom: 1px solid var(--sf-rule); }
.sf .sf-win-bar i { width: .6em; height: .6em; border-radius: 50%; background: #C9CCC4; }
.sf .sf-win-bar span { margin-left: .6em; font-family: 'JetBrains Mono', monospace; font-size: .9em; line-height: 1; color: var(--sf-mute); }
.sf .sf-win-body { padding: 1.4em; display: grid; grid-template-rows: auto 1fr auto; gap: 1.4em; }
.sf .sf-w-nav { display: flex; gap: 1em; align-items: center; opacity: 0; transform: translateY(-.8em); }
.sf .sf-w-nav b { width: 5em; height: 1em; background: var(--sf-ink); }
.sf .sf-w-nav em { width: 2.6em; height: .5em; background: var(--sf-rule); }
.sf .sf-w-nav em:first-of-type { margin-left: auto; }
.sf .sf-w-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4em; align-items: center; }
.sf .sf-w-copy .sf-l { display: block; height: 1.3em; background: var(--sf-ink); margin-bottom: .55em; transform-origin: left; transform: scaleX(0); }
.sf .sf-w-copy .sf-l2 { width: 85%; }
.sf .sf-w-copy .sf-l3 { width: 55%; height: .7em; background: var(--sf-mute); margin-top: .9em; }
.sf .sf-w-btns { display: flex; gap: .6em; margin-top: 1.3em; }
.sf .sf-w-btn { display: inline-block; width: 5.5em; height: 2.2em; background: var(--sf-blue); opacity: 0; transform: translateY(.6em); }
.sf .sf-w-btn.wa { width: auto; padding: 0 1em; background: #25D366; color: #fff; font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 600; font-size: .95em; line-height: 2.3; }
.sf .sf-w-img { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--sf-light), var(--sf-blue)); opacity: 0; transform: scale(.92); }
.sf .sf-w-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.sf .sf-w-cards span { height: 3em; border: 1px solid var(--sf-rule); background: #fff; opacity: 0; transform: translateY(.6em); }
.sf .sf-s-web.on .sf-w-nav { animation: sf-in .4s .2s forwards; }
.sf .sf-s-web.on .sf-l1 { animation: sf-grow .45s .6s forwards; }
.sf .sf-s-web.on .sf-l2 { animation: sf-grow .45s .85s forwards; }
.sf .sf-s-web.on .sf-l3 { animation: sf-grow .45s 1.1s forwards; }
.sf .sf-s-web.on .sf-w-img { animation: sf-in .5s 1.3s forwards; }
.sf .sf-s-web.on .sf-w-btn { animation: sf-in .35s 1.8s forwards; }
.sf .sf-s-web.on .sf-w-btn.wa { animation-delay: 2s; }
.sf .sf-s-web.on .sf-w-cards span { animation: sf-in .35s forwards; }
.sf .sf-s-web.on .sf-w-cards span:nth-child(1) { animation-delay: 2.4s; }
.sf .sf-s-web.on .sf-w-cards span:nth-child(2) { animation-delay: 2.6s; }
.sf .sf-s-web.on .sf-w-cards span:nth-child(3) { animation-delay: 2.8s; }
/* scene 2: spreadsheet cells become a system */
.sf .sf-s-sys { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2em; align-items: stretch; }
.sf .sf-cells { position: relative; }
.sf .sf-cell { position: absolute; font-family: 'JetBrains Mono', monospace; font-size: .95em; line-height: 1; font-weight: 500; color: var(--sf-ink); background: #fff; border: 1px solid var(--sf-ink); padding: .7em .8em; white-space: nowrap; box-shadow: .3em .3em 0 var(--sf-rule); }
.sf .sf-c1 { left: 4%; top: 6%; transform: rotate(-6deg); }
.sf .sf-c2 { left: 38%; top: 24%; transform: rotate(4deg); }
.sf .sf-c3 { left: 0; top: 44%; transform: rotate(3deg); }
.sf .sf-c4 { left: 30%; top: 62%; transform: rotate(-3deg); }
.sf .sf-c5 { left: 8%; top: 82%; transform: rotate(5deg); }
.sf .sf-c6 { left: 44%; top: 90%; transform: rotate(-8deg); }
.sf .sf-s-sys.on .sf-cell { animation: sf-fly .9s forwards; }
.sf .sf-s-sys.on .sf-c1 { animation-delay: .5s; } .sf .sf-s-sys.on .sf-c2 { animation-delay: .8s; } .sf .sf-s-sys.on .sf-c3 { animation-delay: 1.1s; }
.sf .sf-s-sys.on .sf-c4 { animation-delay: 1.4s; } .sf .sf-s-sys.on .sf-c5 { animation-delay: 1.7s; } .sf .sf-s-sys.on .sf-c6 { animation-delay: 2s; }
.sf .sf-panel { border: 1px solid var(--sf-ink); background: var(--sf-paper); padding: 1.2em; display: grid; grid-template-rows: auto auto 1fr; gap: 1em; opacity: 0; transform: translateX(1em); }
.sf .sf-s-sys.on .sf-panel { animation: sf-in .5s .3s forwards; }
.sf .sf-p-head { display: flex; justify-content: space-between; font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.05em; line-height: 1; }
.sf .sf-p-head span { font-family: 'JetBrains Mono', monospace; font-weight: 400; font-size: .9em; color: var(--sf-mute); }
.sf .sf-p-rows { display: grid; gap: .5em; }
.sf .sf-p-rows i { display: block; height: 1.2em; background: #fff; border: 1px solid var(--sf-rule); transform-origin: left; transform: scaleX(0); }
.sf .sf-s-sys.on .sf-p-rows i { animation: sf-grow .35s forwards; }
.sf .sf-s-sys.on .sf-p-rows i:nth-child(1) { animation-delay: 1.2s; } .sf .sf-s-sys.on .sf-p-rows i:nth-child(2) { animation-delay: 1.5s; }
.sf .sf-s-sys.on .sf-p-rows i:nth-child(3) { animation-delay: 1.8s; } .sf .sf-s-sys.on .sf-p-rows i:nth-child(4) { animation-delay: 2.1s; }
.sf .sf-p-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5em; align-items: end; min-height: 5em; }
.sf .sf-p-chart b { display: block; height: var(--h); background: var(--sf-blue); transform-origin: bottom; transform: scaleY(0); }
.sf .sf-s-sys.on .sf-p-chart b { animation: sf-rise .5s forwards; }
.sf .sf-s-sys.on .sf-p-chart b:nth-child(1) { animation-delay: 2.4s; } .sf .sf-s-sys.on .sf-p-chart b:nth-child(2) { animation-delay: 2.5s; }
.sf .sf-s-sys.on .sf-p-chart b:nth-child(3) { animation-delay: 2.6s; } .sf .sf-s-sys.on .sf-p-chart b:nth-child(4) { animation-delay: 2.7s; }
.sf .sf-s-sys.on .sf-p-chart b:nth-child(5) { animation-delay: 2.8s; } .sf .sf-s-sys.on .sf-p-chart b:nth-child(6) { animation-delay: 2.9s; }
/* scene 3: an agent answers a customer */
.sf .sf-chat { height: 100%; display: grid; align-content: start; gap: 1em; max-width: 78%; }
.sf .sf-bub { padding: .9em 1.1em; font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-size: 1.1em; line-height: 1.35; opacity: 0; transform: translateY(.6em); }
.sf .sf-bub.in { background: var(--sf-paper); border: 1px solid var(--sf-rule); justify-self: start; }
.sf .sf-bub.out { background: var(--sf-ink); color: #fff; justify-self: end; }
.sf .sf-agent { position: relative; display: flex; align-items: center; gap: .8em; justify-self: end; opacity: 0; }
.sf .sf-agent .sf-face { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--sf-blue); position: relative; }
.sf .sf-agent .sf-face::before, .sf .sf-agent .sf-face::after { content: ""; position: absolute; top: .85em; width: .3em; height: .3em; border-radius: 50%; background: #fff; }
.sf .sf-agent .sf-face::before { left: .6em; } .sf .sf-agent .sf-face::after { right: .6em; }
.sf .sf-agent .sf-ring { position: absolute; width: 2.2em; height: 2.2em; border-radius: 50%; border: 2px solid var(--sf-light); animation: sf-ring 1.4s ease-out infinite; }
.sf .sf-wave { display: flex; gap: .25em; align-items: center; height: 1.6em; }
.sf .sf-wave i { width: .3em; height: .5em; background: var(--sf-blue); animation: sf-wave .7s ease-in-out infinite alternate; }
.sf .sf-wave i:nth-child(2) { animation-delay: .1s; } .sf .sf-wave i:nth-child(3) { animation-delay: .2s; }
.sf .sf-wave i:nth-child(4) { animation-delay: .3s; } .sf .sf-wave i:nth-child(5) { animation-delay: .4s; }
.sf .sf-chip-ok { position: relative; justify-self: start; font-family: 'JetBrains Mono', monospace; font-size: .95em; line-height: 1; letter-spacing: .05em; text-transform: uppercase; color: var(--sf-ink); border: 1px solid var(--sf-ink); padding: .7em .9em .7em 2.4em; opacity: 0; transform: translateY(.6em); font-weight: 500; }
.sf .sf-chip-ok::before { content: ""; position: absolute; left: .9em; top: .45em; width: .4em; height: .8em; border: solid var(--sf-blue); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sf .sf-s-ai.on .sf-bub.in:first-child { animation: sf-in .4s .3s forwards; }
.sf .sf-s-ai.on .sf-agent { animation: sf-in .4s 1s forwards; }
.sf .sf-s-ai.on .sf-bub.out { animation: sf-in .4s 1.9s forwards; }
.sf .sf-s-ai.on .sf-bub.short { animation: sf-in .4s 2.7s forwards; }
.sf .sf-s-ai.on .sf-chip-ok { animation: sf-in .4s 3.3s forwards; }
@media (prefers-reduced-motion: reduce) {
    /* Every scene rests in its finished state; the JS does not cycle. */
    .sf .sf-scene * { animation: none !important; opacity: 1 !important; transform: none !important; visibility: visible !important; }
    .sf .sf-scene.on .sf-badge { opacity: 1; }
}

/* --- Case-study detail page (2026-09-17, design "DevBox Case Study Page") --- */
.sf .sf-crumb { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--sf-mute); text-decoration: none; }
.sf .sf-crumb:hover { color: var(--sf-blue); }
.sf .sf-detail-head { display: grid; grid-template-columns: 1fr; gap: 34px; padding: 14px 0 32px; align-items: center; }
.sf .sf-detail-facts { display: grid; grid-template-columns: 1fr; margin-top: 28px; border-top: 1px solid var(--sf-ink); }
.sf .sf-detail-facts > div { padding: 12px 0; display: grid; gap: 4px; }
.sf .sf-detail-facts > div + div { border-top: 1px solid var(--sf-rule); }
.sf .sf-detail-facts span { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-mute); font-weight: 500; }
.sf .sf-detail-facts b { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 17px; line-height: 1.2; }
.sf .sf-detail-facts b.sf-big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--sf-blue); }
.sf .sf-detail-facts small { font-size: 13px; color: var(--sf-mute); line-height: 1.3; }
.sf .sf-live-link { display: block; margin-top: 34px; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; color: var(--sf-blue); text-decoration: none; }
.sf .sf-detail-cover { border: 1px solid var(--sf-rule); }
.sf .sf-detail-art { padding: 0; }
.sf .sf-detail-art img { width: 100%; height: 100%; object-fit: cover; }
.sf .sf-chapters { border-top: 1px solid var(--sf-ink); }
.sf .sf-ch { display: grid; grid-template-columns: 34px 1fr; gap: 6px 12px; padding: 28px 0; border-bottom: 1px solid var(--sf-rule); align-items: start; }
.sf .sf-ch .sf-num { font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.6; font-weight: 500; color: var(--sf-blue); }
.sf .sf-ch h2 { font-size: clamp(1.375rem, 2.6vw, 2rem); }
.sf .sf-ch p { grid-column: 2; font-size: 17px; line-height: 1.6; max-width: 62ch; }
.sf .sf-nums-static > div { display: grid; gap: 6px; align-content: start; padding: 16px 0; }
.sf .sf-nums-static > div + div { border-top: 1px solid rgba(255,255,255,.18); }
.sf .sf-stack { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: baseline; }
.sf .sf-stack-after { margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); }
.sf .sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf .sf-chips span { font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1; letter-spacing: .04em; font-weight: 500; color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 8px 10px; border-radius: 2px; }
.sf .sf-quote { padding: 36px 0; display: grid; grid-template-columns: 1fr; gap: 10px; border-bottom: 1px solid var(--sf-rule); }
.sf .sf-quote blockquote { margin: 0; font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; max-width: 30ch; }
.sf .sf-quote cite { display: block; margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-style: normal; font-weight: 500; color: var(--sf-mute); }
.sf .sf-related { padding: 40px 0 8px; }
@media (min-width: 768px) {
    .sf .sf-detail-head { grid-template-columns: 1.05fr 1fr; gap: 48px; padding: 18px 0 40px; }
    .sf .sf-detail-facts { grid-template-columns: repeat(3, 1fr); }
    .sf .sf-detail-facts > div { padding: 14px 18px 0 0; }
    .sf .sf-detail-facts > div + div { border-top: 0; border-left: 1px solid var(--sf-rule); padding-left: 18px; }
    .sf .sf-ch { grid-template-columns: 56px 1fr 2fr; gap: 24px; padding: 36px 0; }
    .sf .sf-ch p { grid-column: auto; }
    .sf .sf-nums-static { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .sf .sf-nums-static > div { padding: 18px 18px 0 0; }
    .sf .sf-nums-static > div + div { border-top: 0; border-left: 1px solid rgba(255,255,255,.18); padding-left: 18px; }
    .sf .sf-stack { grid-template-columns: 1fr 2fr; gap: 24px; }
    .sf .sf-quote { grid-template-columns: 1fr 2fr; gap: 24px; padding: 52px 0; }
}

/* --- Audit page + form controls in the system (2026-09-17) --- */
.sf .sf-card { background: #fff; border: 1px solid var(--sf-rule); padding: 24px 20px; }
@media (min-width: 640px) { .sf .sf-card { padding: 40px; } }
.sf .sf-progress { height: 4px; width: 100%; background: var(--sf-rule); overflow: hidden; }
.sf .sf-progress-fill { height: 100%; background: var(--sf-blue); transition: width .3s; }
.sf .sf-choice { display: block; width: 100%; text-align: left; padding: 16px 20px; border: 1px solid var(--sf-rule); background: #fff; color: var(--sf-ink); font-size: 16px; transition: border-color .15s, background .15s, color .15s; }
.sf .sf-choice:hover { border-color: var(--sf-ink); }
.sf .sf-choice:focus-visible { outline: 2px solid var(--sf-blue); outline-offset: 2px; }
.sf .sf-choice.is-on { background: var(--sf-ink); border-color: var(--sf-ink); color: #fff; }
.sf .sf-label { display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-mute); font-weight: 500; margin-bottom: 6px; }
.sf .sf-input { width: 100%; padding: 12px 14px; border: 1px solid var(--sf-rule); background: #fff; font-size: 16px; color: var(--sf-ink); border-radius: 0; transition: border-color .15s; }
.sf .sf-input:focus { outline: none; border-color: var(--sf-blue); box-shadow: 0 0 0 2px rgba(46,117,182,.25); }
.sf .sf-input.is-error { border-color: #B4462B; }
.sf .sf-score { border-top: 1px solid var(--sf-ink); border-bottom: 1px solid var(--sf-rule); padding: 18px 0 22px; margin-bottom: 28px; }
.sf .sf-score-num { font-family: 'Schibsted Grotesk', 'Inter', sans-serif; font-weight: 800; font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -.04em; line-height: 1; color: var(--sf-blue); margin-top: 8px; font-variant-numeric: tabular-nums; }
.sf .sf-score-of { font-size: .45em; font-weight: 600; color: var(--sf-mute); letter-spacing: 0; }
.sf .sf-tick { flex: none; width: 8px; height: 1px; background: var(--sf-ink); margin-top: .8em; }
