/* =========================================================
   No Sleep Studio — Index page
   Direction A · design tokens from design_handoff README
   ========================================================= */

:root {
    --bg:     #0c0f1a;
    --ink:    #ebe7df;
    --accent: #d4ff3a;
    --rule:   rgba(235, 231, 223, 0.15);
    --muted:  rgba(235, 231, 223, 0.55);
}

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Space Grotesk", system-ui, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

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

.mono {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
}

/* ---------- Ticker ---------- */
.ticker {
    height: 28px;
    background: var(--accent);
    color: var(--bg);
    overflow: hidden;
    border-bottom: 1px solid var(--bg);
}
.ticker-inner {
    display: flex;
    white-space: nowrap;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 1.2px;
    font-weight: 500;
    line-height: 28px;
    animation: marquee 45s linear infinite;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Nav ---------- */
nav.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    padding: 18px 32px;
    border-bottom: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-lockup {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    color: var(--ink);
}
.logo-text {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}
.logo-text .u {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}
.logo-mark {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    margin-top: 2px;
    opacity: 0.6;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
}
.nav-links a {
    color: var(--ink);
    text-decoration: none;
    transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-divider {
    width: 1px;
    height: 12px;
    background: rgba(235, 231, 223, 0.25);
}
.nav-meta { opacity: 0.55; }

/* ---------- Hero ---------- */
.hero {
    padding: 80px 32px 60px;
    border-bottom: 1px solid var(--rule);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.hero-label {
    grid-column: 1 / -1;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.hero-label .no { color: var(--accent); }
.hero-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 96px;
    line-height: 0.92;
    letter-spacing: -3px;
}
.hero-title .accent {
    color: var(--accent);
    font-style: italic;
}
.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 12px;
    padding-left: 24px;
    border-left: 1px solid var(--rule);
}
.hero-meta-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 1.2px;
    line-height: 1.6;
}
.hero-meta-key { opacity: 0.5; }
.hero-meta-val { color: var(--ink); }

/* ---------- Section head ---------- */
.section-head {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    padding: 20px 32px;
    border-bottom: 1px solid var(--rule);
    border-top: 1px solid var(--rule);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    align-items: center;
    background: var(--bg);
}
.section-head .no { color: var(--accent); }
.section-head .title { font-weight: 500; }
.section-head .count { opacity: 0.5; justify-self: end; }

/* ---------- Curatorial intro ---------- */
.curatorial-intro {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--rule);
}
.curatorial-intro .l {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
}
.curatorial-intro p {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    line-height: 1.5;
    max-width: 720px;
    text-wrap: pretty;
    opacity: 0.9;
}

/* ---------- Exhibition grid + cards ---------- */
.ex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--rule);
}
.ex-card {
    padding: 28px 24px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: transparent;
    text-decoration: none;
    color: var(--ink);
}
/* remove the bottom edge rule when the grid's own border handles it */
.ex-grid .ex-card:nth-last-child(-n + 3) { border-bottom: none; }
.ex-grid .ex-card:nth-child(3n)          { border-right: none; }

.ex-img {
    position: relative;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--rule);
    overflow: hidden;
    transition: border-color .25s ease;
    background: rgba(235, 231, 223, 0.02);
}
.ex-img .ex-svg   { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.ex-img .ex-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.15) brightness(0.92) contrast(1.02);
    transition: filter .35s ease, transform .6s ease;
}
.ex-card:hover .ex-img    { border-color: var(--accent); }
.ex-card:hover .ex-photo  { filter: grayscale(0) brightness(1) contrast(1); transform: scale(1.02); }

.tag-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    padding: 5px 9px;
    font-weight: 700;
}
.tag-badge.upcoming {
    background: var(--accent);
    color: var(--bg);
}
.tag-badge.hover {
    background: var(--bg);
    color: var(--accent);
    border: 1px solid var(--accent);
    opacity: 0;
    transition: opacity .2s ease;
}
.ex-card:hover .tag-badge.hover { opacity: 1; }
/* if both would show, prefer UPCOMING only */
.ex-card:hover .tag-badge.upcoming ~ .tag-badge.hover { display: none; }

.img-no {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--muted);
}
.img-open {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 600;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .25s ease, transform .25s ease;
}
.ex-card:hover .img-open { opacity: 1; transform: translateX(0); }

.ex-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ex-head {
    display: flex;
    justify-content: space-between;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    opacity: 0.6;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(235, 231, 223, 0.1);
}
.ex-head .type { color: var(--accent); opacity: 1; }
.ex-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.1;
    transition: color .2s ease;
}
.ex-card:hover .ex-title { color: var(--accent); }
.ex-subtitle {
    font-family: "Instrument Serif", Georgia, serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.3;
    opacity: 0.7;
}
.ex-row {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 1px;
    opacity: 0.8;
    display: flex;
    gap: 6px;
}
.ex-row .dot { opacity: 0.5; }

/* ---------- Nav: current page marker ---------- */
.nav-links a.current {
    color: var(--accent);
}

/* ---------- About page ---------- */
.meta-strip {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    padding: 20px 32px;
    border-bottom: 1px solid var(--rule);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    align-items: center;
}
.meta-strip .no     { color: var(--accent); }
.meta-strip .status { opacity: 0.5; justify-self: end; }

.about-title-block {
    padding: 80px 32px 60px;
    border-bottom: 1px solid var(--rule);
}
.about-title-block .kicker {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2.5px;
    color: var(--accent);
    margin-bottom: 32px;
}
.about-h1 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(64px, 10vw, 160px);
    line-height: 0.9;
    letter-spacing: -4px;
    margin: 0 0 28px;
    text-wrap: balance;
}
.about-subtitle {
    font-family: "Instrument Serif", Georgia, serif;
    font-style: italic;
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 56px;
    opacity: 0.9;
    max-width: 820px;
}
.about-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
}
.about-facts .fact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.about-facts .fact-key {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    opacity: 0.5;
}
.about-facts .fact-val {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.about-body-section {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 80px 32px;
    border-bottom: 1px solid var(--rule);
}
.about-body-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    opacity: 0.55;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: start;
    position: sticky;
    top: 100px;
}
.about-body {
    max-width: 780px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.about-body p {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    line-height: 1.55;
    text-wrap: pretty;
}
.about-body p.lead {
    font-family: "Instrument Serif", Georgia, serif;
    font-style: italic;
    font-size: 32px;
    line-height: 1.25;
}
.about-body p.dedication {
    font-family: "Instrument Serif", Georgia, serif;
    font-size: 22px;
    line-height: 1.4;
    color: var(--accent);
    border-left: 1px solid var(--rule);
    padding-left: 20px;
}
.about-body p.dedication em { font-style: italic; }
.about-body strong {
    font-weight: 500;
    color: var(--accent);
}
.about-body .sig {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    opacity: 0.6;
    margin-top: 16px;
}

.about-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--rule);
}
.about-index-grid > div {
    padding: 32px 24px;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.about-index-grid > div:last-child { border-right: none; }
.idx-key {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent);
}
.idx-val {
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.about-cta {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 60px 32px;
    border-bottom: 1px solid var(--rule);
    align-items: center;
}
.cta-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
}
.cta-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--ink);
    padding: 24px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    transition: background .25s ease, color .25s ease, padding .25s ease;
}
.cta-link:hover { background: var(--accent); color: var(--bg); padding-left: 24px; padding-right: 24px; }
.cta-link:hover .cta-dir { opacity: 1; }
.cta-dir {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    opacity: 0.6;
}
.cta-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* ---------- Manifesto ---------- */
.manifesto {
    padding: 100px 32px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    border-bottom: 1px solid var(--rule);
}
.manifesto-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    opacity: 0.55;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.manifesto-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 780px;
}
.manifesto-line {
    font-family: "Space Grotesk", sans-serif;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -1px;
    font-weight: 400;
}
.manifesto-line.accent {
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-top: 12px;
}

/* ---------- Footer ---------- */
footer.site { padding: 60px 32px 32px; }
.foot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--rule);
}
.foot-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 14px;
}
.foot-body {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    line-height: 1.7;
    opacity: 0.85;
}
.foot-mark {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}
.foot-logo {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 56px;
    letter-spacing: -1.5px;
    line-height: 1;
}
.foot-logo .u {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.foot-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    opacity: 0.5;
    padding-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .hero-title { font-size: 72px; letter-spacing: -2px; }
    .ex-grid { grid-template-columns: repeat(2, 1fr); }
    .ex-grid .ex-card:nth-child(3n)           { border-right: 1px solid var(--rule); }
    .ex-grid .ex-card:nth-child(2n)           { border-right: none; }
    .ex-grid .ex-card:nth-last-child(-n + 3)  { border-bottom: 1px solid var(--rule); }
    .ex-grid .ex-card:nth-last-child(-n + 2)  { border-bottom: none; }
    .foot-grid { grid-template-columns: repeat(2, 1fr); }
    .about-facts,
    .about-index-grid { grid-template-columns: repeat(2, 1fr); }
    .about-index-grid > div:nth-child(2n) { border-right: none; }
}

@media (max-width: 720px) {
    nav.top { padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
    .nav-links { gap: 14px; }
    .hero { padding: 48px 20px 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-meta { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 24px; }
    .hero-meta-row { grid-template-columns: 90px 1fr; }
    .hero-title { font-size: 52px; letter-spacing: -1.5px; }
    .section-head { padding: 16px 20px; grid-template-columns: 40px 1fr auto; }
    .ex-grid { grid-template-columns: 1fr; }
    .ex-grid .ex-card { border-right: none; border-bottom: 1px solid var(--rule); }
    .ex-grid .ex-card:last-child { border-bottom: none; }
    .curatorial-intro { grid-template-columns: 1fr; gap: 20px; padding: 24px 20px; }
    .manifesto { padding: 60px 20px; grid-template-columns: 1fr; gap: 24px; }
    .manifesto-line { font-size: 28px; }
    footer.site { padding: 40px 20px 24px; }
    .foot-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 40px; }
    .foot-mark { flex-direction: column; align-items: flex-start; }
    .foot-logo { font-size: 36px; letter-spacing: -1px; }
    /* About page */
    .meta-strip { padding: 16px 20px; grid-template-columns: 60px 1fr auto; }
    .about-title-block { padding: 48px 20px 40px; }
    .about-h1 { font-size: 56px; letter-spacing: -2px; }
    .about-subtitle { font-size: 20px; margin-bottom: 40px; }
    .about-facts,
    .about-index-grid { grid-template-columns: 1fr; }
    .about-index-grid > div { border-right: none; border-bottom: 1px solid var(--rule); }
    .about-index-grid > div:last-child { border-bottom: none; }
    .about-body-section,
    .about-cta { grid-template-columns: 1fr; gap: 20px; padding: 48px 20px; }
    .about-body-label { position: static; }
    .about-body p.lead { font-size: 22px; }
    .about-body p { font-size: 17px; }
    .cta-link { flex-direction: column; align-items: flex-start; gap: 8px; }
    .cta-title { font-size: 24px; }
}
