/* ============================================================
   SolarChain — Case pages design system
   Site palette (green/cyan + Onest + glassmorphism) applied to
   the original sketch components. Sketch CSS variables are kept
   by name but remapped to the site palette so inline styles in
   the content "just work" with the new look.
   ============================================================ */

:root {
    /* Brand */
    --grad: linear-gradient(135deg, #4ade80, #06b6d4);
    --green: #22c55e;
    --green-l: #4ade80;
    --cyan: #06b6d4;
    --red: #ef4444;

    /* Remapped sketch variables -> site palette */
    --navy: #0f172a;
    --navy2: #0b1220;
    --gold: #0891b2;      /* accent on white (kicker, links) */
    --gold-l: #22d3ee;    /* accent on dark (hero kicker, stat values) */
    --bg: #f8fafc;
    --card: #ffffff;
    --grey: #64748b;
    --grey-l: #e2e8f0;
    --dark: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.wrap,
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, .kicker, .logo, .nav-links, .nav-overlay__links {
    font-family: 'Onest', system-ui, -apple-system, sans-serif;
}

h2 {
    color: var(--navy);
    font-size: clamp(1.9rem, 4vw, 2.25rem);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

h3 {
    letter-spacing: -0.01em;
}

.kicker {
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
}

.sub {
    color: var(--grey);
    font-size: 1.12rem;
    max-width: 760px;
    margin-bottom: 28px;
}

section {
    padding: 4.5rem 0;
}

section:nth-of-type(even) {
    background: #fff;
}

/* ============================================================
   Navigation (mirrors index.html)
   ============================================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(140%) blur(18px);
    -webkit-backdrop-filter: saturate(140%) blur(18px);
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    font-family: 'Onest', system-ui, -apple-system, sans-serif;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 24px;
    gap: 1.5rem;
}

/* .logo / .logo::after are now defined in site.css (image-based logo).
   Legacy text-logo rules removed so the old pulsing dot no longer shows. */

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.15rem;
    margin: 0 auto;
}

.nav-links > li > a,
.nav-links > li > .nav-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    color: #475569;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    letter-spacing: -0.005em;
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links > li > a:hover { color: #0f172a; }

.nav-links > li > a:hover::after {
    width: calc(100% - 1.9rem);
    left: 0.95rem;
}

.nav-links > li > a.active { color: #0f172a; }
.nav-links > li > a.active::after { width: calc(100% - 1.9rem); left: 0.95rem; }

.nav-dropdown { position: relative; }

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.7rem;
    pointer-events: auto;
}

.nav-trigger .chev {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.25s ease, opacity 0.2s ease;
    opacity: 0.55;
    margin-top: -2px;
}

.nav-dropdown:hover .nav-trigger,
.nav-dropdown.open .nav-trigger {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
}

.nav-dropdown:hover .chev,
.nav-dropdown.open .chev {
    transform: rotate(-135deg) translate(-2px, -2px);
    opacity: 1;
}

.nav-panel {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(150%) blur(16px);
    -webkit-backdrop-filter: saturate(150%) blur(16px);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    padding: 0.55rem;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04), 0 20px 50px rgba(15, 23, 42, 0.12);
    min-width: 280px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.22s;
}

.nav-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: inherit;
    border-left: 1px solid rgba(15, 23, 42, 0.06);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 3px;
}

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

.nav-panel li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: #334155;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.93rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.nav-panel li a:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.08), rgba(6, 182, 212, 0.1));
    color: #0f172a;
    transform: translateX(2px);
}

.nav-panel .nav-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(6, 182, 212, 0.18));
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 100px;
    padding: 3px;
    font-family: 'Onest', system-ui, sans-serif;
}

.lang-btn {
    padding: 0.36rem 0.8rem;
    background: transparent;
    border: 0;
    border-radius: 100px;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    font-family: inherit;
    min-width: 38px;
}

.lang-btn:hover { color: #0f172a; }

.lang-btn.active {
    background: var(--grad);
    color: white;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.32);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.05);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s ease;
    z-index: 1002;
}

.nav-toggle:hover { background: rgba(15, 23, 42, 0.09); }

.nav-toggle span {
    position: absolute;
    left: 50%;
    height: 1.8px;
    background: #1e293b;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle span:nth-child(1) { top: 15px; width: 20px; }
.nav-toggle span:nth-child(2) { top: 21px; width: 14px; }
.nav-toggle span:nth-child(3) { top: 27px; width: 20px; }

.nav-toggle.open span { background: white; }

.nav-toggle.open span:nth-child(1) {
    top: 21px;
    width: 22px;
    transform: translateX(-50%) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scale(0);
}

.nav-toggle.open span:nth-child(3) {
    top: 21px;
    width: 22px;
    transform: translateX(-50%) rotate(-45deg);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 80%, rgba(74, 222, 128, 0.14) 0%, transparent 50%),
        linear-gradient(160deg, #0a1224 0%, #0f172a 50%, #060c1c 100%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    overflow-y: auto;
}

.nav-overlay.open { opacity: 1; visibility: visible; }

.nav-overlay::after {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    top: 30%;
    right: -300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.16) 0%, transparent 60%);
    pointer-events: none;
    animation: orbit 18s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes orbit {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, 40px) scale(1.1); }
}

.nav-overlay__inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 6.5rem 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.nav-overlay__label {
    font-family: 'Onest', sans-serif;
    font-size: 0.72rem;
    color: rgba(6, 182, 212, 0.85);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.05s;
}

.nav-overlay.open .nav-overlay__label { opacity: 1; transform: translateY(0); }

.nav-overlay__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.nav-overlay__links li {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav-overlay.open .nav-overlay__links li:nth-child(1) { transition-delay: 0.10s; }
.nav-overlay.open .nav-overlay__links li:nth-child(2) { transition-delay: 0.15s; }
.nav-overlay.open .nav-overlay__links li:nth-child(3) { transition-delay: 0.20s; }
.nav-overlay.open .nav-overlay__links li:nth-child(4) { transition-delay: 0.25s; }
.nav-overlay.open .nav-overlay__links li:nth-child(5) { transition-delay: 0.30s; }
.nav-overlay.open .nav-overlay__links li:nth-child(6) { transition-delay: 0.35s; }
.nav-overlay.open .nav-overlay__links li:nth-child(7) { transition-delay: 0.40s; }
.nav-overlay.open .nav-overlay__links li:nth-child(8) { transition-delay: 0.45s; }
.nav-overlay.open .nav-overlay__links li:nth-child(9) { transition-delay: 0.50s; }
.nav-overlay.open .nav-overlay__links li:nth-child(10) { transition-delay: 0.55s; }
.nav-overlay.open .nav-overlay__links li:nth-child(11) { transition-delay: 0.60s; }

.nav-overlay.open .nav-overlay__links li { opacity: 1; transform: translateY(0); }

.nav-overlay__links a {
    font-family: 'Onest', sans-serif;
    font-size: clamp(1.6rem, 5.5vw, 2.8rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    padding: 0.3rem 0;
    display: inline-flex;
    align-items: baseline;
    gap: 1.1rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
    transition: color 0.25s ease, transform 0.3s ease;
}

.nav-overlay__links a::before {
    content: attr(data-index);
    font-size: 0.72rem;
    color: #06b6d4;
    font-weight: 600;
    letter-spacing: 0.15em;
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-0.6em);
}

.nav-overlay__links a:hover {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(8px);
}

.nav-overlay__links a:hover::before { opacity: 1; }

.nav-overlay__footer {
    margin-top: auto;
    padding-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 0.6s;
}

.nav-overlay.open .nav-overlay__footer { opacity: 1; transform: translateY(0); }

.nav-overlay__contact {
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Onest', sans-serif;
    font-size: 0.88rem;
    line-height: 1.7;
}

.nav-overlay__contact a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-overlay__contact a:hover { color: #06b6d4; }

.nav-overlay .lang-switcher {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-overlay .lang-btn { color: rgba(255, 255, 255, 0.55); }
.nav-overlay .lang-btn:hover { color: white; }

body.menu-open { overflow: hidden; }

/* ============================================================
   Case hero header
   ============================================================ */
header.case-hero {
    background:
        radial-gradient(ellipse at 75% 15%, rgba(6, 182, 212, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 5% 90%, rgba(74, 222, 128, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    color: #fff;
    padding: 8.5rem 0 5rem;
    position: relative;
    overflow: hidden;
}

header.case-hero .kicker {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header.case-hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    max-width: 900px;
}

header.case-hero h1 em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header.case-hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 800px;
}

.case-breadcrumb {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-family: 'Onest', sans-serif;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.2rem;
}

.case-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.case-breadcrumb a:hover { color: #22d3ee; }

.cta {
    display: inline-block;
    margin-top: 1.6rem;
    padding: 1rem 2rem;
    background: var(--grad);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Onest', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.5);
}

.stats {
    display: flex;
    gap: 18px;
    margin-top: 2.2rem;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid #06b6d4;
    border-radius: 14px;
    padding: 16px 24px;
    backdrop-filter: blur(6px);
}

.stat b {
    font-size: 1.9rem;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    font-family: 'Onest', sans-serif;
}

.stat span {
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* ============================================================
   Generic layout: slots, grids, cards
   ============================================================ */
.slot {
    border: 2px dashed var(--grey-l);
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.slot:has(img) { border: 0; padding: 0; }

.slot img {
    max-width: 100%;
    border-radius: 14px;
    display: block;
    cursor: zoom-in;
}

.slot .asset {
    font-family: monospace;
    font-size: 13px;
    color: var(--grey);
    margin-top: 8px;
}

.slot .what { font-size: 14px; color: var(--grey); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.card h3 { color: var(--navy); font-size: 1.3rem; margin-bottom: 8px; }
.card p { color: var(--grey); font-size: 1rem; }
.card p b { color: var(--dark); }

.card .ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.card.problem { border-top: 4px solid var(--red); }
.card.solution { border-top: 4px solid var(--green-l); }

/* Flow diagram */
.flow {
    display: grid;
    grid-template-columns: 1fr 40px 1fr 40px 1fr;
    gap: 8px;
    align-items: center;
    margin: 14px 0;
}

.fbox {
    background: var(--navy);
    color: #fff;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fbox.gold { background: var(--grad); font-weight: 700; }

.farrow { text-align: center; color: var(--cyan); font-size: 26px; font-weight: bold; }
.flowlabel { font-weight: 700; color: var(--navy); margin: 18px 0 6px; }

/* Comparison table */
table.cmp {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    font-size: 0.97rem;
}

table.cmp th {
    padding: 14px 18px;
    text-align: left;
    background: var(--navy);
    color: #fff;
    font-family: 'Onest', sans-serif;
}

table.cmp th.gold { background: var(--grad); }
table.cmp td { padding: 12px 18px; border-top: 1px solid var(--grey-l); }
table.cmp td.hl { background: #ecfeff; font-weight: 700; color: var(--navy); }

/* Steps */
.step {
    display: grid;
    grid-template-columns: 64px 1fr 360px;
    gap: 22px;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
}

.step .n {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: bold;
    font-family: 'Onest', sans-serif;
}

.step h3 { color: var(--navy); margin-bottom: 6px; font-size: 1.2rem; }
.step p { color: var(--grey); }
.step .slot { min-height: 160px; }

/* Voltage / metric cards */
.volt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.volt .card { text-align: center; }
.volt b { font-size: 2.4rem; color: var(--navy); font-family: 'Onest', sans-serif; }
.volt .card:first-child b {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Note callout */
.note {
    background: #ecfeff;
    border-left: 4px solid var(--cyan);
    padding: 12px 18px;
    border-radius: 0 10px 10px 0;
    font-size: 0.95rem;
    color: #155e6b;
    margin-top: 18px;
}

.note.warn {
    background: #fef2f2;
    border-left-color: var(--red);
    color: #7a2e2e;
}

/* Scene with pins */
.scene .slot { min-height: 380px; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18); }

.pin {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    transform: translate(-50%, -50%);
    cursor: default;
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.45);
}

.legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 18px; }

.legend div {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    border-top: 4px solid var(--cyan);
    font-size: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.legend b { color: var(--navy); display: block; font-size: 16px; margin-bottom: 4px; }

/* House cards */
.house {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
}

.house .head {
    background: var(--navy);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    font-family: 'Onest', sans-serif;
}

.house .head .num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.house .body { padding: 16px; }
.house .body .slot { min-height: 150px; margin-bottom: 12px; }
.house p { font-size: 0.92rem; color: var(--grey); }
.house .spec { font-family: monospace; font-size: 0.78rem; color: var(--gold); margin-top: 8px; display: block; }

/* Road / numbered steps grid */
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.rstep {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
    position: relative;
}

.rstep .n {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    font-family: 'Onest', sans-serif;
}

.rstep h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 6px; }
.rstep p { color: var(--grey); font-size: 0.95rem; }

/* FAQ (details/summary) */
.faq { display: flex; flex-direction: column; gap: 12px; }

.faq details {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 600;
    font-family: 'Onest', sans-serif;
    color: var(--navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

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

.faq summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--cyan);
    transition: transform 0.25s ease;
    line-height: 1;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
    padding: 0 22px 20px;
    color: var(--grey);
    margin: 0;
}

/* Live animation panel */
.anim-panel {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    border: 1px solid #eef2f7;
}

.anim-panel h3 { color: var(--navy); font-size: 1.35rem; margin-bottom: 4px; }

/* Footer (mirrors index.html) */
footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 2.5rem 0;
    font-size: 0.92rem;
}

footer a { color: #cbd5e1; text-decoration: none; transition: color 0.2s ease; }
footer a:hover { color: #06b6d4; }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover { transform: scale(1.2); }

/* Fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Cases hub grid
   ============================================================ */
.cases-hub { padding-top: 8.5rem; }

.case-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 3rem;
}

.case-link-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef2f7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-link-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.15);
}

.case-link-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.case-link-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.case-link-card:hover .case-link-card__media img { transform: scale(1.06); }

.case-link-card__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }

.case-link-card__tag {
    font-family: 'Onest', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.case-link-card__body h3 { color: var(--navy); font-size: 1.3rem; margin-bottom: 0.5rem; }
.case-link-card__body p { color: var(--grey); font-size: 0.97rem; flex: 1; }

.case-link-card__more {
    margin-top: 1rem;
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .nav-links,
    nav > .container > .nav-right > .lang-switcher { display: none; }
    .nav-toggle { display: block; }
    nav .container { padding: 0.7rem 20px; }
    .step { grid-template-columns: 56px 1fr; }
    .step .slot { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
    .grid4 { grid-template-columns: repeat(2, 1fr); }
    .legend { grid-template-columns: repeat(2, 1fr); }
    .road { grid-template-columns: repeat(2, 1fr); }
    .flow { grid-template-columns: 1fr; }
    .farrow { transform: rotate(90deg); }
}

@media (max-width: 768px) {
    section { padding: 3.5rem 0; }
    header.case-hero { padding: 7rem 0 3.5rem; }
    .grid2, .grid3 { grid-template-columns: 1fr; }
    .grid4 { grid-template-columns: 1fr; }
    .volt { grid-template-columns: 1fr; }
    .legend { grid-template-columns: 1fr; }
    .road { grid-template-columns: 1fr; }
    .anim-panel .grid2 { grid-template-columns: 1fr; }
    table.cmp { font-size: 0.85rem; }
    table.cmp th, table.cmp td { padding: 10px 12px; }
}

/* Multi-column house grid collapses progressively */
.houses5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1024px) { .houses5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .houses5 { grid-template-columns: 1fr; } }
