:root {
    --red: #d32f2f;
    --red-dark: #a01515;
    --red-deep: #7a0f10;
    --red-light: #ff6659;
    --red-tint: #fdeceb;
    --red-tint-2: #fbd9d6;
    --ink: #1c1917;
    --charcoal: #3d3835;
    --gray: #756f6b;
    --gray-light: #a39d99;
    --border: #ece7e3;
    --border-soft: #f3efec;
    --white: #ffffff;
    --off-white: #fdfbf9;
    --cream: #faf6f2;
    --success: #1e7d4f;
    --gold: #a9781f;
    --font-display: 'Fraunces', serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px rgba(28,25,23,.06), 0 1px 1px rgba(28,25,23,.04);
    --shadow-md: 0 8px 24px -8px rgba(28,25,23,.14);
    --shadow-lg: 0 24px 60px -20px rgba(28,25,23,.24);
    --shadow-red: 0 12px 32px -10px rgba(211,47,47,.4);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;
    --container: 1240px;
    --nav-h: 78px;
}

*,*::before,*::after {
    box-sizing:border-box
}

html {
    scroll-behavior:smooth;
    overflow-x:hidden;
    max-width:100vw
}

@media (prefers-reduced-motion: reduce) {
    html {
    scroll-behavior:auto
}

*,*::before,*::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important
}
}

body {
    max-width:100vw;
    font-family:var(--font-body);
    color:var(--ink);
    background:var(--off-white);
    -webkit-font-smoothing:antialiased;
    line-height:1.5;
    overflow-x:hidden;
}

img {
    max-width:100%
}

a {
    color:inherit;
    text-decoration:none
}

button {
    font-family:inherit;
    cursor:pointer;
    border:none;
    background:none;
    color:inherit
}

input,select,textarea {
    font-family:inherit;
    font-size:inherit;
    color:inherit
}

ul {
    list-style:none
}

:focus-visible {
    outline:2.5px solid var(--red);
    outline-offset:3px;
    border-radius:4px
}

.wrap {
    max-width:var(--container);
    margin:0 auto;
    padding:0 32px
}

@media (max-width:640px) {
    .wrap {
    padding:0 20px
}
}

.eyebrow {
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:12.5px;
    font-weight:700;
    letter-spacing:.14em;
    text-transform:uppercase;
    color:var(--red);
}

.eyebrow::before {
    content:'';
    width:18px;
    height:2px;
    background:var(--red);
    display:inline-block;
    border-radius:2px
}

.section-head {
    max-width:640px;
    margin-bottom:44px
}

.section-head h2 {
    font-family:var(--font-display);
    font-weight:500;
    font-size:clamp(28px,3.4vw,42px);
    letter-spacing:-.01em;
    margin-top:14px;
    color:var(--ink);
}

.section-head p {
    margin-top:14px;
    color:var(--gray);
    font-size:16px;
    line-height:1.65
}

.section-head.center {
    margin-left:auto;
    margin-right:auto;
    text-align:center
}

section {
    position:relative;
    padding:100px 0
}

@media (max-width:900px) {
    section {
    padding:72px 0
}
}

@media (max-width:640px) {
    section {
    padding:56px 0
}
}

.btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:14px 26px;
    border-radius:var(--radius-full);
    font-weight:600;
    font-size:14.5px;
    letter-spacing:.01em;
    transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .25s ease, color .25s ease;
    white-space:nowrap;
}

.btn-primary {
    background:var(--red);
    color:var(--white);
    box-shadow:var(--shadow-red)
}

.btn-primary:hover {
    background:var(--red-dark);
    transform:translateY(-2px);
    box-shadow:0 16px 36px -10px rgba(211,47,47,.5)
}

.btn-ghost {
    background:var(--white);
    color:var(--ink);
    border:1.5px solid var(--border)
}

.btn-ghost:hover {
    border-color:var(--red);
    color:var(--red);
    transform:translateY(-2px)
}

.btn-outline-light {
    background:transparent;
    color:var(--white);
    border:1.5px solid rgba(255,255,255,.4)
}

.btn-outline-light:hover {
    background:var(--white);
    color:var(--red-deep)
}

.btn-sm {
    padding:10px 18px;
    font-size:13px
}

/* reveal-on-scroll */
.reveal {
    opacity:0;
    transform:translateY(28px);
    transition:opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1)
}

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

.reveal-stagger > * {
    opacity:0;
    transform:translateY(24px);
    transition:opacity .7s ease, transform .7s ease
}

.reveal-stagger.in > * {
    opacity:1;
    transform:translateY(0)
}

.reveal-stagger.in > *:nth-child(1) {
    transition-delay:.05s
}

.reveal-stagger.in > *:nth-child(2) {
    transition-delay:.13s
}

.reveal-stagger.in > *:nth-child(3) {
    transition-delay:.21s
}

.reveal-stagger.in > *:nth-child(4) {
    transition-delay:.29s
}

.reveal-stagger.in > *:nth-child(5) {
    transition-delay:.37s
}

.reveal-stagger.in > *:nth-child(6) {
    transition-delay:.45s
}

.reveal-stagger.in > *:nth-child(7) {
    transition-delay:.53s
}

.reveal-stagger.in > *:nth-child(8) {
    transition-delay:.61s
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position:relative;
    padding:calc(var(--nav-h) + 64px) 0 60px;
    background:
    radial-gradient(1100px 520px at 82% -10%, var(--red-tint) 0%, transparent 60%),
    radial-gradient(700px 400px at -10% 20%, #fff 0%, transparent 55%),
    var(--off-white);
    overflow:hidden;
}

.hero::after {
    content:'';
    position:absolute;
    right:-120px;
    top:10%;
    width:520px;
    height:520px;
    border-radius:50%;
    background:radial-gradient(circle at 35% 30%, var(--red-light), var(--red) 55%, var(--red-deep) 100%);
    opacity:.08;
    filter:blur(10px);
}

.hero-grid {
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:56px;
    align-items:center
}

.hero-copy, .hero-visual  {
    min-width: 0;
}

@media (max-width:980px) {
    .hero-grid {
    grid-template-columns:1fr;
    gap:40px
}
}

.hero-badge {
    display:inline-flex;
    align-items:center;
    gap:9px;
    padding:8px 16px 8px 8px;
    background:var(--white);
    border:1px solid var(--border);
    border-radius:var(--radius-full);
    font-size:13px;
    font-weight:600;
    color:var(--charcoal);
    box-shadow:var(--shadow-sm);
}

.hero-badge .dot {
    width:9px;
    height:9px;
    border-radius:50%;
    background:var(--success);
    position:relative
}

.hero-badge .dot::after {
    content:'';
    position:absolute;
    inset:-4px;
    border-radius:50%;
    border:2px solid var(--success);
    opacity:.5;
    animation:pulse-ring 2s ease-out infinite
}

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

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

.hero h1 {
    font-family:var(--font-display);
    font-weight:500;
    font-size:clamp(38px,5.4vw,66px);
    line-height:1.04;
    letter-spacing:-.02em;
    margin-top:22px;
    color:var(--ink);
}

.hero h1 em {
    font-style:italic;
    color:var(--red);
    font-weight:500
}

.hero p.lede {
    margin-top:22px;
    font-size:18px;
    line-height:1.7;
    color:var(--gray);
    max-width:520px
}

.hero-actions {
    display:flex;
    gap:14px;
    margin-top:34px;
    flex-wrap:wrap
}

.hero-stats {
    display:flex;
    gap:34px;
    margin-top:46px;
    flex-wrap:wrap
}

.hero-stats .stat b {
    display:block;
    font-family:var(--font-display);
    font-size:30px;
    font-weight:600;
    color:var(--ink);
}

.hero-stats .stat span {
    font-size:12.5px;
    color:var(--gray);
    font-weight:600;
    letter-spacing:.03em
}

/* Hero ticker strip */
.ticker {
    margin-top:44px;
    border-top:1px solid var(--border);
    padding-top:18px;
    display:flex;
    overflow:hidden;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
    mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
}

.ticker-track {
    display:flex;
    gap:36px;
    white-space:nowrap;
    animation:ticker-scroll 26s linear infinite
}

.ticker:hover .ticker-track {
    animation-play-state:paused
}

.ticker-item {
    display:flex;
    align-items:center;
    gap:8px;
    font-size:13.5px;
    font-weight:600;
    color:var(--charcoal)
}

.ticker-item .up {
    color:var(--success)
}

.ticker-item .down {
    color:var(--red)
}

@keyframes ticker-scroll {
    from {
    transform:translateX(0)
}

to {
    transform:translateX(-50%)
}
}

/* Hero visual: locality explorer card */
.hero-visual {
    position:relative
}

.locality-card {
    background:var(--white);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-lg);
    border:1px solid var(--border-soft);
    overflow:hidden;
}

.locality-card-head {
    padding:22px 24px;
    background:linear-gradient(135deg,var(--red),var(--red-dark));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.locality-card-head h4 {
    font-family:var(--font-display);
    font-weight:500;
    font-size:19px
}

.locality-card-head p {
    font-size:12.5px;
    opacity:.85;
    margin-top:3px
}

.locality-select {
    padding:20px 24px 8px;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.chip {
    padding:8px 14px;
    border-radius:var(--radius-full);
    font-size:12.5px;
    font-weight:700;
    border:1.5px solid var(--border);
    color:var(--charcoal);
    transition:all .2s ease;
}

.chip.active,.chip:hover {
    background:var(--red);
    border-color:var(--red);
    color:#fff
}

.locality-body {
    padding:10px 24px 24px
}

.locality-price {
    display:flex;
    align-items:baseline;
    gap:10px;
    margin-top:8px
}

.locality-price b {
    font-family:var(--font-display);
    font-size:36px;
    font-weight:600
}

.locality-price .chg {
    font-size:13.5px;
    font-weight:700
}

.locality-price .chg.up {
    color:var(--success)
}

.locality-price .chg.down {
    color:var(--red)
}

.locality-sub {
    font-size:13px;
    color:var(--gray);
    margin-top:4px
}

.locality-canvas-wrap {
    margin-top:16px;
    border-radius:var(--radius-md);
    overflow:hidden;
    background:var(--cream);
    border:1px solid var(--border-soft)
}

.locality-mini-stats {
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    margin-top:16px
}

.locality-mini-stats div {
    flex:1 1 30%;
    min-width:85px;
    background:var(--cream);
    border-radius:var(--radius-sm);
    padding:11px;
    text-align:center
}

.locality-mini-stats b {
    display:block;
    font-size:15px;
    font-weight:800;
    color:var(--ink)
}

.locality-mini-stats span {
    font-size:10.5px;
    color:var(--gray);
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.03em
}

.floaty {
    position:absolute;
    background:#fff;
    border-radius:var(--radius-md);
    box-shadow:var(--shadow-md);
    padding:12px 16px;
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid var(--border-soft)
}

.floaty.f1 {
    top:-18px;
    right:-22px;
    animation:float1 5s ease-in-out infinite
}

.floaty.f2 {
    bottom:-16px;
    left:-26px;
    animation:float2 6s ease-in-out infinite
}

.floaty i {
    color:var(--red);
    font-size:16px
}

.floaty b {
    font-size:14px
}

.floaty span {
    display:block;
    font-size:10.5px;
    color:var(--gray)
}

@keyframes float1 {
    0%,100% {
    transform:translateY(0)
}

50% {
    transform:translateY(-10px)
}
}

@keyframes float2 {
    0%,100% {
    transform:translateY(0)
}

50% {
    transform:translateY(10px)
}
}

@media (max-width:980px) {
    .floaty {
    display:none
}

/* Hide to prevent horizontal scroll */
}

@media (max-width:640px) {
    /* Hero Text & Spacing */
  .hero {
    padding:calc(var(--nav-h) + 24px) 0 40px
}

.hero h1 {
    font-size:32px;
    line-height:1.2
}

.hero p.lede {
    font-size:15px;
    margin-top:16px
}

/* Hero Stats */
  .hero-stats {
    gap:16px;
    justify-content:space-between;
    margin-top:32px
}

.hero-stats .stat {
    flex:0 0 45%
}

.hero-stats .stat b {
    font-size:24px
}

/* Ticker */
  .ticker {
    margin-top:32px;
    padding-top:16px
}

/* Locality Card */
  .locality-card-head {
    padding:16px
}

.locality-card-head h4 {
    font-size:16px
}

.locality-select {
    padding:16px 16px 8px
}

.chip {
    padding:6px 12px;
    font-size:11.5px
}

.locality-body {
    padding:8px 16px 16px
}

.locality-price b {
    font-size:28px
}
}

/* ==========================================================================
   Market Dashboard
   ========================================================================== */
.dashboard {
    background:var(--white)
}

.dash-toolbar {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    flex-wrap:wrap;
    margin-bottom:36px
}

.dash-tabs {
    display:flex;
    gap:6px;
    background:var(--cream);
    padding:6px;
    border-radius:var(--radius-full);
    border:1px solid var(--border-soft)
}

.dash-tab {
    padding:10px 18px;
    border-radius:var(--radius-full);
    font-size:13.5px;
    font-weight:700;
    color:var(--gray);
    transition:all .25s ease
}

.dash-tab.active {
    background:var(--red);
    color:#fff;
    box-shadow:var(--shadow-red)
}

.metric-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px
}

@media (max-width:980px) {
    .metric-grid {
    grid-template-columns:1fr 1fr
}
}

@media (max-width:560px) {
    .metric-grid {
    grid-template-columns:1fr
}
}

.metric-card {
    background:var(--off-white);
    border:1px solid var(--border-soft);
    border-radius:var(--radius-md);
    padding:24px;
    transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.metric-card:hover {
    transform:translateY(-4px);
    box-shadow:var(--shadow-md);
    border-color:var(--red-tint-2)
}

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

.metric-icon {
    width:42px;
    height:42px;
    border-radius:11px;
    background:var(--red-tint);
    color:var(--red);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px
}

.metric-badge {
    font-size:12px;
    font-weight:800;
    padding:4px 9px;
    border-radius:var(--radius-full)
}

.metric-badge.up {
    background:#e7f6ee;
    color:var(--success)
}

.metric-badge.down {
    background:var(--red-tint);
    color:var(--red)
}

.metric-val {
    font-family:var(--font-display);
    font-size:32px;
    font-weight:600;
    margin-top:18px
}

.metric-label {
    font-size:13.5px;
    color:var(--gray);
    margin-top:4px;
    font-weight:500
}

.metric-spark {
    margin-top:14px;
    height:36px
}

.metric-spark canvas {
    display:block;
    width:100%;
    height:100%
}

.dash-panel {
    margin-top:28px;
    display:grid;
    grid-template-columns:1.4fr 1fr;
    gap:20px;
}

@media (max-width:900px) {
    .dash-panel {
    grid-template-columns:1fr
}
}

.panel-card {
    background:var(--off-white);
    border:1px solid var(--border-soft);
    border-radius:var(--radius-lg);
    padding:28px
}

.panel-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:18px
}

.panel-head h4 {
    font-family:var(--font-display);
    font-size:19px;
    font-weight:500
}

.panel-head .btn-sm {
    padding:7px 14px
}

.legend {
    display:flex;
    gap:16px;
    flex-wrap:wrap;
    font-size:12px;
    color:var(--gray);
    font-weight:600
}

.legend i {
    width:9px;
    height:9px;
    border-radius:2px;
    display:inline-block;
    margin-right:5px
}

.rank-list {
    margin-top:6px
}

.rank-row {
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid var(--border-soft)
}

.rank-row:last-child {
    border-bottom:none
}

.rank-num {
    width:26px;
    height:26px;
    border-radius:50%;
    background:var(--red-tint);
    color:var(--red);
    font-size:12px;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0
}

.rank-row .r-name {
    font-weight:700;
    font-size:14px
}

.rank-row .r-sub {
    font-size:12px;
    color:var(--gray)
}

.rank-row .r-val {
    margin-left:auto;
    text-align:right
}

.rank-row .r-val b {
    font-size:14px;
    display:block
}

.rank-row .r-val span {
    font-size:11.5px;
    font-weight:700
}

/* ==========================================================================
   Heatmap
   ========================================================================== */
.heatmap-section {
    background:var(--cream)
}

.heatmap-layout {
    display:grid;
    grid-template-columns:1.15fr .85fr;
    gap:32px;
    align-items:start
}

@media (max-width:980px) {
    .heatmap-layout {
    grid-template-columns:1fr
}
}

.heatmap-card {
    background:var(--white);
    border-radius:var(--radius-lg);
    border:1px solid var(--border-soft);
    box-shadow:var(--shadow-sm);
    padding:26px;
    overflow:hidden
}

.heatmap-svg-wrap {
    position:relative
}

.heatmap-svg-wrap svg {
    width:100%;
    height:auto
}

.heat-zone {
    cursor:pointer;
    transition:opacity .2s ease, transform .2s ease;
    transform-origin:center;
    stroke:#fff;
    stroke-width:2
}

.heat-zone:hover {
    opacity:.85
}

.heat-zone.selected {
    stroke:var(--ink);
    stroke-width:2.5
}

.heat-label {
    font-family:var(--font-body);
    font-size:10.5px;
    font-weight:800;
    fill:#fff;
    pointer-events:none;
    text-anchor:middle
}

.heat-scale {
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:18px;
    font-size:11.5px;
    font-weight:700;
    color:var(--gray)
}

.heat-scale .bar {
    flex:1;
    height:8px;
    border-radius:4px;
    background:linear-gradient(90deg,#ffd9d6,#ff8a80,var(--red),var(--red-deep))
}

.zone-detail {
    background:var(--white);
    border-radius:var(--radius-lg);
    border:1px solid var(--border-soft);
    box-shadow:var(--shadow-sm);
    padding:26px
}

.zone-detail-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-start
}

.zone-detail-head h4 {
    font-family:var(--font-display);
    font-size:23px;
    font-weight:500
}

.zone-detail-head .zone-tag {
    font-size:11.5px;
    font-weight:800;
    padding:5px 11px;
    border-radius:var(--radius-full);
    background:var(--red-tint);
    color:var(--red)
}

.zone-metrics {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    margin-top:20px
}

.zone-metrics .zm {
    border-top:1px solid var(--border-soft);
    padding-top:12px
}

.zone-metrics .zm b {
    display:block;
    font-size:20px;
    font-family:var(--font-display);
    font-weight:600
}

.zone-metrics .zm span {
    font-size:11.5px;
    color:var(--gray);
    font-weight:600
}

.zone-note {
    margin-top:18px;
    font-size:13.5px;
    color:var(--gray);
    line-height:1.65;
    padding-top:16px;
    border-top:1px solid var(--border-soft)
}

/* ==========================================================================
   Interactive Charts
   ========================================================================== */
.charts-section {
    background:var(--white)
}

.chart-card {
    background:var(--off-white);
    border:1px solid var(--border-soft);
    border-radius:var(--radius-lg);
    padding:30px
}

.chart-controls {
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:16px;
    margin-bottom:22px
}

.range-tabs {
    display:flex;
    gap:6px
}

.range-tab {
    padding:8px 15px;
    font-size:12.5px;
    font-weight:700;
    border-radius:var(--radius-full);
    color:var(--gray);
    border:1.5px solid var(--border)
}

.range-tab.active {
    background:var(--ink);
    color:#fff;
    border-color:var(--ink)
}

.chart-canvas-wrap {
    position:relative;
    height:340px
}

.chart-canvas-wrap canvas {
    width:100%!important;
    height:100%!important
}

.chart-tooltip {
    position:absolute;
    pointer-events:none;
    background:var(--ink);
    color:#fff;
    padding:8px 12px;
    border-radius:8px;
    font-size:12px;
    font-weight:600;
    transform:translate(-50%,-115%);
    opacity:0;
    transition:opacity .15s ease;
    white-space:nowrap;
    z-index:5;
}

.chart-tooltip b {
    color:var(--red-light)
}

.compare-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-top:20px
}

@media (max-width:860px) {
    .compare-grid {
    grid-template-columns:1fr
}
}

.mini-chart-card {
    background:var(--off-white);
    border:1px solid var(--border-soft);
    border-radius:var(--radius-md);
    padding:20px
}

.mini-chart-card h5 {
    font-size:13.5px;
    font-weight:700
}

.mini-chart-card .mc-val {
    font-family:var(--font-display);
    font-size:22px;
    font-weight:600;
    margin-top:6px
}

.mini-chart-card canvas {
    margin-top:10px;
    height:60px!important
}

/* ==========================================================================
   Policy & Infrastructure
   ========================================================================== */
.policy-section {
    background:var(--cream)
}

.policy-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px
}

@media (max-width:980px) {
    .policy-grid {
    grid-template-columns:1fr 1fr
}
}

@media (max-width:640px) {
    .policy-grid {
    grid-template-columns:1fr
}
}

.policy-card {
    background:var(--white);
    border-radius:var(--radius-lg);
    padding:26px;
    border:1px solid var(--border-soft);
    transition:transform .3s ease,box-shadow .3s ease
}

.policy-card:hover {
    transform:translateY(-5px);
    box-shadow:var(--shadow-md)
}

.policy-icon {
    width:48px;
    height:48px;
    border-radius:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    background:var(--red-tint);
    color:var(--red)
}

.policy-card h4 {
    font-family:var(--font-display);
    font-size:18px;
    font-weight:500;
    margin-top:16px
}

.policy-card p {
    font-size:13.5px;
    color:var(--gray);
    margin-top:8px;
    line-height:1.6
}

.policy-impact {
    margin-top:16px;
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    font-weight:800
}

.policy-impact.high {
    color:var(--red)
}

.policy-impact.med {
    color:var(--gold)
}

.policy-impact .impact-bar {
    flex:1;
    height:6px;
    background:var(--border-soft);
    border-radius:3px;
    overflow:hidden
}

.policy-impact .impact-bar i {
    display:block;
    height:100%;
    background:currentColor;
    border-radius:3px
}

.infra-strip {
    margin-top:28px;
    background:var(--ink);
    border-radius:var(--radius-lg);
    padding:34px;
    color:#fff;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:24px
}

@media (max-width:860px) {
    .infra-strip {
    grid-template-columns:1fr 1fr
}
}

@media (max-width:480px) {
    .infra-strip {
    grid-template-columns:1fr
}
}

.infra-item i {
    color:var(--red-light);
    font-size:20px
}

.infra-item b {
    display:block;
    font-family:var(--font-display);
    font-size:24px;
    margin-top:12px;
    font-weight:600
}

.infra-item span {
    font-size:12.5px;
    color:rgba(255,255,255,.6)
}

/* ==========================================================================
   Featured Articles Carousel
   ========================================================================== */
.articles-section {
    background:var(--off-white);
    border-top:1px solid var(--border-soft);
    border-bottom:1px solid var(--border-soft);
}

.articles-section-head {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:44px;
    flex-wrap:wrap;
}

.articles-section-head .section-head {
    margin-bottom:0;
    flex:1;
    min-width:280px
}

.articles-section-cta {
    flex-shrink:0
}

@media (max-width:640px) {
    .articles-section-head {
    align-items:stretch
}

.articles-section-cta .btn {
    width:100%
}
}

.articles-carousel {
    display:flex;
    gap:22px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    padding:8px 4px 20px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
}

.articles-carousel::-webkit-scrollbar {
    display:none
}

.article-card {
    scroll-snap-align:start;
    flex:0 0 calc(33.333% - 15px);
    min-width:300px;
    background:var(--white);
    border-radius:var(--radius-lg);
    border:1px solid var(--border-soft);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    cursor:default;
    transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s ease,border-color .35s ease;
}

.article-card:hover {
    transform:translateY(-6px);
    box-shadow:var(--shadow-md);
    border-color:rgba(211,47,47,.25)
}

.article-card:focus-visible {
    outline:2px solid var(--red);
    outline-offset:3px
}

.article-thumb {
    position:relative;
    height:180px;
    overflow:hidden;
    background:var(--ink)
}

.article-thumb img {
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .6s cubic-bezier(.2,.8,.2,1)
}

.article-card:hover .article-thumb img {
    transform:scale(1.06)
}

.article-thumb::after {
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(180deg,transparent 40%,rgba(20,15,14,.55) 100%);
    pointer-events:none;
}

.article-tag {
    position:absolute;
    top:14px;
    left:14px;
    z-index:2;
    font-size:10.5px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
    padding:5px 11px;
    border-radius:var(--radius-full);
    backdrop-filter:blur(6px);
}

.article-tag.infra {
    background:rgba(211,47,47,.88);
    color:#fff
}

.article-tag.locality {
    background:rgba(26,26,46,.82);
    color:#fff
}

.article-tag.investment {
    background:rgba(201,162,39,.9);
    color:#fff
}

.article-body {
    padding:22px 22px 20px;
    flex:1;
    display:flex;
    flex-direction:column
}

.article-body h4 {
    font-family:var(--font-display);
    font-size:17px;
    font-weight:500;
    line-height:1.35;
    transition:color .25s ease;
}

.article-card:hover .article-body h4 {
    color:var(--red)
}

.article-body p {
    font-size:13px;
    color:var(--gray);
    margin-top:10px;
    line-height:1.65;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.article-foot {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:auto;
    padding-top:16px;
    border-top:1px solid var(--border-soft);
}

.article-read-time {
    font-size:11.5px;
    color:var(--gray-light);
    font-weight:600;
    display:flex;
    align-items:center;
    gap:5px
}

.article-link {
    font-size:12.5px;
    font-weight:700;
    color:var(--red);
    display:flex;
    align-items:center;
    gap:5px;
    transition:gap .25s ease;
    text-decoration:none;
    cursor:pointer
}

.article-card:hover .article-link {
    gap:9px
}

.articles-controls {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:22px;
    gap:16px
}

.carousel-dots {
    display:flex;
    gap:8px;
    align-items:center
}

.carousel-dot {
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--border);
    border:none;
    padding:0;
    cursor:pointer;
    transition:all .3s ease;
}

.carousel-dot.active {
    width:24px;
    border-radius:4px;
    background:var(--red)
}

.carousel-dot:hover:not(.active) {
    background:var(--gray-light)
}

@media (max-width:980px) {
    .article-card {
    flex:0 0 calc(50% - 11px)
}
}

@media (max-width:768px) {
    .article-card {
    flex:0 0 82%;
    min-width:unset
}

.articles-controls {
    flex-direction:column-reverse;
    align-items:stretch
}

.carousel-dots {
    justify-content:center
}

.carousel-nav {
    justify-content:center
}
}

@media (max-width:480px) {
    .article-card {
    flex:0 0 88%
}
}

/* ==========================================================================
   Whitepapers
   ========================================================================== */
.papers-section {
    background:var(--white)
}

.papers-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px
}

@media (max-width:980px) {
    .papers-grid {
    grid-template-columns:1fr 1fr
}
}

@media (max-width:640px) {
    .papers-grid {
    grid-template-columns:1fr
}
}

.paper-card {
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    overflow:hidden;
    transition:transform .3s ease,box-shadow .3s ease
}

.paper-card:hover {
    transform:translateY(-5px);
    box-shadow:var(--shadow-md)
}

.paper-thumb {
    height:150px;
    position:relative;
    display:flex;
    align-items:flex-end;
    padding:18px;
    background:linear-gradient(150deg,var(--red),var(--red-deep));
}

.paper-thumb i {
    position:absolute;
    top:18px;
    right:18px;
    font-size:26px;
    color:rgba(255,255,255,.35)
}

.paper-thumb span {
    color:#fff;
    font-size:11.5px;
    font-weight:800;
    letter-spacing:.05em;
    text-transform:uppercase;
    background:rgba(255,255,255,.18);
    padding:5px 10px;
    border-radius:var(--radius-full)
}

.paper-body {
    padding:20px
}

.paper-body h4 {
    font-family:var(--font-display);
    font-size:17px;
    font-weight:500;
    line-height:1.35
}

.paper-body p {
    font-size:13px;
    color:var(--gray);
    margin-top:8px
}

.paper-foot {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid var(--border-soft)
}

.paper-foot span {
    font-size:11.5px;
    color:var(--gray-light);
    font-weight:600
}

.paper-foot button {
    font-size:12.5px;
    font-weight:700;
    color:var(--red);
    display:flex;
    align-items:center;
    gap:6px
}

/* ==========================================================================
   Download Modal
   ========================================================================== */
.modal-overlay {
    position:fixed;
    inset:0;
    background:rgba(20,15,14,.55);
    backdrop-filter:blur(4px);
    z-index:2000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    opacity:0;
    pointer-events:none;
    transition:opacity .3s ease;
}

.modal-overlay.open {
    opacity:1;
    pointer-events:auto
}

.modal-box {
    background:#fff;
    border-radius:var(--radius-lg);
    max-width:460px;
    width:100%;
    padding:36px;
    position:relative;
    box-shadow:var(--shadow-lg);
    transform:scale(.92) translateY(10px);
    transition:transform .35s cubic-bezier(.2,.8,.2,1);
}

.modal-overlay.open .modal-box {
    transform:scale(1) translateY(0)
}

.modal-close {
    position:absolute;
    top:18px;
    right:18px;
    width:34px;
    height:34px;
    border-radius:50%;
    background:var(--cream);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--gray);
    transition:all .2s ease
}

.modal-close:hover {
    background:var(--red-tint);
    color:var(--red)
}

.modal-box .eyebrow {
    margin-bottom:8px
}

.modal-box h3 {
    font-family:var(--font-display);
    font-size:24px;
    font-weight:500;
    margin-top:4px
}

.modal-box p.sub {
    font-size:13.5px;
    color:var(--gray);
    margin-top:8px
}

.form-row {
    margin-top:16px
}

.form-row label {
    font-size:12.5px;
    font-weight:700;
    color:var(--charcoal);
    display:block;
    margin-bottom:6px
}

.form-row input {
    width:100%;
    padding:13px 15px;
    border:1.5px solid var(--border);
    border-radius:var(--radius-sm);
    font-size:14px;
    transition:border-color .2s ease, box-shadow .2s ease;
    background:var(--off-white);
}

.form-row input:focus {
    border-color:var(--red);
    box-shadow:0 0 0 4px var(--red-tint);
    outline:none
}

.modal-box .btn {
    width:100%;
    margin-top:22px
}

.modal-success {
    display:none;
    text-align:center;
    padding:12px 0
}

.modal-success i {
    font-size:44px;
    color:var(--success)
}

.modal-success h3 {
    margin-top:14px
}

.modal-success p {
    margin-top:8px;
    color:var(--gray);
    font-size:13.5px
}

/* ==========================================================================
   Developer Analytics
   ========================================================================== */
.dev-section {
    background:var(--cream)
}

.dev-carousel {
    display:flex;
    gap:20px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    padding-bottom:14px;
    margin:0 -4px
}

.dev-carousel::-webkit-scrollbar {
    height:6px
}

.dev-carousel::-webkit-scrollbar-thumb {
    background:var(--border);
    border-radius:3px
}

.dev-card {
    scroll-snap-align:start;
    flex:0 0 320px;
    background:var(--white);
    border-radius:var(--radius-lg);
    border:1px solid var(--border-soft);
    padding:24px;
}

.dev-card-head {
    display:flex;
    align-items:center;
    gap:14px
}

.dev-logo {
    width:52px;
    height:52px;
    border-radius:13px;
    background:var(--ink);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:var(--font-display);
    font-weight:600;
    font-size:19px
}

.dev-card-head h4 {
    font-size:15.5px;
    font-weight:800
}

.dev-card-head span {
    font-size:12px;
    color:var(--gray)
}

.dev-rating {
    display:flex;
    align-items:center;
    gap:5px;
    margin-top:14px;
    font-size:12.5px;
    font-weight:700;
    color:var(--gold)
}

.dev-stats-row {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:16px
}

.dev-stats-row div {
    background:var(--cream);
    border-radius:var(--radius-sm);
    padding:10px;
    text-align:center
}

.dev-stats-row b {
    display:block;
    font-size:16px;
    font-family:var(--font-display);
    font-weight:600
}

.dev-stats-row span {
    font-size:10px;
    color:var(--gray);
    font-weight:700;
    text-transform:uppercase
}

.dev-bar-label {
    display:flex;
    justify-content:space-between;
    font-size:11.5px;
    font-weight:700;
    color:var(--gray);
    margin-top:16px
}

.dev-bar {
    height:7px;
    border-radius:4px;
    background:var(--border-soft);
    margin-top:6px;
    overflow:hidden
}

.dev-bar i {
    display:block;
    height:100%;
    background:linear-gradient(90deg,var(--red),var(--red-light));
    border-radius:4px;
    width:0
}

.carousel-nav {
    display:flex;
    gap:10px;
    justify-content:flex-end;
    margin-top:18px
}

.carousel-nav button {
    width:42px;
    height:42px;
    border-radius:50%;
    border:1.5px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all .2s ease
}

.carousel-nav button:hover:not(:disabled) {
    background:var(--red);
    border-color:var(--red);
    color:#fff
}

.carousel-nav button:disabled {
    opacity:.35;
    pointer-events:none;
    cursor:default
}
