/* ============================================
   Hexacode — Custom Design System
   ============================================ */

:root {
    --bg: #F5F4F1;
    --bg-soft: #FAF9F7;
    --surface: #FFFFFF;
    --surface-soft: #F7F6F3;
    --text: #1A1A1A;
    --text-soft: #6B6B6B;
    --line: #E0DEDA;
    --line-strong: #B0ADA8;
    --accent: #E8501A;
    --accent-dark: #C23A0A;
    --accent-soft: rgba(232, 80, 26, 0.10);
    --panel: #111111;
    --panel-soft: #1C1C1C;
    --panel-copy: rgba(245, 244, 241, 0.78);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Manrope", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.62;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    letter-spacing: -0.04em;
    color: var(--text);
}

.site-shell {
    min-height: 100vh;
}

main {
    position: relative;
    z-index: 2;
}

/* ============================================
   Section System
   ============================================ */

.section-shell {
    position: relative;
    isolation: isolate;
}

.section-shell + .section-shell {
    border-top: 1px solid var(--line);
}

.section-kicker {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-soft);
    font-family: "JetBrains Mono", "Manrope", sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1;
}

/* ============================================
   Brand
   ============================================ */

/* ============================================
   Cards — Border-only, no shadows
   ============================================ */

.brutal-card,
.service-card,
.listing-card,
.info-panel,
.content-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: border-color 0.2s ease;
}

.brutal-card:hover,
.service-card:hover,
.listing-card:hover,
.info-panel:hover,
.content-panel:hover {
    border-color: var(--accent);
}

.gradient-text {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

/* ============================================
   Hero Illustration — Float + Glow
   ============================================ */

.hero-illustration {
    animation: heroIllFloat 8s ease-in-out infinite;
    will-change: transform;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 45%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.6) 75%, rgba(0,0,0,1) 90%);
    mask-image: linear-gradient(to right, transparent 0%, transparent 45%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.6) 75%, rgba(0,0,0,1) 90%);
}

.hero-illustration img {
    animation: heroIllGlow 6s ease-in-out infinite;
}

@keyframes heroIllFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.005); }
}

@keyframes heroIllGlow {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(232, 80, 26, 0)); }
    50% { filter: drop-shadow(0 8px 24px rgba(232, 80, 26, 0.12)); }
}

/* ============================================
   Hero
   ============================================ */

.hero-cta-primary {
    min-height: 3.2rem;
    padding: 0.9rem 2rem;
    border-radius: 0;
    border: 2px solid var(--text);
    background: var(--text);
    color: #FFFFFF;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-cta-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.hero-cta-secondary {
    min-height: 3.2rem;
    padding: 0.9rem 2rem;
    border-radius: 0;
    border: 2px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.hero-cta-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   Service & Portfolio Cards
   ============================================ */

.service-card--hero {
    background: var(--surface);
    border-left: 3px solid var(--accent);
}

.service-card--featured {
    border-color: rgba(255, 255, 255, 0.08);
    background: var(--panel);
}

.service-card--featured:hover {
    border-color: var(--accent);
}

.portfolio-lead-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.portfolio-lead-card:hover {
    border-color: var(--accent);
}

/* ============================================
   Utilities
   ============================================ */

.bg-accent {
    background-color: var(--accent);
}

.text-accent {
    color: var(--accent);
}

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

.border-3 {
    border-width: 3px;
}

/* ============================================
   Focus States
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   Reveal Animations — Fade only
   ============================================ */

.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal .reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tech pill stagger inside revealed cards */
.js-reveal .tech-pill-home {
    opacity: 0;
    transform: translateY(6px);
}

.reveal.visible .tech-pill-home {
    animation: pillFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.reveal.visible .tech-pill-home:nth-child(2) { animation-delay: 50ms; }
.reveal.visible .tech-pill-home:nth-child(3) { animation-delay: 100ms; }
.reveal.visible .tech-pill-home:nth-child(4) { animation-delay: 150ms; }
.reveal.visible .tech-pill-home:nth-child(5) { animation-delay: 200ms; }
.reveal.visible .tech-pill-home:nth-child(6) { animation-delay: 250ms; }
.reveal.visible .tech-pill-home:nth-child(7) { animation-delay: 300ms; }
.reveal.visible .tech-pill-home:nth-child(8) { animation-delay: 350ms; }

@keyframes pillFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Client Logos — Base
   ============================================ */

.logo-client {
    filter: grayscale(100%);
    opacity: 0.6;
    mix-blend-mode: multiply;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo-client:hover {
    filter: grayscale(0%);
    opacity: 1;
    mix-blend-mode: normal;
}

/* ============================================
   Logo Wall — Equal Treatment Grid
   ============================================ */

.logo-wall {
    background: var(--panel);
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.logo-wall::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
}

.logo-wall__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.logo-wall__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Remove right border on last column */
.logo-wall__cell:nth-child(4n) {
    border-right: none;
}

/* Remove bottom border on last row */
.logo-wall__cell:nth-last-child(-n+4) {
    border-bottom: none;
}

.logo-wall__img {
    display: block;
    height: 1.75rem;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: opacity 0.35s ease;
}

.logo-wall__cell:hover .logo-wall__img {
    opacity: 1;
}

.logo-wall__img--color {
    filter: none;
    opacity: 0.75;
}

.logo-wall__cell:hover .logo-wall__img--color {
    opacity: 1;
}

/* ── Responsive ── */

@media (max-width: 560px) {
    .logo-wall__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo-wall__cell {
        padding: 1.5rem 1rem;
    }

    .logo-wall__cell:nth-child(4n) {
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .logo-wall__cell:nth-child(2n) {
        border-right: none;
    }

    .logo-wall__cell:nth-last-child(-n+4) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .logo-wall__cell:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .logo-wall__img {
        height: 1.35rem;
        max-width: 110px;
    }
}

@media (min-width: 561px) and (max-width: 767px) {
    .logo-wall__img {
        height: 1.5rem;
        max-width: 130px;
    }
}

@media (min-width: 768px) {
    .logo-wall {
        margin-bottom: 4rem;
    }

    .logo-wall__cell {
        padding: 2.25rem 2rem;
    }

    .logo-wall__img {
        height: 2rem;
        max-width: 160px;
    }
}

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

    .logo-wall__img {
        height: 2.25rem;
        max-width: 180px;
    }
}



/* ============================================
   Navigation
   ============================================ */

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: rgba(245, 244, 241, 0.88);
    border-color: var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#navbar .site-nav-inner {
    position: relative;
    z-index: 9991;
}

#mobile-menu {
    z-index: 9989;
}

#mobile-menu-btn {
    position: relative;
    z-index: 9992;
}

#navbar.is-scrolled {
    background: rgba(250, 249, 247, 0.95);
    border-color: var(--line);
    box-shadow: 0 1px 0 var(--line);
}

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

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -7px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}

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

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

/* Desktop Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-chevron {
    transition: transform 0.2s ease;
    color: var(--text-soft);
}

.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown.is-open .nav-dropdown-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    padding-top: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown.is-open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 0.5rem;
    min-width: 280px;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    transition: background 0.15s ease;
}

.nav-dropdown-item:hover {
    background: var(--accent-soft);
}

.nav-dropdown-title {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.3;
}

.nav-dropdown-hook {
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    margin-top: 1px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0;
    border: 2px solid var(--text);
    background: var(--text);
    color: #FFFFFF;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.mobile-menu-panel {
    background: var(--bg);
    border-top: 1px solid var(--line);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    width: 2rem;
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(6px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 2rem;
}

.mobile-nav-link {
    display: block;
    border-bottom: 1px solid var(--line);
    padding: 0.95rem 0;
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.48rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

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

/* Mobile Nav Toggle (Usługi accordion button) */
.mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    cursor: pointer;
    text-align: left;
}

.mobile-nav-toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-soft);
}

.mobile-nav-group.is-open .mobile-nav-toggle-icon {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Mobile Submenu Accordion */
.mobile-nav-submenu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.mobile-nav-group.is-open .mobile-nav-submenu {
    grid-template-rows: 1fr;
}

.mobile-nav-submenu-inner {
    overflow: hidden;
}

.mobile-nav-sublink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0 0.55rem 0.5rem;
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-soft);
    border-bottom: 1px solid var(--line);
    transition: color 0.2s ease;
}

.mobile-nav-sublink:first-child {
    padding-top: 0.75rem;
}

.mobile-nav-sublink:hover {
    color: var(--accent);
}

.mobile-nav-sublink--all {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.mobile-nav-sublink--all:hover {
    color: var(--accent-dark);
}

.mobile-menu-cta {
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    border-radius: 0;
    border: 2px solid var(--text);
    background: var(--text);
    color: #FFFFFF;
    padding: 0.95rem 1.2rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.mobile-menu-note {
    margin-top: 0.9rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-soft);
}

/* ============================================
   Contact Form
   ============================================ */

.contact-form {
    background: var(--surface);
    border: 1px solid var(--line);
}

.contact-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-soft);
}

.contact-input {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-input::placeholder {
    color: var(--line-strong);
    font-weight: 400;
}

.contact-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.contact-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.contact-select-icon {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-soft);
    pointer-events: none;
}

/* Checkbox */
.contact-checkbox {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

/* Submit button */
.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 2.2rem;
    border: 2px solid var(--text);
    border-radius: 0;
    background: var(--text);
    color: #FFFFFF;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.contact-submit:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.contact-field-error {
    display: block;
    min-height: 1.25rem;
    font-size: 0.75rem;
    font-family: var(--font-mono, monospace);
    color: #f87171;
    margin-top: 0.25rem;
}


/* ============================================
   Subpage Headers
   ============================================ */

.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero > .max-w-7xl,
.page-hero > .max-w-4xl {
    position: relative;
    z-index: 1;
}

.page-breadcrumb ol {
    gap: 0.6rem;
    color: var(--text-soft);
}

.page-breadcrumb a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-breadcrumb a:hover {
    color: var(--accent);
}

.stat-chip {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
}

.stat-chip--dark {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--panel);
}

.stat-chip--accent {
    border-color: rgba(232, 80, 26, 0.4);
    background: rgba(232, 80, 26, 0.08);
}

.section-band {
    position: relative;
}

.section-band--soft {
    background: var(--bg-soft);
    border-color: var(--line);
}

.section-band--dark {
    background: var(--panel);
    border-color: rgba(255, 255, 255, 0.08);
}

.content-panel--soft {
    background: var(--surface-soft);
}

.content-panel--dark {
    background: var(--panel);
    border-color: rgba(255, 255, 255, 0.08);
    color: #F0F0F0;
}

.challenge-solution-pair {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.challenge-solution-pair:hover {
    border-color: var(--accent);
}

.listing-card {
    position: relative;
    overflow: hidden;
}

.listing-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.listing-card:hover::after {
    opacity: 1;
}

/* ============================================
   Case Study Cards — Tech Tags & Compact
   ============================================ */

.case-tech-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--line);
    border-radius: 0.25rem;
    color: var(--text-soft);
    background: var(--bg-soft);
    transition: border-color 0.2s ease;
}

.listing-card:hover .case-tech-tag {
    border-color: var(--accent);
}

.case-card-compact {
    min-height: 220px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   Case Study Cards — Realizacje V2
   ============================================ */

/* Universal card */
.card-case {
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card-case:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

/* Featured card (full-width split) */
.card-case-featured {
    border: 1px solid var(--line);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-case-featured:hover {
    border-color: var(--accent);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
}

/* Tech logo pills — homepage technology section */
.tech-pill-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}


/* Tech logo pills — case study detail overview band */
.tech-pill-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    background: #FFFFFF;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
}

/* Accent bar under image — scans left to right on hover */
.card-case-img {
    position: relative;
}
.card-case-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.card-case:hover .card-case-img::after,
.card-case-featured:hover .card-case-img::after {
    transform: scaleX(1);
}

/* Staggered reveal animation */
.card-case.reveal,
.card-case-featured.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.js-reveal .card-case.reveal {
    opacity: 0;
    transform: translateY(20px);
}
.js-reveal .card-case-featured.reveal {
    opacity: 0;
    transform: translateY(16px);
}
.card-case.reveal.visible,
.card-case-featured.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.card-case.reveal.visible:hover {
    transform: translateY(-4px);
}


.article-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer > * {
    position: relative;
    z-index: 1;
}

.footer-mail {
    letter-spacing: -0.01em;
}

/* ============================================
   Line Clamp
   ============================================ */

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   Post Content
   ============================================ */

.post-content {
    font-size: 1.0625rem;
    line-height: 1.84;
    color: var(--text-soft);
}

.post-content h2 {
    font-size: 1.76rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
    margin: 2.2rem 0 0.9rem;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content p {
    margin: 0 0 1rem;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.2rem;
    padding-left: 1.25rem;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: 0.45rem;
}

.post-content strong {
    color: var(--text);
    font-weight: 700;
}

/* ============================================
   Readability
   ============================================ */

p {
    text-wrap: pretty;
}

/* ============================================
   Mobile Sticky CTA
   ============================================ */

.mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.mobile-sticky-cta.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-sticky-cta.is-hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.mobile-sticky-cta-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.88rem 1rem;
    border-radius: 0;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #FFFFFF;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================
   Lightbox
   ============================================ */

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .section-shell + .section-shell {
        border-top: 1px solid var(--line);
    }

    .brutal-card:hover,
    .service-card:hover,
    .listing-card:hover,
    .info-panel:hover,
    .content-panel:hover {
        border-color: var(--line);
    }

    .hero-cta-primary {
        font-size: 0.82rem;
        padding: 0.84rem 1.5rem;
    }

    .mobile-nav-link {
        font-size: 1.34rem;
    }
}

@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
        line-height: 1.76;
    }

    .post-content h2 {
        font-size: 1.44rem;
    }
}

@media (min-width: 768px) {
    .mobile-sticky-cta {
        display: none;
    }
}

/* FAQ Accordion */
details.faq-item > summary::-webkit-details-marker,
details.faq-item > summary::marker {
    display: none;
    content: "";
}

details.faq-item > summary {
    list-style: none;
}

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

details.faq-item > summary .faq-chevron {
    transition: transform 0.25s ease;
}

details.faq-item[open] > summary .faq-chevron {
    transform: rotate(180deg);
}

/* Smooth open/close via grid-template-rows */
details.faq-item .faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

details.faq-item[open] .faq-answer {
    grid-template-rows: 1fr;
}

details.faq-item .faq-answer > div {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .brutal-card,
    .service-card,
    .listing-card,
    .content-panel,
    .info-panel,
    .nav-cta,
    .mobile-nav-link,
    .mobile-menu-cta,
    .hero-cta-primary,
    .hero-cta-secondary,
    .mobile-sticky-cta,
    .tech-pill-home {
        transition: none !important;
        animation: none !important;
    }

    .hero-illustration,
    .hero-illustration img {
        animation: none !important;
    }

    details.faq-item > summary .faq-chevron,
    details.faq-item .faq-answer {
        transition: none !important;
    }
}

/* ============================================
   Prose — body copy from Markdown
   ============================================ */

.prose {
    color: var(--text);
    font-size: 1.0625rem;
    line-height: 1.8;
}

/* Lead paragraph — first paragraph is visually larger */
.prose > p:first-child {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text);
}

.prose h2 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--line);
    line-height: 1.2;
}

.prose h2:first-child {
    margin-top: 0;
    padding-top: 0;
}

.prose h3 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-top: 2.75rem;
    margin-bottom: 0.75rem;
    padding-left: 0.875rem;
    border-left: 3px solid var(--accent);
    line-height: 1.3;
}

.prose p {
    margin-bottom: 1.5rem;
    color: var(--text-soft);
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--text);
    font-weight: 700;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.prose ul li {
    list-style-type: disc;
}

.prose ul li::marker {
    color: var(--accent);
}

.prose ol li {
    list-style-type: decimal;
}

.prose ol li::marker {
    color: var(--accent);
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9em;
}

.prose a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(232, 80, 26, 0.35);
    transition: text-decoration-color 0.2s;
}

.prose a:hover {
    text-decoration-color: var(--accent);
}

.prose blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.75rem 0;
    font-style: italic;
    color: var(--text-soft);
}

.prose hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2.5rem 0;
}

@media (max-width: 768px) {
    .prose {
        font-size: 1rem;
        line-height: 1.75;
    }

    .prose > p:first-child {
        font-size: 1.08rem;
    }

    .prose h2 {
        font-size: 1.35rem;
        margin-top: 2.25rem;
        padding-top: 1.5rem;
    }

    .prose h3 {
        font-size: 1.1rem;
    }
}
