/* =============================================================================
   home.css — layout for the home page only (index.html). Builds on the tokens
   and components in site.css; nothing here introduces a new colour except the
   --accent trace that site.css already defines.
   ========================================================================== */

/* ------------------------------------------------------------------ hero */
.hero2 {
    position: relative;
    text-align: left;
    padding: clamp(4.5rem, 10vw, 7.5rem) 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.hero2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.hero2 .status {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: live 2s infinite;
    flex: none;
}

@keyframes live {
    0% { box-shadow: 0 0 0 0 var(--accent-soft); }
    70% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.hero2 h1 {
    font-size: clamp(2.9rem, 6.4vw, 5.1rem);
    line-height: .95;
    letter-spacing: -.045em;
    margin: 0 0 1.6rem;
}

.hero2 h1 > span { display: block; }
.hero2 h1 .thin { font-weight: 300; color: var(--muted); }

.hero2 .pitch {
    max-width: 40ch;
    font-size: clamp(1.1rem, 1.9vw, 1.42rem);
    line-height: 1.5;
    letter-spacing: -.01em;
    color: var(--ink-2);
    margin: 0 0 2.2rem;
}

.hero2 .pitch em {
    font-style: normal;
    color: var(--ink);
    background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
}

.hero2 .actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.hero2 .facts {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: .4rem 2.4rem;
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.hero2 .facts div { display: flex; flex-direction: column; gap: .15rem; }
.hero2 .facts b { font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.hero2 .facts span,
.hero2 #dhaka-time {
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted) !important;
}

/* portrait as a specimen card */
.specimen {
    position: relative;
    border: 1px solid var(--ink);
    background: var(--paper);
}

.specimen img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    filter: grayscale(1) contrast(1.06);
}

.specimen::before,
.specimen::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--accent);
}
.specimen::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.specimen::after { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }

/* ------------------------------------------------------------- spotlight */
.section-head .shuffle {
    order: 4;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .7rem;
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line-2);
    cursor: pointer;
    transition: border-color .25s var(--t), background .25s var(--t), color .25s var(--t);
}
.section-head .shuffle:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------- featured */
.featured { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.feature:nth-child(even) .feature-visual { order: 2; }

.feature-visual {
    position: relative;
    border: 1px solid var(--ink);
    background: var(--paper);
}

.feature-visual canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
}

.feature-visual .hud {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem .75rem;
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    pointer-events: none;
}

.feature-visual .hud b { color: var(--ink); font-weight: 500; }
.feature-visual .hud .viz-label { background: var(--paper); padding: .1rem .35rem; }
.feature-visual .hud .live { display: inline-flex; align-items: center; gap: .45rem; color: var(--accent); }

.feature-visual .caption {
    padding: .65rem .8rem;
    border-top: 1px solid var(--ink);
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.feature-body .kicker {
    display: flex;
    gap: .8rem;
    align-items: baseline;
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .9rem;
}

.feature-body .kicker .n { color: var(--accent); }

.feature-body h3 {
    font-size: clamp(1.9rem, 3.8vw, 2.9rem);
    letter-spacing: -.035em;
    margin: 0 0 .7rem;
}

.feature-body .tagline {
    font-size: clamp(1.05rem, 1.6vw, 1.22rem);
    line-height: 1.45;
    color: var(--ink);
    margin: 0 0 1rem;
}

.feature-body p { margin: 0 0 1.1rem; }

.feature-body ul {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    border-top: 1px solid var(--line);
}

.feature-body li {
    position: relative;
    padding: .62rem 0 .62rem 2.2rem;
    border-bottom: 1px solid var(--line);
    font-size: .93rem;
    line-height: 1.5;
    color: var(--ink-2);
}

.feature-body li::before {
    content: counter(hl, decimal-leading-zero);
    counter-increment: hl;
    font-family: var(--mono);
    font-size: .66rem;
    letter-spacing: .1em;
    color: var(--muted);
    position: absolute;
    left: 0;
    top: .85rem;
}

.feature-body code { font-family: var(--mono); font-size: .82em; background: var(--paper-2); padding: .1em .35em; }

.feature-body ul { counter-reset: hl; }
.feature-body .chip-row { margin-bottom: 1.5rem; }
.feature-body .links { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ------------------------------------------------------------- chapters */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: start;
}

.about-intro p {
    margin: 0 0 1.1rem;
    font-size: clamp(1.02rem, 1.5vw, 1.15rem);
    line-height: 1.7;
}

.chapters { border: 1px solid var(--ink); }

.chapter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-bottom: 1px solid var(--ink);
}

.chapter-tab {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .85rem .8rem;
    text-align: left;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line);
    cursor: pointer;
    font: inherit;
    color: var(--muted);
    transition: background .25s var(--t), color .25s var(--t);
}

.chapter-tab:last-child { border-right: 0; }
.chapter-tab .n { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; }
.chapter-tab .t { font-size: .8rem; line-height: 1.25; font-weight: 500; }
.chapter-tab:hover { color: var(--ink); background: var(--paper-2); }
.chapter-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.chapter-tab[aria-selected="true"] .n { color: var(--accent); }

.chapter-panel { padding: clamp(1.25rem, 3vw, 2rem); }
.chapter-panel h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin: 0 0 1rem; }
.chapter-panel p { margin: 0 0 1rem; line-height: 1.75; }
.chapter-panel p:last-child { margin-bottom: 0; }
.chapter-panel[hidden] { display: none; }

/* -------------------------------------------------------------- now row */
.now {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.now > * { background: var(--paper); }
.now .card { border: 0; }
.now .stats { border: 0; height: 100%; grid-template-columns: repeat(2, 1fr); }

/* ----------------------------------------------------------- wall teaser */
.wall-teaser {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.75rem, 4vw, 3rem);
    background: var(--inv-bg);
    color: var(--inv-fg);
    overflow: hidden;
}

.wall-teaser h2,
.wall-teaser p { color: var(--inv-fg); }
.wall-teaser .eyebrow { color: var(--accent); display: block; margin-bottom: 1rem; }
.wall-teaser h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; margin: 0 0 1rem; }
.wall-teaser p { opacity: .78; max-width: 46ch; margin: 0 0 1.6rem; }
.wall-teaser .btn, .wall-teaser .btn:visited { border-color: var(--inv-fg); color: var(--inv-fg); }
.wall-teaser .btn:hover { background: var(--inv-fg); color: var(--inv-bg); }
.wall-teaser .btn--solid, .wall-teaser .btn--solid:visited { background: var(--accent); border-color: var(--accent); color: #fff; }
.wall-teaser .btn--solid:hover { background: var(--inv-fg); border-color: var(--inv-fg); color: var(--inv-bg); }

.wall-teaser svg { width: 100%; height: auto; display: block; }
.wall-teaser svg .mtn { fill: currentColor; opacity: .09; }
.wall-teaser svg .mtn2 { fill: currentColor; opacity: .16; }
.wall-teaser svg .wall {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    transition: stroke-dashoffset 2.4s var(--t);
}
.wall-teaser.in svg .wall,
.wall-teaser:hover svg .wall { stroke-dashoffset: 0; }
.wall-teaser svg .tower { fill: currentColor; }
.wall-teaser svg .beacon { fill: var(--accent); }
.wall-teaser svg .panda-w { fill: var(--inv-fg); }
.wall-teaser svg .panda-b { fill: var(--inv-bg); }

.teaser-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 1.6rem;
    padding: 0;
    list-style: none;
}

.teaser-list li {
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .3rem .5rem;
    border: 1px solid currentColor;
    opacity: .7;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 980px) {
    .hero2-grid,
    .feature,
    .about-grid,
    .now,
    .wall-teaser { grid-template-columns: minmax(0, 1fr); }
    .feature:nth-child(even) .feature-visual { order: 0; }
    .hero2-grid .specimen { max-width: 360px; }
    .chapter-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .hero2 .facts { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .chapter-tab .t { display: none; }
    .chapter-tab { align-items: center; }
    .hero2 h1 { letter-spacing: -.035em; }
}

@media (prefers-reduced-motion: reduce) {
    .live-dot { animation: none; }
    .wall-teaser svg .wall { transition: none; stroke-dashoffset: 0; }
}
