/* ==========================================================================
   Anas Abdullah — Custom Styles
   Dark-Mode Obsidian & Luminous Cyan Design System

   Load order: css/tailwind.css first, then this file.
   Everything here sits in Tailwind's "components" layer, so Tailwind
   utility classes in the HTML (e.g. `hidden`, `lg:hidden`) always win,
   exactly as they did with the CDN build.
   ========================================================================== */

@layer components {

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
    --color-obsidian: #040811;
    --color-surface: #0D141D;
    --color-surface-raised: #151C26;
    --color-cobalt: #1E3A8A;
    --color-cyan: #00E5FF;
    --color-cyan-deep: #00A3FF;
    --color-text: #DCE3F0;
    --color-muted: #88919D;
    --color-border: rgba(220, 227, 240, 0.08);
    --color-border-strong: rgba(220, 227, 240, 0.14);

    --font-heading: 'Sora', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --radius-sm: 0.5rem;
    --radius-md: 0.875rem;
    --radius-lg: 1.25rem;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
    --header-height: 4.5rem;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
button:not(:disabled),
[role="button"] {
    cursor: pointer;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-obsidian);
    color: var(--color-text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

::selection {
    background-color: rgba(0, 229, 255, 0.25);
    color: #FFFFFF;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--color-cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background-color: var(--color-cyan);
    color: var(--color-obsidian);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
    top: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-obsidian);
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface-raised);
    border: 2px solid var(--color-obsidian);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-cobalt);
}

/* --------------------------------------------------------------------------
   3. Header — Smart-Scroll Glass Navigation
   -------------------------------------------------------------------------- */
/* Element + class selector so this transition list wins over Tailwind's
   single-class `transition-transform` utility while keeping the same
   300ms ease-in-out slide. */
header.site-header {
    background-color: rgba(4, 8, 17, 0.45);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition:
        transform 0.3s ease-in-out,
        background-color 0.3s ease-in-out,
        border-color 0.3s ease-in-out;
    will-change: transform;
}

header.site-header.is-scrolled {
    background-color: rgba(4, 8, 17, 0.88);
    border-bottom-color: var(--color-border-strong);
}

header.site-header.menu-open {
    background-color: rgba(4, 8, 17, 0.96);
    border-bottom-color: var(--color-border-strong);
}

.nav-link {
    position: relative;
    color: var(--color-muted);
    transition: color 0.2s var(--ease-out);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.45rem;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-cyan-deep), var(--color-cyan));
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
    transform: translateX(-50%);
    transition: width 0.25s var(--ease-out);
}

.nav-link:hover::after {
    width: 1rem;
}

.nav-link.is-active {
    color: var(--color-cyan);
}

.nav-link.is-active::after {
    width: 100%;
}

/* Mobile menu */
.mobile-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s var(--ease-out);
}

.mobile-menu > div {
    overflow: hidden;
}

.mobile-menu.is-open {
    grid-template-rows: 1fr;
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    font-weight: 500;
    transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.mobile-nav-link:hover {
    background-color: var(--color-surface-raised);
    color: var(--color-text);
}

.mobile-nav-link.is-active {
    background-color: rgba(0, 229, 255, 0.08);
    color: var(--color-cyan);
}

.menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--color-text);
    transition: transform 0.3s var(--ease-out), opacity 0.2s var(--ease-out);
}

.menu-toggle .bar + .bar {
    margin-top: 5px;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-cyan-deep) 100%);
    color: var(--color-obsidian);
    font-weight: 600;
    border-radius: 999px;
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.4),
        0 8px 28px -6px rgba(0, 229, 255, 0.55);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.6),
        0 14px 40px -6px rgba(0, 229, 255, 0.7);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: rgba(13, 20, 29, 0.6);
    color: var(--color-text);
    font-weight: 600;
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn-secondary:hover {
    border-color: rgba(0, 229, 255, 0.45);
    background-color: rgba(21, 28, 38, 0.85);
    transform: translateY(-2px);
}

.btn-primary svg,
.btn-secondary svg {
    transition: transform 0.25s var(--ease-out);
}

.btn-primary:hover svg,
.btn-secondary:hover svg {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. Hero Backdrop
   -------------------------------------------------------------------------- */
/*
   The artwork is drawn on a pseudo-element instead of the section itself.
   The hero is tall (it also holds the browser mockup), so `cover` on the
   whole section would zoom the image and crop off the butterflies.
   Instead, ::before is sized to the artwork's own proportions at full
   screen width, then fades into #040811.

   Desktop/tablet (>= 768px): images/hero-bg-pc.webp     (landscape 16:9)
   Mobile (< 768px):          images/hero-bg-mobile.webp (portrait 9:16)

   `background-size: cover` inside the pseudo-element means a file that is
   slightly off these ratios is trimmed by a few pixels, never stretched
   and never left with gaps.
*/
/* Clean deep obsidian hero with subtle matte depth */
.hero-backdrop {
    /* Artwork brightness: 1 = full strength, lower = dimmer */
    --hero-art-opacity: 0.3;

    position: relative;
    isolation: isolate;
    background-color: #040811;
}

.hero-backdrop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    opacity: var(--hero-art-opacity);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    pointer-events: none;
}

/* Desktop & tablet: full-width landscape artwork */
@media (min-width: 768px) {
    .hero-backdrop::before {
        aspect-ratio: 16 / 9;
        background-image: url('../images/hero-bg-pc.webp');
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
    }
}

/* Mobile: dedicated portrait artwork (butterflies top-left and bottom-right) */
@media (max-width: 767.98px) {
    .hero-backdrop {
        /* Mobile artwork is naturally darker, so it's dimmed less */
        --hero-art-opacity: 0.4;
    }

    .hero-backdrop::before {
        aspect-ratio: 9 / 16;
        background-image: url('../images/hero-bg-mobile.webp');
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
    }
}

/*
   Hero layer stack (inside the isolated .hero-backdrop):
     base   #040811 deep obsidian
     z -2   ::after       subtle matte depth (soft top lift + edge vignette)
     z -1   ::before      butterfly artwork (unchanged)
     auto   hero content
*/

/* Subtle matte depth: a very soft tonal lift at the top centre and a
   gentle darkening toward the edges. No lines, no fog, no noise. */
.hero-backdrop::after,
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(13, 20, 29, 0.7), transparent 75%),
        radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(2, 4, 9, 0.55) 100%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   5b. Inner Page Hero (portfolio, services, about, contact)
   Same clean deep obsidian base and matte depth as the homepage hero
   (shared with .hero-backdrop::after above), without the butterflies.
   -------------------------------------------------------------------------- */
.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #040811;
}

/* Center-lit bottom hairline */
.page-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.3), transparent);
    pointer-events: none;
}

/* Subtle legibility halo behind the headline block only */
.hero-copy {
    position: relative;
}

.hero-copy::before {
    content: '';
    position: absolute;
    inset: -10% -8%;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(4, 8, 17, 0.5), transparent 70%);
    pointer-events: none;
}

/* Eyebrow pill */
.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 229, 255, 0.28);
    background-color: rgba(4, 8, 17, 0.55);
    color: var(--color-text);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.eyebrow-pill .pulse-dot {
    position: relative;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-cyan);
    box-shadow: 0 0 10px var(--color-cyan);
}

.eyebrow-pill .pulse-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: var(--color-cyan);
    animation: pulse-ring 2.2s var(--ease-out) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(100deg, #FFFFFF 0%, var(--color-cyan) 55%, var(--color-cyan-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   6. Browser Frame Showcase
   -------------------------------------------------------------------------- */
/* True frosted-glass bezel: a milky specular gradient rim that visibly
   diffuses the cobalt/cyan light and butterflies behind it */
.browser-frame {
    position: relative;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(13, 20, 29, 0.48) 100%);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
    backdrop-filter: blur(28px) saturate(145%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(0, 229, 255, 0.45);
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 35px 80px -20px rgba(0, 0, 0, 0.85),
        0 0 90px -25px rgba(0, 229, 255, 0.25);
}

/* Specular sheen running along the top edge */
.browser-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    pointer-events: none;
}

.browser-frame-glow {
    position: absolute;
    inset: -12% -6% auto -6%;
    height: 70%;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(0, 163, 255, 0.28), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
    background-color: rgba(21, 28, 38, 0.6);
    border-bottom: 1px solid var(--color-border);
}

.browser-dots {
    display: flex;
    gap: 0.45rem;
    flex-shrink: 0;
}

.browser-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #2A3341;
}

.browser-dots span:nth-child(1) {
    background-color: #3A4556;
}

.browser-url {
    flex: 1;
    max-width: 26rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background-color: var(--color-obsidian);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Translucent inner frame around the mockup (padding set in HTML) */
/* URL label ends with an ellipsis instead of clipping on narrow screens */
.browser-url span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 639.98px) {
    .browser-dots {
        display: none;
    }

    .browser-url {
        justify-content: flex-start;
    }
}

.browser-viewport {
    border-radius: 0 0 0.75rem 0.75rem;
    background-color: rgba(8, 14, 26, 0.7);
}

.browser-screen {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.625rem;
    background-color: var(--color-obsidian);
}

/* Subtle inner border + edge shading so the bright screenshot edge
   transitions cleanly into the dark frame */
.browser-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(220, 227, 240, 0.1),
        inset 0 0 24px rgba(4, 8, 17, 0.45);
    pointer-events: none;
}

.browser-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* --------------------------------------------------------------------------
   6b. Hero Before / After Redesign Slider
   -------------------------------------------------------------------------- */
/* Dark obsidian glass container */
.compare-frame {
    position: relative;
    margin: 0;
    padding: 0.6rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(8, 14, 26, 0.72) 100%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(0, 229, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 35px 80px -20px rgba(0, 0, 0, 0.85),
        0 0 90px -25px rgba(0, 229, 255, 0.25);
}

@media (min-width: 640px) {
    .compare-frame {
        padding: 0.75rem;
    }
}

.compare {
    --split: 50%;

    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    background-color: #080E1A;
    cursor: ew-resize;
    /* Vertical page scrolling still works; horizontal drags move the slider */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.compare-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Before layer, clipped to the left of the divider */
.compare-before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

/* Inner edge shading so the screenshots sit cleanly inside the frame */
.compare::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(220, 227, 240, 0.1),
        inset 0 0 28px rgba(4, 8, 17, 0.4);
    pointer-events: none;
}

/* Floating corner pills */
.compare-pill {
    position: absolute;
    top: 0.85rem;
    z-index: 4;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out);
}

.compare-pill-before {
    left: 0.85rem;
    background-color: rgba(4, 8, 17, 0.72);
    border: 1px solid rgba(220, 227, 240, 0.14);
    color: var(--color-muted);
}

.compare-pill-after {
    right: 0.85rem;
    background-color: rgba(4, 8, 17, 0.72);
    border: 1px solid rgba(0, 229, 255, 0.45);
    color: var(--color-cyan);
    box-shadow: 0 0 18px -6px rgba(0, 229, 255, 0.6);
}

.compare.hide-before-pill .compare-pill-before,
.compare.hide-after-pill .compare-pill-after {
    opacity: 0;
}

@media (max-width: 479.98px) {
    .compare-pill {
        top: 0.6rem;
        padding: 0.3rem 0.55rem;
        font-size: 0.55rem;
        letter-spacing: 0.08em;
    }

    .compare-pill-before {
        left: 0.6rem;
    }

    .compare-pill-after {
        right: 0.6rem;
    }
}

/* Vertical cyan divider */
.compare-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    z-index: 5;
    width: 2px;
    margin-left: -1px;
    background-color: #00E5FF;
    box-shadow:
        0 0 12px rgba(0, 229, 255, 0.7),
        0 0 2px rgba(0, 229, 255, 0.9);
}

/* Tactile circular drag handle */
.compare-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(21, 28, 38, 0.92), rgba(4, 8, 17, 0.92));
    border: 1.5px solid #00E5FF;
    color: #00E5FF;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 6px rgba(0, 229, 255, 0.08),
        0 10px 30px -6px rgba(0, 0, 0, 0.7),
        0 0 24px -4px rgba(0, 229, 255, 0.6);
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.compare-handle:hover,
.compare.is-dragging .compare-handle {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 8px rgba(0, 229, 255, 0.12),
        0 10px 30px -6px rgba(0, 0, 0, 0.7),
        0 0 32px -2px rgba(0, 229, 255, 0.75);
}

.compare-handle:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 4px;
    border-radius: 50%;
}

@media (max-width: 639.98px) {
    .compare-handle {
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* --------------------------------------------------------------------------
   7. Section Surfaces, Labels & Cards
   -------------------------------------------------------------------------- */

/* Bespoke dark UI illustrations inside each Build Standard card,
   kept faint and faded out toward the copy so text stays crisp */
.has-art {
    overflow: hidden;
}

.has-art > :not(.card-art) {
    position: relative;
    z-index: 1;
}

.card-art {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 0;
    width: 68%;
    max-width: 22rem;
    height: auto;
    opacity: 0.16;
    pointer-events: none;
    /* Fades down into the #0D141D card surface and in from the left */
    -webkit-mask-image:
        linear-gradient(180deg, #000 0%, transparent 82%),
        linear-gradient(90deg, transparent 0%, #000 45%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(180deg, #000 0%, transparent 82%),
        linear-gradient(90deg, transparent 0%, #000 45%);
    mask-composite: intersect;
    transition: opacity 0.4s var(--ease-out);
}

/* Horizontal cards: art sits along the right side */
.card-art-row {
    top: 50%;
    width: 46%;
    max-width: 16rem;
    transform: translateY(-50%);
    -webkit-mask-image:
        linear-gradient(180deg, #000 0%, #000 40%, transparent 92%),
        linear-gradient(90deg, transparent 0%, #000 55%);
    mask-image:
        linear-gradient(180deg, #000 0%, #000 40%, transparent 92%),
        linear-gradient(90deg, transparent 0%, #000 55%);
}

.has-art:hover .card-art {
    opacity: 0.24;
}

/* Shared 1px center-lit cyan hairline */
.hairline-top::before,
.hairline-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.35), transparent);
    pointer-events: none;
    z-index: 1;
}

.hairline-top::before {
    top: 0;
}

.hairline-bottom::after {
    bottom: 0;
}

/* Section 2 — elevated slate-navy surface with architectural dot matrix */
.section-elevated {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #080F1D;
    background-image:
        radial-gradient(ellipse 60% 45% at 50% 0%, rgba(30, 58, 138, 0.22), transparent 70%),
        radial-gradient(rgba(0, 229, 255, 0.085) 1px, transparent 1px);
    background-size:
        100% 100%,
        24px 24px;
    background-position:
        center top,
        center center;
}

/* Deep obsidian sections (02, 04) with a royal-cobalt ambient glow */
.section-obsidian {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #040811;
    background-image:
        radial-gradient(ellipse 65% 50% at 50% 45%, rgba(30, 58, 138, 0.25), transparent 72%),
        radial-gradient(ellipse 35% 30% at 85% 85%, rgba(0, 163, 255, 0.06), transparent 70%);
}

/* Section 4 — transitional band easing from obsidian into the footer surface */
.section-cta-band {
    position: relative;
    isolation: isolate;
    background-color: #040811;
    background-image:
        radial-gradient(ellipse 55% 55% at 20% 55%, rgba(30, 58, 138, 0.22), transparent 70%),
        radial-gradient(ellipse 45% 45% at 82% 50%, rgba(0, 229, 255, 0.07), transparent 70%),
        linear-gradient(to bottom, #040811 0%, #050A13 60%, #060B15 100%);
}

/* Oversized watermark numeral in a section header */
.section-head {
    position: relative;
}

.watermark-numeral {
    position: absolute;
    top: -2.5rem;
    right: -0.5rem;
    z-index: -1;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(7rem, 16vw, 14rem);
    line-height: 1;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 229, 255, 0.07);
    background: linear-gradient(180deg, rgba(220, 227, 240, 0.05), transparent 85%);
    -webkit-background-clip: text;
    background-clip: text;
    user-select: none;
    pointer-events: none;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-cyan);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-label::before {
    content: '';
    width: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-cyan));
}

/* Monospaced index prefix, e.g. "01 /" */
.section-index {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.section-index span {
    color: var(--color-cyan);
}

.surface-card {
    position: relative;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.surface-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 0% 0%, rgba(0, 229, 255, 0.08), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    pointer-events: none;
}

.surface-card:hover {
    border-color: rgba(0, 229, 255, 0.25);
    background-color: #0F1721;
    transform: translateY(-4px);
}

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

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(30, 58, 138, 0.55), rgba(0, 163, 255, 0.12));
    border: 1px solid rgba(0, 229, 255, 0.22);
    color: var(--color-cyan);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 24px -8px rgba(0, 229, 255, 0.5);
}

/* Capability chips */
.capability-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 500;
    transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.capability-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-cyan-deep);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.capability-chip:hover {
    border-color: rgba(0, 229, 255, 0.3);
    color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   8. Case Study Cards
   -------------------------------------------------------------------------- */
.case-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.case-card:hover {
    border-color: rgba(0, 229, 255, 0.28);
    transform: translateY(-6px);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.8), 0 0 60px -30px rgba(0, 229, 255, 0.45);
}

.case-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--color-surface-raised);
    border-bottom: 1px solid var(--color-border);
}

.case-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.7s var(--ease-out);
}

.case-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(13, 20, 29, 0.85) 100%);
    pointer-events: none;
}

.case-card:hover .case-media img {
    transform: scale(1.05);
}

.industry-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background-color: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(0, 163, 255, 0.3);
    color: #9BDDFF;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.scope-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Single-line tag row: on very narrow cards the last tag truncates with
   an ellipsis instead of wrapping or overflowing the card */
.scope-row {
    min-width: 0;
    overflow: hidden;
}

.scope-row .scope-chip {
    display: block;
    flex-shrink: 0;
}

.scope-row .scope-chip:last-child {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-cyan);
    font-weight: 600;
    font-size: 0.9rem;
}

.case-link svg {
    transition: transform 0.25s var(--ease-out);
}

.case-card:hover .case-link svg {
    transform: translateX(4px);
}

/* Flagship spotlight card (full-width, 7 / 5 split) */
.spotlight-card {
    position: relative;
    background:
        linear-gradient(135deg, rgba(30, 58, 138, 0.18), transparent 45%),
        var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 1.5rem;
    transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.spotlight-card:hover {
    border-color: rgba(0, 229, 255, 0.28);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85), 0 0 80px -40px rgba(0, 229, 255, 0.45);
}

/* Geometric corner-bracket accents */
.corner-bracket {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border-color: rgba(0, 229, 255, 0.55);
    border-style: solid;
    border-width: 0;
    pointer-events: none;
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.corner-bracket.tl {
    top: -1px;
    left: -1px;
    border-top-width: 2px;
    border-left-width: 2px;
    border-top-left-radius: 1.5rem;
}

.corner-bracket.tr {
    top: -1px;
    right: -1px;
    border-top-width: 2px;
    border-right-width: 2px;
    border-top-right-radius: 1.5rem;
}

.corner-bracket.bl {
    bottom: -1px;
    left: -1px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-bottom-left-radius: 1.5rem;
}

.corner-bracket.br {
    bottom: -1px;
    right: -1px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-bottom-right-radius: 1.5rem;
}

.spotlight-card:hover .corner-bracket {
    width: 2rem;
    height: 2rem;
    border-color: var(--color-cyan);
}

.spotlight-media {
    position: relative;
    display: block;
    padding: 0.75rem;
    border-radius: 1rem;
    background-color: #080E1A;
    border: 1px solid var(--color-border);
}

/* Locked to 16:10 at every size, matching the Origin Teak and
   Sewing Machine Shop previews, so the screenshot is never zoomed */
.spotlight-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.625rem;
    background-color: var(--color-surface-raised);
}

.spotlight-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(220, 227, 240, 0.1),
        inset 0 0 24px rgba(4, 8, 17, 0.45);
    pointer-events: none;
}

.spotlight-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.8s var(--ease-out);
}

.spotlight-card:hover .spotlight-screen img {
    transform: scale(1.03);
}

.spotlight-card .case-link svg {
    transition: transform 0.25s var(--ease-out);
}

.spotlight-card:hover .case-link svg {
    transform: translateX(4px);
}

/* Focus / Deliverable summary line inside case cards */
.focus-line {
    display: grid;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background-color: rgba(4, 8, 17, 0.55);
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-text);
}

@media (min-width: 640px) {
    .focus-line {
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
    }
}

.focus-line dt {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-cyan);
    padding-top: 0.1rem;
}

.focus-line dd {
    margin: 0;
    color: var(--color-muted);
}

/* Problem / approach narrative */
.narrative-label {
    display: block;
    margin-bottom: 0.35rem;
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-cyan);
}

/* --------------------------------------------------------------------------
   8b. Bento Grid (01 / THE BUILD STANDARD)
   -------------------------------------------------------------------------- */
.bento-feature {
    padding: 2rem;
    background:
        radial-gradient(ellipse 70% 60% at 100% 0%, rgba(30, 58, 138, 0.22), transparent 70%),
        var(--color-surface);
}

@media (min-width: 1024px) {
    .bento-feature {
        padding: 2.5rem;
    }
}

.bento-points {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.bento-points li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--color-text);
}

.bento-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.5rem;
    height: 0.5rem;
    border: 1.5px solid var(--color-cyan);
    border-radius: 2px;
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.45);
}

.bento-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.75rem;
}

@media (min-width: 640px) {
    .bento-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

.bento-row .icon-tile {
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8c. Frosted Track Cards (02 / TWO WAYS TO BUILD)
   -------------------------------------------------------------------------- */
.frosted-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1.5rem;
    /* Same frosted-glass bezel treatment as the hero browser frame */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(13, 20, 29, 0.48) 100%);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
    backdrop-filter: blur(28px) saturate(145%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(0, 229, 255, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 30px 60px -30px rgba(0, 0, 0, 0.8);
    transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.frosted-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.22);
}

/* Top edge accent */
.frosted-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    pointer-events: none;
}

.track-cyan::before {
    background: linear-gradient(90deg, transparent, var(--color-cyan) 30%, var(--color-cyan-deep) 70%, transparent);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.55);
}

.track-cobalt::before {
    background: linear-gradient(90deg, transparent, #3B5BDB 30%, var(--color-cobalt) 70%, transparent);
    box-shadow: 0 0 18px rgba(59, 91, 219, 0.55);
}

/* Soft inner glow under the accent */
.frosted-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 9rem;
    z-index: -1;
    pointer-events: none;
}

.track-cyan::after {
    background: radial-gradient(ellipse at top, rgba(0, 229, 255, 0.1), transparent 70%);
}

.track-cobalt::after {
    background: radial-gradient(ellipse at top, rgba(30, 58, 138, 0.35), transparent 70%);
}

.track-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.track-cyan .track-badge {
    color: var(--color-cyan);
}

.track-cobalt .track-badge {
    color: #8FA8FF;
}

.track-list {
    display: grid;
    gap: 0.75rem;
}

.track-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text);
}

.track-list svg {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.track-cyan .track-list svg {
    color: var(--color-cyan);
}

.track-cobalt .track-list svg {
    color: #8FA8FF;
}

.track-fit {
    padding: 1rem 1.15rem;
    border-radius: 0.875rem;
    background-color: rgba(4, 8, 17, 0.5);
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-muted);
}

.track-fit strong {
    color: var(--color-text);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   8d. Scenario Cards (04 / COMMON SCENARIOS)
   -------------------------------------------------------------------------- */
.scenario-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(21, 28, 38, 0.6), rgba(13, 20, 29, 0.6)),
        var(--color-surface);
    border: 1px solid var(--color-border);
    transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.scenario-card:hover {
    border-color: rgba(0, 229, 255, 0.25);
    transform: translateY(-4px);
}

/* Architectural left rule */
.scenario-card::before {
    content: '';
    position: absolute;
    top: 2rem;
    left: 0;
    width: 2px;
    height: 2.5rem;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, var(--color-cyan), var(--color-cyan-deep));
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.scenario-index {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--color-muted);
}

.scenario-quote {
    margin-top: 1.25rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #FFFFFF;
}

.scenario-quote::before {
    content: '\201C';
    color: var(--color-cyan);
}

.scenario-quote::after {
    content: '\201D';
    color: var(--color-cyan);
}

.scenario-fit {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background-color: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.22);
    color: var(--color-cyan);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   9. CTA Banner
   -------------------------------------------------------------------------- */
.cta-banner {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1.75rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
    background:
        radial-gradient(ellipse 70% 120% at 0% 0%, rgba(30, 58, 138, 0.75), transparent 60%),
        radial-gradient(ellipse 60% 100% at 100% 100%, rgba(0, 163, 255, 0.28), transparent 60%),
        var(--color-surface);
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(220, 227, 240, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 227, 240, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    background:
        radial-gradient(ellipse 50% 70% at 50% 0%, rgba(30, 58, 138, 0.14), transparent 70%),
        #060B15;
}

/* Center-lit top hairline */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.35), transparent);
    pointer-events: none;
}

.footer-link {
    color: var(--color-muted);
    transition: color 0.2s var(--ease-out);
}

.footer-link:hover {
    color: var(--color-cyan);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.social-icon:hover {
    color: var(--color-cyan);
    border-color: rgba(0, 229, 255, 0.35);
    background-color: var(--color-surface-raised);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   10b. Portfolio Page
   -------------------------------------------------------------------------- */
/* Category filter pills */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background-color: rgba(13, 20, 29, 0.7);
    border: 1px solid rgba(220, 227, 240, 0.1);
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition:
        color 0.25s var(--ease-out),
        background-color 0.25s var(--ease-out),
        border-color 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out);
}

.filter-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(136, 145, 157, 0.55);
    transition: background-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.filter-pill:hover {
    color: var(--color-text);
    border-color: rgba(220, 227, 240, 0.22);
}

.filter-pill[aria-pressed="true"] {
    color: #FFFFFF;
    background-color: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 20px -6px rgba(0, 229, 255, 0.55);
}

.filter-pill[aria-pressed="true"]::before {
    background-color: var(--color-cyan);
    box-shadow: 0 0 8px var(--color-cyan);
}

.filter-pill:focus-visible {
    border-radius: 999px;
}

/* Case study sections: smooth filter transitions */
.case-study,
.more-work,
.work-card {
    transition: opacity 0.32s var(--ease-out), transform 0.32s var(--ease-out);
}

.case-study.is-filtering-out,
.case-study.is-filtering-in,
.more-work.is-filtering-out,
.more-work.is-filtering-in,
.work-card.is-filtering-out,
.work-card.is-filtering-in {
    opacity: 0;
    transform: translateY(12px);
}

/* ---- More Work gallery ------------------------------------------------- */
.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.work-card.reveal-done {
    transition:
        opacity 0.32s var(--ease-out),
        border-color 0.3s var(--ease-out),
        transform 0.3s var(--ease-out),
        box-shadow 0.3s var(--ease-out);
}

.work-card.reveal-done:hover {
    border-color: rgba(0, 229, 255, 0.28);
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.8), 0 0 60px -30px rgba(0, 229, 255, 0.45);
}

.work-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background-color: #080E1A;
    cursor: zoom-in;
}

@media (min-width: 1024px) {
    .work-card-featured .work-thumb {
        aspect-ratio: 2 / 1;
    }
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.7s var(--ease-out);
}

.work-card:hover .work-thumb img,
.work-thumb:focus-visible img {
    transform: scale(1.04);
}

.work-thumb:focus-visible {
    outline-offset: -3px;
}

/* "View full page" pill, revealed on hover / keyboard focus */
.work-zoom {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background-color: rgba(4, 8, 17, 0.78);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: var(--color-cyan);
    font-size: 0.72rem;
    font-weight: 600;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.work-card:hover .work-zoom,
.work-thumb:focus-visible .work-zoom {
    opacity: 1;
    transform: none;
}

/* Touch devices: keep the pill visible since there is no hover */
@media (hover: none) {
    .work-zoom {
        opacity: 1;
        transform: none;
    }
}

/* ---- Full-page screenshot viewer --------------------------------------- */
.work-lightbox {
    width: min(1100px, 94vw);
    max-width: none;
    height: 90vh;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(0, 229, 255, 0.45);
    background-color: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
}

.work-lightbox[open] {
    display: flex;
    flex-direction: column;
}

.work-lightbox::backdrop {
    background-color: rgba(2, 4, 9, 0.82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-surface-raised);
}

.lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    border: 1px solid var(--color-border-strong);
    background-color: rgba(4, 8, 17, 0.6);
    color: var(--color-text);
    cursor: pointer;
    transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.lightbox-btn:hover {
    color: var(--color-cyan);
    border-color: rgba(0, 229, 255, 0.4);
}

.lightbox-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: #FFFFFF;
}

.lightbox-scroll img {
    display: block;
    width: 100%;
    height: auto;
}

/* Top hairline only shows on elevated case study surfaces */
.section-obsidian > .seq-hairline {
    display: none;
}

/* Mobile before/after: side-by-side phone frames */
.phone-label {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.phone-label-after {
    color: var(--color-cyan);
}

.phone-frame {
    max-width: 11.5rem;
    margin: 0 auto;
    padding: 0.4rem;
    border-radius: 1.6rem;
    background-color: #05090F;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 20px 40px -18px rgba(0, 0, 0, 0.85);
}

.phone-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 364 / 790;
    border-radius: 1.25rem;
    object-fit: cover;
    object-position: top center;
}

/* Project meta row: Role / Timeline / Stack */
.case-meta {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-border);
}

@media (min-width: 640px) {
    .case-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.case-meta > div {
    padding: 1rem 1.25rem;
    background-color: rgba(13, 20, 29, 0.85);
}

.case-meta dt {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-cyan);
}

.case-meta dd {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

/* Architectural solution points */
.case-points {
    display: grid;
    gap: 0.85rem;
}

.case-points li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--color-muted);
}

.case-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0.5rem;
    height: 0.5rem;
    border: 1.5px solid var(--color-cyan);
    border-radius: 2px;
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.45);
}

.case-points strong {
    color: var(--color-text);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   10c. Services Page
   -------------------------------------------------------------------------- */
/* Hero jump links */
.jump-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background-color: rgba(13, 20, 29, 0.7);
    border: 1px solid rgba(220, 227, 240, 0.1);
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}

.jump-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-cyan-deep);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.jump-chip:hover {
    color: #FFFFFF;
    border-color: rgba(0, 229, 255, 0.4);
    background-color: rgba(0, 229, 255, 0.06);
}

/* Service cards */
.service-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

@media (min-width: 1024px) {
    .service-card {
        padding: 2.5rem;
    }
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-num {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--color-muted);
}

.service-fit {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background-color: rgba(4, 8, 17, 0.55);
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-muted);
}

.service-fit strong {
    color: var(--color-text);
    font-weight: 600;
}

.service-proof {
    margin-top: auto;
    padding-top: 1.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-cyan);
}

/* Platform comparison table */
.compare-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-strong);
    background-color: rgba(13, 20, 29, 0.6);
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    text-align: left;
}

.compare-table th,
.compare-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    line-height: 1.55;
    vertical-align: top;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.compare-table thead th {
    background-color: var(--color-surface-raised);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
}

.compare-table tbody th {
    width: 18%;
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-cyan);
}

.compare-table td {
    color: var(--color-muted);
}

.compare-table a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: rgba(0, 229, 255, 0.4);
    text-underline-offset: 3px;
    transition: color 0.2s var(--ease-out);
}

.compare-table a:hover {
    color: var(--color-cyan);
}

/* "Every build includes" items */
.include-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

.include-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background-color: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.22);
    color: var(--color-cyan);
}

/* FAQ accordion (native <details>) */
.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: border-color 0.25s var(--ease-out);
}

.faq-item[open] {
    border-color: rgba(0, 229, 255, 0.28);
}

.faq-item summary {
    position: relative;
    display: block;
    padding: 1.2rem 3.5rem 1.2rem 1.4rem;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Plus / minus indicator */
.faq-item summary::before,
.faq-item summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1.4rem;
    width: 0.85rem;
    height: 2px;
    border-radius: 2px;
    background-color: var(--color-cyan);
    transition: transform 0.3s var(--ease-out);
}

.faq-item summary::after {
    transform: rotate(90deg);
}

.faq-item[open] summary::after {
    transform: rotate(0deg);
}

.faq-item summary:focus-visible {
    outline-offset: -2px;
    border-radius: var(--radius-md);
}

.faq-answer {
    padding: 0 1.4rem 1.3rem;
    font-size: 0.925rem;
    line-height: 1.7;
    color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   10d. About Page
   -------------------------------------------------------------------------- */
/* Hero portrait */
.portrait-frame {
    position: relative;
    width: min(22rem, 78vw);
    aspect-ratio: 1;
    margin: 0 auto;
}

.portrait-frame img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.85),
        0 0 0 6px rgba(4, 8, 17, 0.9);
}

/* Soft cobalt/cyan glow behind the portrait */
.portrait-glow {
    position: absolute;
    inset: -12%;
    z-index: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 229, 255, 0.28), transparent 60%),
        radial-gradient(circle at 70% 75%, rgba(30, 58, 138, 0.55), transparent 62%);
    filter: blur(30px);
    pointer-events: none;
}

/* Thin luminous ring */
.portrait-ring {
    position: absolute;
    inset: -14px;
    z-index: 1;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.35);
    box-shadow: 0 0 30px -6px rgba(0, 229, 255, 0.45);
    pointer-events: none;
}

.portrait-ring::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed rgba(220, 227, 240, 0.12);
}

.portrait-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background-color: rgba(13, 20, 29, 0.85);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}

.portrait-badge .pulse-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-cyan);
    box-shadow: 0 0 10px var(--color-cyan);
}

.portrait-badge-top {
    top: 8%;
    left: -6%;
}

.portrait-badge-bottom {
    right: -4%;
    bottom: 10%;
}

/* Story copy */
.story-copy p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-muted);
}

.story-copy p + p {
    margin-top: 1rem;
}

/* Vertical timeline */
.timeline {
    position: relative;
    display: grid;
    gap: 1.25rem;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.45rem;
    width: 1px;
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.5), rgba(0, 229, 255, 0.08));
}

.timeline-item {
    position: relative;
    padding: 1.4rem 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 1.75rem;
    left: calc(-2rem + 0.45rem - 5px);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: var(--color-obsidian);
    border: 2px solid var(--color-cyan-deep);
}

.timeline-item-current {
    border-color: rgba(0, 229, 255, 0.3);
}

.timeline-item-current::before {
    background-color: var(--color-cyan);
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px var(--color-cyan);
}

.timeline-date {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-cyan);
}

.timeline-title {
    margin-top: 0.4rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: #FFFFFF;
}

.timeline-text {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--color-muted);
}

.timeline-text a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: rgba(0, 229, 255, 0.4);
    text-underline-offset: 3px;
}

.timeline-text a:hover {
    color: var(--color-cyan);
}

/* Principles */
.principle-card {
    position: relative;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(21, 28, 38, 0.6), rgba(13, 20, 29, 0.6)),
        var(--color-surface);
    border: 1px solid var(--color-border);
}

.principle-num {
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--color-cyan);
}

/* Stats row */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-strong);
    background-color: var(--color-border);
}

@media (min-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat-item {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.4rem;
    padding: 1.75rem 1.5rem;
    background-color: rgba(13, 20, 29, 0.92);
}

.stat-item dd {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(100deg, #FFFFFF 0%, var(--color-cyan) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item dt {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Outside work band */
.outside-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 2.5rem 1.75rem;
    border-radius: 1.75rem;
    border: 1px solid var(--color-border-strong);
    background:
        radial-gradient(ellipse 60% 100% at 0% 0%, rgba(30, 58, 138, 0.35), transparent 60%),
        var(--color-surface);
}

@media (min-width: 1024px) {
    .outside-card {
        padding: 3rem;
    }
}

.outside-card .watermark-numeral {
    top: -1.5rem;
    right: 1rem;
}

/* --------------------------------------------------------------------------
   10e. Contact Page
   -------------------------------------------------------------------------- */
.form-card {
    position: relative;
    padding: 1.75rem;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(13, 20, 29, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(0, 229, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 40px 80px -30px rgba(0, 0, 0, 0.85);
}

@media (min-width: 640px) {
    .form-card {
        padding: 2.5rem;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.field-optional {
    font-weight: 400;
    color: var(--color-muted);
}

.field-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background-color: rgba(4, 8, 17, 0.7);
    border: 1px solid rgba(220, 227, 240, 0.14);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.field-input::placeholder {
    color: rgba(136, 145, 157, 0.75);
}

.field-input:hover {
    border-color: rgba(220, 227, 240, 0.24);
}

.field-input:focus {
    outline: none;
    border-color: rgba(0, 229, 255, 0.6);
    background-color: rgba(4, 8, 17, 0.9);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.field-input[aria-invalid="true"] {
    border-color: rgba(248, 113, 113, 0.75);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

textarea.field-input {
    min-height: 9rem;
    resize: vertical;
}

/* Custom select arrow */
.select-wrap {
    position: relative;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.75rem;
    cursor: pointer;
}

.select-wrap select option {
    background-color: var(--color-surface);
    color: var(--color-text);
}

.select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1.1rem;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--color-cyan);
    border-bottom: 2px solid var(--color-cyan);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.field-error {
    font-size: 0.8rem;
    font-weight: 500;
    color: #FCA5A5;
}

/* Service choice chips (checkbox inside a label) */
.choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-radius: 0.75rem;
    background-color: rgba(4, 8, 17, 0.55);
    border: 1px solid rgba(220, 227, 240, 0.12);
    color: var(--color-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.choice:hover {
    border-color: rgba(220, 227, 240, 0.26);
    color: var(--color-text);
}

.choice input {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    border-radius: 0.3rem;
    accent-color: var(--color-cyan);
    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: rgba(0, 229, 255, 0.5);
    background-color: rgba(0, 229, 255, 0.07);
    color: #FFFFFF;
}

.choice:has(input:focus-visible) {
    outline: 2px solid var(--color-cyan);
    outline-offset: 2px;
}

/* Custom checkbox: square outline that fills cyan with a dark tick */
.choice input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.35rem;
    border: 1.5px solid rgba(220, 227, 240, 0.35);
    background-color: rgba(4, 8, 17, 0.6);
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.choice input[type="checkbox"]::before {
    content: '';
    width: 0.62rem;
    height: 0.62rem;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    background-color: #040811;
    transform: scale(0);
    transition: transform 0.15s var(--ease-out);
}

.choice:hover input[type="checkbox"] {
    border-color: rgba(0, 229, 255, 0.55);
}

.choice input[type="checkbox"]:checked {
    background-color: var(--color-cyan);
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.choice input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.choice input[type="checkbox"]:focus-visible {
    outline: none;
}

/* Form section headings ("01 About you", "02 Your project") */
.form-group-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2.25rem 0 1.25rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text);
}

.form-group-title:first-of-type {
    margin-top: 0;
}

.form-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.35), rgba(0, 229, 255, 0));
}

.form-group-num {
    display: inline-grid;
    place-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 229, 255, 0.35);
    background-color: rgba(0, 229, 255, 0.06);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--color-cyan);
}

/* hCaptcha widget spacing; scaled down slightly on very narrow phones */
.captcha-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.75rem;
    min-height: 78px;
}

@media (max-width: 400px) {
    .captcha-wrap .h-captcha {
        transform: scale(0.88);
        transform-origin: left top;
    }
}

/* Divider above the send row */
.form-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(220, 227, 240, 0.08);
}

/* Submit feedback */
.btn-primary:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.form-status {
    margin-top: 1.25rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.55;
}

.form-status-success {
    background-color: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: #A5F3FC;
}

.form-status-error {
    background-color: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #FECACA;
}

/* Sidebar details */
.contact-facts {
    display: grid;
    gap: 0.9rem;
}

.contact-facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text);
}

.contact-facts svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--color-cyan);
}

.next-steps {
    display: grid;
    gap: 1rem;
}

.next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.next-steps p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-muted);
}

.next-steps strong {
    color: var(--color-text);
    font-weight: 600;
}

.next-num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.4);
    background-color: rgba(0, 229, 255, 0.08);
    color: var(--color-cyan);
    font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   11. Motion System
   GPU-friendly (transform + opacity only). Every hidden starting state is
   scoped to (prefers-reduced-motion: no-preference) and to JS-enabled
   pages, so reduced-motion and no-JS visitors see all content immediately.
   -------------------------------------------------------------------------- */

/* Real hairline element used as Step 1 of elevated sections */
.seq-hairline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.35), transparent);
    transform-origin: center;
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {

    /* ---- 11a. Above-the-fold hero load: 140ms descending steps --------- */
    .hero-enter {
        animation: hero-rise 900ms var(--ease-reveal) both;
    }

    .hero-enter-1 {
        animation-delay: 0ms;
    }

    .hero-enter-2 {
        animation-delay: 140ms;
    }

    .hero-enter-3 {
        animation-delay: 280ms;
    }

    .hero-enter-4 {
        animation-delay: 420ms;
    }

    .hero-enter-settle {
        animation: hero-settle 900ms var(--ease-reveal) 560ms both;
    }

    /* ---- 11b. Sequenced steps: 28px upward settle, 850ms --------------- */
    /* Per-step transition-delay (index x 130ms) is set inline by JS.
       .reveal-done is added once each step settles, handing transitions
       back to the element's own hover styles. */
    html:not(.no-js) [data-reveal-sequence] [data-reveal-step]:not(.reveal-done) {
        opacity: 0;
        transform: translateY(28px);
        transition:
            opacity 850ms var(--ease-reveal),
            transform 850ms var(--ease-reveal);
    }

    html:not(.no-js) [data-reveal-sequence] [data-reveal-step].is-revealed:not(.reveal-done) {
        opacity: 1;
        transform: none;
    }

    /* ---- 11c. Step 1 hairline: draws outward from the centre, 900ms ---- */
    html:not(.no-js) [data-reveal-sequence] .seq-hairline[data-reveal-step]:not(.reveal-done) {
        opacity: 1;
        transform: scaleX(0);
        transition: transform 900ms var(--ease-reveal);
    }

    html:not(.no-js) [data-reveal-sequence] .seq-hairline[data-reveal-step].is-revealed:not(.reveal-done) {
        transform: scaleX(1);
    }

    /* ---- 11d. CTA banner surface: subtle scale-up before its steps ----- */
    html:not(.no-js) .cta-banner[data-reveal-sequence] {
        opacity: 0;
        transform: scale(0.97);
        transition:
            opacity 850ms var(--ease-reveal),
            transform 850ms var(--ease-reveal);
    }

    html:not(.no-js) .cta-banner[data-reveal-sequence].is-revealed {
        opacity: 1;
        transform: none;
    }
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes hero-settle {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- 11e. Cursor-tracking spotlight on dark cards (pointer devices) ---- */
.case-card {
    position: relative;
}

.case-card > * {
    position: relative;
    z-index: 1;
}

@media (hover: hover) {
    .bento-card::after,
    .case-card::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
        background: radial-gradient(
            320px circle at var(--spot-x, 50%) var(--spot-y, 50%),
            rgba(0, 229, 255, 0.12),
            transparent 65%
        );
        opacity: 0;
        transition: opacity 0.35s var(--ease-out);
        pointer-events: none;
    }

    .bento-card:hover::after,
    .case-card:hover::after {
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   12. Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

    .hero-enter,
    .hero-enter-settle {
        animation: none;
    }
}

} /* end @layer components */
