/* =============================================================
   CASE 1 — Page-specific styles
   iPhone dashboard, impact section, challenge/approach SVG animations
   ============================================================= */

/* Ensure hero content clears the fixed nav */
.hero {
    padding-top: 80px;
}

/* --- SVG Text Classes --- */
/* Replaces repeated font-family/font-size presentation attributes on <text> elements.
   fill, text-anchor, letter-spacing stay as attributes where they vary per element. */

/* Chapter titles (DM Serif Display 30px, accent) */
.svg-ch-title { fill: var(--accent); font-family: var(--serif); font-size: 30px; }

/* Chapter closing quotes (DM Serif Display 22px, accent) */
.svg-ch-close { fill: var(--accent); font-family: var(--serif); font-size: 22px; }

/* Sans-serif text at standard sizes */
.svg-sans-18 { font-family: var(--sans); font-size: 20px; }
.svg-sans-15 { font-family: var(--sans); font-size: 15px; }
.svg-sans-14 { font-family: var(--sans); font-size: 14px; }
.svg-sans-13 { font-family: var(--sans); font-size: 13px; }
.svg-sans-12 { font-family: var(--sans); font-size: 12px; }
.svg-sans-11 { font-family: var(--sans); font-size: 11px; }

/* Monospace text at standard sizes */
.svg-mono-16 { font-family: var(--mono); font-size: 16px; letter-spacing: 3px; }
.svg-mono-15 { font-family: var(--mono); font-size: 15px; letter-spacing: 3px; }
.svg-mono-14 { font-family: var(--mono); font-size: 14px; }
.svg-mono-13 { font-family: var(--mono); font-size: 13px; }
.svg-mono-12 { font-family: var(--mono); font-size: 12px; }
.svg-mono-11 { font-family: var(--mono); font-size: 11px; }
.svg-mono-9  { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; }

/* --- IPHONE SECTION --- */
.iphone-section {
    padding: 96px 48px;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(32px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
}

.iphone-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.iphone-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.iphone-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.iphone-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.iphone-section-title {
    font-family: var(--serif);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.iphone-section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 480px;
    text-align: justify;
}

/* --- iPhone Frame --- */
.iphone-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.iphone-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.iphone-frame {
    position: relative;
    z-index: 1;
    width: 380px;
    height: 780px;
    background: #000;
    border-radius: 52px;
    border: 3px solid #333;
    box-shadow:
        0 0 0 1px #111,
        0 0 0 4px #1a1a1a,
        0 20px 60px rgba(0,0,0,0.6),
        0 0 80px rgba(74, 237, 196, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- iPhone Status Bar --- */
.iphone-status-bar {
    height: 54px;
    background: #0D0D0F;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
}

.iphone-dynamic-island {
    width: 120px;
    height: 34px;
    background: #000;
    border-radius: 20px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.iphone-status-time {
    position: absolute;
    left: 28px;
    top: 14px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.iphone-status-icons {
    position: absolute;
    right: 28px;
    top: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iphone-status-icons svg {
    width: 16px;
    height: 12px;
    fill: #fff;
}

.iphone-battery {
    width: 24px;
    height: 11px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 1px;
}

.iphone-battery::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 5px;
    background: rgba(255,255,255,0.4);
    border-radius: 0 1px 1px 0;
}

.iphone-battery-fill {
    width: 70%;
    height: 100%;
    background: var(--accent);
    border-radius: 1.5px;
}

/* --- iPhone Content Area --- */
.iphone-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.iphone-content::-webkit-scrollbar { width: 0; }

/* --- iPhone Home Indicator --- */
.iphone-home-indicator {
    height: 28px;
    background: #1A1A1E;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.iphone-home-bar {
    width: 120px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* =============================================================
   DASHBOARD STYLES (scoped inside iPhone)
   ============================================================= */
.dash {
    --dbg: #1A1A1E;
    --dsurface: #222228;
    --dsurface-el: #2A2A31;
    --dborder: #333340;
    --dtxt: #EEEEF0;
    --dtxt2: #A0A0AC;
    --dtxt3: #66667A;
    --dteal: #2DB89A;
    --dteal-dim: rgba(45, 184, 154, 0.12);
    --dgreen: #4ADE80;
    --dred: #F87171;

    --dpark-a: #E84C3D;
    --dpark-b: #D4A23A;
    --dpark-c: #9B59B6;
    --dpark-d: #2980B9;
    --dpark-e: #1ABC9C;
    --dpark-f: #8BC34A;

    background: var(--dbg);
    font-family: var(--sans);
    color: var(--dtxt);
    font-size: 13px;
    min-height: 100%;
}

/* --- Dash Header --- */
.d-header-top-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0D0D0F;
    padding: 12px 18px;
    border-bottom: 1px solid var(--dborder);
}

.d-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.d-page-nav-wrap {
    background: var(--dbg);
    padding: 8px 18px;
    border-bottom: 1px solid var(--dborder);
}

.d-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--dtxt);
}

.d-subtitle {
    font-size: 9px;
    color: var(--dteal);
    margin-top: 1px;
}

.d-header-top .d-refresh {
    text-align: left;
    padding: 0;
    margin-top: 2px;
}

.d-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dteal-dim);
    border: 1px solid var(--dteal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.d-logo svg {
    width: 14px;
    height: 14px;
    stroke: var(--dteal);
    fill: none;
    stroke-width: 1.5;
}

.d-page-nav {
    display: flex;
    gap: 6px;
}

.d-page-btn {
    flex: 1;
    padding: 7px 12px;
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.d-page-btn.active {
    background: var(--dteal);
    color: #000;
}

.d-page-btn:not(.active) {
    background: var(--dsurface-el);
    color: var(--dtxt2);
}

/* --- Section Labels --- */
.d-section-label {
    font-size: 8px;
    font-weight: 500;
    color: var(--dtxt3);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 6px;
}

.d-page-nav-wrap .d-section-label {
    margin-bottom: 6px;
}

/* --- Metric Area --- */
.d-metric-area {
    padding: 12px 18px 8px;
}

.d-metric-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- Metric Toggle --- */
.d-metric-toggle {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.d-metric-btn {
    padding: 6px 0;
    width: 90px;
    text-align: center;
    border-radius: 16px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    border: 1px solid var(--dborder);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--dtxt2);
}

.d-metric-btn.active {
    background: var(--dteal);
    border-color: var(--dteal);
    color: #000;
}

/* --- Banner --- */
.d-banner {
    padding: 8px 18px;
    text-align: center;
}

.d-banner h2 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.d-banner-att { background: linear-gradient(135deg, #1B6B4F, #1B8B60); }
.d-banner-rev { background: linear-gradient(135deg, #6B3A1B, #8A5A2A); }
.d-banner-pc  { background: linear-gradient(135deg, #0E4A6B, #166B8A); }

/* --- Refresh --- */
.d-refresh {
    text-align: center;
    padding: 8px 18px;
    font-size: 9px;
    color: #fff;
}

.d-refresh span { color: var(--dteal); }

/* --- Filter / Date Range --- */
.d-filter {
    position: relative;
    flex-shrink: 0;
}

.d-filter-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dsurface-el);
    border: 1px solid var(--dborder);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.d-filter-icon:hover,
.d-filter.open .d-filter-icon {
    border-color: var(--dteal);
    background: var(--dteal-dim);
}

.d-filter-icon svg {
    width: 12px;
    height: 12px;
    stroke: var(--dteal);
    fill: none;
    stroke-width: 1.5;
}

.d-date-dropdown {
    display: none;
    position: absolute;
    top: 34px;
    right: 0;
    background: var(--dsurface-el);
    border: 1px solid var(--dborder);
    border-radius: 6px;
    padding: 4px;
    z-index: 10;
    flex-direction: column;
    gap: 2px;
    min-width: 56px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.d-filter.open .d-date-dropdown {
    display: flex;
}

.d-date-btn {
    padding: 6px 10px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--dtxt2);
    text-align: center;
}

.d-date-btn:hover {
    background: var(--dborder);
    color: var(--dtxt);
}

.d-date-btn.active {
    background: var(--dteal);
    color: #000;
}

/* --- Stream Selector --- */
.d-stream {
    padding: 0 18px 10px;
    display: none;
}

.d-stream-label {
    font-size: 9px;
    color: var(--dtxt3);
    text-align: center;
    margin-bottom: 4px;
}

.d-stream select {
    width: 100%;
    padding: 7px 10px;
    background: var(--dsurface);
    border: 1px solid var(--dborder);
    border-radius: 4px;
    color: var(--dtxt);
    font-family: var(--sans);
    font-size: 11px;
    appearance: none;
    outline: none;
}

/* --- Headline (number overlaid on sparkline) --- */
.d-headline {
    text-align: center;
    padding: 0 18px;
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.d-sparkline {
    position: absolute;
    inset: 0;
    opacity: 1;
}

.d-sparkline canvas {
    width: 100%;
    height: 100%;
}

.d-number {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1.5px;
    position: relative;
    z-index: 1;
    transition: all 0.35s ease;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.d-unit {
    font-size: 10px;
    color: var(--dtxt2);
    position: relative;
    z-index: 1;
    margin-top: -2px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* --- Variance Row --- */
.d-var-row {
    display: flex;
    gap: 1px;
    background: var(--dborder);
    margin: 4px 18px 0;
    border-radius: 6px;
    overflow: hidden;
}

.d-var-card {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
    background: var(--dbg);
}

.d-var-val {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    line-height: 1.3;
}

.d-var-val.pos { color: var(--dgreen); }
.d-var-val.neg { color: var(--dred); }

.d-var-lbl {
    font-size: 9px;
    color: #fff;
}

/* --- Portfolio --- */
.d-portfolio {
    margin: 18px 18px 0;
    border-top: 1px solid var(--dborder);
    padding-top: 14px;
}

.d-port-header {
    padding: 0 12px 8px;
    text-align: center;
}

.d-port-header h3 {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.d-port-tabs {
    display: flex;
    background: #1A2744;
}

.d-port-tab {
    flex: 1;
    padding: 7px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--dtxt2);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.d-port-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

.d-comp-label {
    text-align: center;
    font-size: 9px;
    color: #fff;
    padding: 6px 0 4px;
    background: var(--dbg);
}

.d-comp-toggle {
    display: flex;
    padding: 0 10px 10px;
    background: var(--dbg);
    justify-content: center;
}

.d-comp-btn {
    padding: 6px 14px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    border: 1px solid var(--dborder);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--dtxt2);
}

.d-comp-btn:first-child { border-radius: 4px 0 0 4px; }
.d-comp-btn:last-child { border-radius: 0 4px 4px 0; }
.d-comp-btn:not(:last-child) { border-right: none; }

.d-comp-btn.active {
    background: var(--dteal);
    border-color: var(--dteal);
    color: #000;
}

/* --- Park Grid --- */
.d-park-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 0;
    background: var(--dbg);
}

.d-park {
    background: var(--dsurface-el);
    border-radius: 6px;
    padding: 8px 4px 6px;
    text-align: center;
    border: 2px solid;
    transition: all 0.25s ease;
    opacity: 0;
    animation: dFadeIn 0.3s ease forwards;
}

.d-park:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.d-park.pa { border-color: var(--dpark-a); color: var(--dpark-a); box-shadow: 0 0 12px rgba(232,76,61,0.2), inset 0 0 12px rgba(232,76,61,0.06); }
.d-park.pb { border-color: var(--dpark-b); color: var(--dpark-b); box-shadow: 0 0 12px rgba(212,162,58,0.2), inset 0 0 12px rgba(212,162,58,0.06); }
.d-park.pc { border-color: var(--dpark-c); color: var(--dpark-c); box-shadow: 0 0 12px rgba(155,89,182,0.2), inset 0 0 12px rgba(155,89,182,0.06); }
.d-park.pd { border-color: var(--dpark-d); color: var(--dpark-d); box-shadow: 0 0 12px rgba(41,128,185,0.2), inset 0 0 12px rgba(41,128,185,0.06); }
.d-park.pe { border-color: var(--dpark-e); color: var(--dpark-e); box-shadow: 0 0 12px rgba(26,188,156,0.2), inset 0 0 12px rgba(26,188,156,0.06); }
.d-park.pf { border-color: var(--dpark-f); color: var(--dpark-f); box-shadow: 0 0 12px rgba(139,195,74,0.2), inset 0 0 12px rgba(139,195,74,0.06); }

.d-park:nth-child(1) { animation-delay: 0.03s; }
.d-park:nth-child(2) { animation-delay: 0.06s; }
.d-park:nth-child(3) { animation-delay: 0.09s; }
.d-park:nth-child(4) { animation-delay: 0.12s; }
.d-park:nth-child(5) { animation-delay: 0.15s; }
.d-park:nth-child(6) { animation-delay: 0.18s; }

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

.d-park-icon {
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
}

.d-park-icon svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.d-park-name {
    font-size: 7px;
    font-weight: 500;
    color: var(--dtxt3);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.d-park-val {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 1px;
    color: var(--dtxt);
}

.d-park-var {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
}

.d-park-var.pos { color: var(--dgreen); }
.d-park-var.neg { color: var(--dred); }

/* --- Bar Chart --- */
.d-bars {
    padding: 18px 16px;
    border-top: 1px solid var(--dborder);
    margin: 0 18px;
}

.d-bars-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.d-bars-hint {
    font-size: 9px;
    font-style: italic;
    color: var(--dtxt3);
    margin-bottom: 14px;
}

.d-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.d-bar-label {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--dtxt2);
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.d-bar-track {
    flex: 1;
    height: 20px;
    background: var(--dsurface-el);
    border-radius: 3px;
    position: relative;
}

.d-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
}

.d-bar-fill.neg { background: var(--dred); }
.d-bar-fill.pos { background: var(--dgreen); }

.d-bar-axis {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--dtxt3);
    opacity: 0.5;
    z-index: 2;
}

.d-bar-val {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--dtxt2);
    width: 42px;
    flex-shrink: 0;
}

/* --- Scroll Hint (above iPhone) --- */
.iphone-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    animation: hintBounce 2.4s ease-in-out infinite;
}

.iphone-scroll-hint svg {
    color: var(--accent);
    opacity: 0.7;
}

.iphone-scroll-hint span {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.7;
}

@keyframes hintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* --- Subtle interactive hint — soft shimmer on clickable controls --- */
@keyframes hintShimmer {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    40%      { box-shadow: 0 0 10px 2px rgba(74, 237, 196, 0.45); }
    70%      { box-shadow: 0 0 0 0 transparent; }
}

.iphone-section.visible .d-page-btn:not(.interacted),
.iphone-section.visible .d-metric-btn:not(.interacted),
.iphone-section.visible .d-comp-btn:not(.interacted),
.iphone-section.visible .d-filter-icon:not(.interacted) {
    animation: hintShimmer 3s ease-in-out infinite;
}

/* Stagger each group */
.iphone-section.visible .d-metric-btn:not(.interacted) { animation-delay: 0.5s; }
.iphone-section.visible .d-comp-btn:not(.interacted)   { animation-delay: 1s; }
.iphone-section.visible .d-filter-icon:not(.interacted) { animation-delay: 1.5s; }

/* --- Page End Navigation --- */
.d-page-end {
    padding: 20px 18px 28px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--dborder);
    margin: 12px 18px 0;
}

.d-page-end-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    color: var(--dtxt2);
    background: transparent;
    border: 1px solid var(--dborder);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.d-page-end-btn:hover {
    border-color: var(--dteal);
    color: var(--dtxt);
}

.d-page-end-btn svg {
    opacity: 0.5;
}

.d-page-end-btn:hover svg {
    opacity: 1;
    stroke: var(--dteal);
}

/* --- Segmentation Placeholder --- */
.d-seg-placeholder {
    padding: 60px 16px;
    text-align: center;
    display: block;
}

.d-seg-placeholder h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.d-seg-placeholder p {
    font-size: 11px;
    color: var(--dtxt3);
    line-height: 1.5;
}

.d-page { display: none; }
.d-page.active { display: block; }

/* --- Flow Animation (used in SVGs) --- */
.flow-thick {
    fill: none;
    stroke-width: 1.5;
    stroke-dasharray: 14 136;
    stroke-linecap: round;
    animation: stream 3s linear infinite;
}

/* =============================================================
   IMPACT SECTION
   ============================================================= */
.impact-section {
    padding: 96px 0;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(32px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.impact-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.impact-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 48px;
}

.impact-header {
    margin-bottom: 40px;
}

.impact-header .section-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.impact-header .section-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.impact-header h2 {
    font-family: var(--serif);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.impact-built-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface);
}

.impact-built-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.impact-intro {
    font-size: 16px;
    color: #FFFFFF;
    line-height: 1.85;
    font-weight: 300;
    text-align: justify;
    margin-top: 20px;
    max-width: 680px;
}

/* --- Impact Grid — 2×2 --- */
.impact-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 2px;
    position: relative;
}

/* Glowing cross in the + gap between the four cards */
.impact-grid-v2::before,
.impact-grid-v2::after {
    content: '';
    position: absolute;
    z-index: 2;
    pointer-events: none;
    border-radius: 2px;
}

/* Vertical line — teal/blue (left) blending to purple/amber (right) */
.impact-grid-v2::before {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(74, 237, 196, 0.6),
        rgba(175, 169, 236, 0.5) 30%,
        rgba(175, 169, 236, 0.5) 50%,
        rgba(91, 184, 245, 0.5) 70%,
        rgba(239, 159, 39, 0.6)
    );
    box-shadow: 0 0 12px 3px rgba(150, 200, 210, 0.15);
}

/* Horizontal line — teal/purple (top) blending to blue/amber (bottom) */
.impact-grid-v2::after {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    width: 100%;
    background: linear-gradient(
        to right,
        rgba(74, 237, 196, 0.6),
        rgba(91, 184, 245, 0.5) 30%,
        rgba(175, 169, 236, 0.5) 50%,
        rgba(175, 169, 236, 0.5) 70%,
        rgba(239, 159, 39, 0.6)
    );
    box-shadow: 0 0 12px 3px rgba(150, 200, 210, 0.15);
}

@keyframes auroraDrift {
    0%   { transform: translate(-30%, -30%) rotate(0deg)   scale(1);    opacity: 0.6; }
    25%  { transform: translate(15%, -15%)  rotate(60deg)  scale(1.2);  opacity: 1; }
    50%  { transform: translate(25%, 20%)   rotate(120deg) scale(0.9);  opacity: 0.7; }
    75%  { transform: translate(-15%, 25%)  rotate(180deg) scale(1.15); opacity: 1; }
    100% { transform: translate(-30%, -30%) rotate(240deg) scale(1);    opacity: 0.6; }
}

@keyframes auroraPulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

.impact-card {
    position: relative;
    padding: 22px 24px;
    background: var(--surface);
    border: none;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.impact-card:hover {
    background: var(--surface-hover);
}

/* Aurora glow — slow-drifting radial gradient per card */
.impact-card::after {
    content: '';
    position: absolute;
    inset: -60%;
    width: 220%;
    height: 220%;
    border-radius: 50%;
    pointer-events: none;
    animation: auroraDrift 8s ease-in-out infinite;
    mix-blend-mode: screen;
}

.cat-teal::after {
    background: radial-gradient(ellipse at center, rgba(74, 237, 196, 0.18) 0%, rgba(74, 237, 196, 0.07) 40%, transparent 70%);
}
.cat-blue::after {
    background: radial-gradient(ellipse at center, rgba(91, 184, 245, 0.18) 0%, rgba(91, 184, 245, 0.07) 40%, transparent 70%);
    animation-delay: -2s;
}
.cat-purple::after {
    background: radial-gradient(ellipse at center, rgba(175, 169, 236, 0.18) 0%, rgba(175, 169, 236, 0.07) 40%, transparent 70%);
    animation-delay: -4s;
}
.cat-amber::after {
    background: radial-gradient(ellipse at center, rgba(239, 159, 39, 0.18) 0%, rgba(239, 159, 39, 0.07) 40%, transparent 70%);
    animation-delay: -6s;
}

/* Left border bars removed — color lives in the gap glow instead */

.impact-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.impact-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-teal .impact-card-icon   { background: rgba(74, 237, 196, 0.08);  border: 1px solid rgba(74, 237, 196, 0.2);  box-shadow: 0 0 12px rgba(74, 237, 196, 0.1);  animation: auroraPulse 4s ease-in-out infinite; }
.cat-blue .impact-card-icon   { background: rgba(91, 184, 245, 0.08);  border: 1px solid rgba(91, 184, 245, 0.2);  box-shadow: 0 0 12px rgba(91, 184, 245, 0.1);  animation: auroraPulse 4s ease-in-out infinite 1s; }
.cat-purple .impact-card-icon { background: rgba(175, 169, 236, 0.08); border: 1px solid rgba(175, 169, 236, 0.2); box-shadow: 0 0 12px rgba(175, 169, 236, 0.1); animation: auroraPulse 4s ease-in-out infinite 2s; }
.cat-amber .impact-card-icon  { background: rgba(239, 159, 39, 0.08);  border: 1px solid rgba(239, 159, 39, 0.2);  box-shadow: 0 0 12px rgba(239, 159, 39, 0.1);  animation: auroraPulse 4s ease-in-out infinite 3s; }

.impact-card-icon svg {
    width: 14px;
    height: 14px;
}

.impact-card-category {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cat-teal .impact-card-category   { color: #4AEDC4; }
.cat-blue .impact-card-category   { color: #5BB8F5; }
.cat-purple .impact-card-category { color: #AFA9EC; }
.cat-amber .impact-card-category  { color: #EF9F27; }

.impact-card-metric {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 4px;
}

.cat-teal .impact-card-metric   { color: #4AEDC4; }
.cat-blue .impact-card-metric   { color: #5BB8F5; }
.cat-purple .impact-card-metric { color: #AFA9EC; }
.cat-amber .impact-card-metric  { color: #EF9F27; }

.impact-card-title {
    font-family: var(--serif);
    font-size: 14px;
    color: #FFFFFF;
    margin-bottom: 6px;
    line-height: 1.3;
}

.impact-card-desc {
    font-size: 12px;
    color: #FFFFFF;
    line-height: 1.65;
    font-weight: 300;
}

/* --- Impact Animate-in --- */
.impact-section.visible .impact-card:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.impact-section.visible .impact-card:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.impact-section.visible .impact-card:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.impact-section.visible .impact-card:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }

/* =============================================================
   RESPONSIVE — Case 1 specific
   ============================================================= */
@media (max-width: 768px) {
    .iphone-section { padding: 64px 24px; }
    .iphone-section-title { font-size: clamp(26px, 4vw, 36px); }
    .iphone-section-desc { font-size: 17px; max-width: 100%; }
    .impact-inner { padding: 0 24px; }
    .impact-section { padding: 64px 0; }
    .impact-card-metric { font-size: 28px; }
    .impact-card-title { font-size: 13px; }
    .impact-card-desc { font-size: 11px; }
    .impact-intro { font-size: 17px; }
    .impact-progression { flex-wrap: wrap; gap: 8px; }
    .impact-prog-line { display: none; }
    .iphone-frame {
        width: 340px;
        height: 700px;
        border-radius: 46px;
    }

    /* SVG text — modest scale-up for mobile readability.
       Body text stays at designed sizes so it doesn't overflow
       fixed-size SVG containers (rects, bubbles). */
    .svg-ch-title { font-size: 36px; }
    .svg-mono-9  { font-size: 10px; letter-spacing: 1.5px; }

    /* Listen chapter (780-wide viewBox) — compensate so titles match other chapters */
    .chapter-block-first .svg-ch-title { font-size: 41px; }
    .chapter-block-first .svg-ch-close { font-size: 25px; }
    .chapter-block-first .svg-sans-18  { font-size: 23px; }
}

@media (max-width: 480px) {
    .iphone-section { padding: 48px 16px; }
    .iphone-section-desc { font-size: 16px; }
    .impact-inner { padding: 0 16px; }
    .impact-section { padding: 48px 0; }
    .impact-card { padding: 14px 12px; }
    .impact-card-metric { font-size: 24px; }
    .impact-card-desc { font-size: 10px; }
    .iphone-frame {
        width: min(92vw, 360px);
        height: min(calc(92vw * 2.05), 738px);
        border-radius: 42px;
    }
}
