/* Riviera's Dance homepage. Builds on styles.css (tokens, buttons, cards, footer).
   The one loud moment is the hero: navy field, live network, scanlines, a glitching title. */

:root { --neon-cyan: #5FD3F3; --neon-magenta: #E25BD0; --neon-green: #36E39A; }

.brand-deck { width: 28px; height: 28px; image-rendering: pixelated; flex: none; }
.home-brand { letter-spacing: 0.06em; }

/* ---------- hero ---------- */
.home-hero { position: relative; overflow: hidden; background: var(--navy); color: #DCE6F3; border-bottom: 1px solid #13305A; }
.home-hero .hero-network { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scanlines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0 1px, transparent 1px 3px);
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 42% 60% at 24% 52%, rgba(10,31,60,0.88), rgba(10,31,60,0.45) 55%, rgba(10,31,60,0) 78%);
}
@media (max-width: 860px) {
  .home-hero::after { background: linear-gradient(to bottom, rgba(10,31,60,0) 0, rgba(10,31,60,0) 340px, rgba(10,31,60,0.82) 460px, rgba(10,31,60,0.6) 100%); }
}
.home-hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center; gap: clamp(1.5rem, 4vw, 3rem); padding-block: clamp(3rem, 7vw, 5rem);
}
@media (max-width: 860px) {
  .home-hero-inner { grid-template-columns: 1fr; gap: 0.5rem; padding-top: 1.5rem; }
  .hero-stage { order: -1; margin-bottom: 1.25rem; }
  .home-hero-inner { padding-bottom: 2.75rem; }
}

.eyebrow-neon { color: var(--neon-cyan); }
.eyebrow-neon .eyebrow-mark { background: var(--neon-cyan); box-shadow: 0 0 10px var(--neon-cyan); }

.home-hero h1 {
  position: relative; color: #fff; font-weight: 800; letter-spacing: -0.045em; line-height: 0.95;
  font-size: clamp(3rem, 1.4rem + 6.5vw, 6.2rem); margin-bottom: 1.6rem;
  text-shadow: 0 0 28px rgba(95,211,243,0.18);
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0;
}
.glitch::before { color: var(--neon-cyan); transform: translate(-2px, 0); mix-blend-mode: screen; }
.glitch::after { color: var(--neon-magenta); transform: translate(2px, 0); mix-blend-mode: screen; }
.glitch { animation: glitch-idle 7s steps(1, end) infinite; }
.glitch::before { animation: glitch-a 7s steps(1, end) infinite; }
.glitch::after { animation: glitch-b 7s steps(1, end) infinite; }
@keyframes glitch-idle { 0%, 100% { transform: none; } 91% { transform: translate(1px, 0); } 92% { transform: translate(-1px, 0); } 93% { transform: none; } }
@keyframes glitch-a { 0%, 90%, 94%, 100% { opacity: 0; } 91% { opacity: 0.8; clip-path: inset(10% 0 55% 0); } 92% { opacity: 0.8; clip-path: inset(60% 0 12% 0); } 93% { opacity: 0.6; clip-path: inset(35% 0 40% 0); } }
@keyframes glitch-b { 0%, 90%, 94%, 100% { opacity: 0; } 91% { opacity: 0.8; clip-path: inset(62% 0 8% 0); } 92% { opacity: 0.7; clip-path: inset(15% 0 60% 0); } 93% { opacity: 0.6; clip-path: inset(45% 0 30% 0); } }

.home-lede { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem); line-height: 1.6; color: #C9D6E8; max-width: 36rem; margin-bottom: 1.6rem; }
.terminal { font: 500 0.85rem/1.5 var(--mono); color: var(--neon-green); margin-bottom: 2.2rem; letter-spacing: 0.02em; }
.terminal .prompt { color: var(--neon-cyan); margin-right: 0.4rem; }
.caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 0.25rem; vertical-align: -0.15em; background: var(--neon-green); animation: caret 1.1s steps(1, end) infinite; }
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-neon { background: var(--neon-cyan); color: var(--navy); }
.btn-neon:hover { background: #8BE2F7; color: var(--navy); box-shadow: 0 0 22px rgba(95,211,243,0.45); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.btn-ghost:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }

/* The stage: an empty frame the dancer is projected into (assets/dance.js draws on the hero canvas,
   measured against this box). The pixel deck at its base is the projector. */
.hero-stage { position: relative; margin: 0; height: clamp(440px, 46vw, 600px); }
@media (max-width: 860px) { .hero-stage { height: clamp(330px, 92vw, 440px); } }
.stage-deck { position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%); line-height: 0; }
.deck-icon { width: clamp(56px, 6vw, 76px); height: auto; image-rendering: pixelated; filter: drop-shadow(0 0 14px rgba(95,211,243,0.35)) drop-shadow(0 0 26px rgba(226,91,208,0.18)); transition: filter 120ms ease, transform 120ms ease; }
.deck-icon.rx { filter: drop-shadow(0 0 22px rgba(95,211,243,0.85)) drop-shadow(0 0 40px rgba(226,91,208,0.4)) brightness(1.2); transform: scale(1.03); }
.stage-caption {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font: 500 0.68rem/1.45 var(--mono); letter-spacing: 0.04em; color: rgba(159,180,208,0.85);
}
.stage-caption cite { color: #DCE6F3; font-style: normal; }

/* The digital scream (toggled by dance.js while the hologram is manifesting): the title tears with it. */
.home-hero.scream .glitch { animation: none; transform: translate(2px, 0) skewX(-3deg); }
.home-hero.scream .glitch::before { animation: none; opacity: 0.9; transform: translate(-8px, 1px); clip-path: inset(18% 0 48% 0); }
.home-hero.scream .glitch::after { animation: none; opacity: 0.9; transform: translate(8px, -1px); clip-path: inset(58% 0 12% 0); }
.home-hero.scream .scanlines { opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .glitch, .glitch::before, .glitch::after, .caret { animation: none; }
}

/* ---------- projects ---------- */
.project-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .project-list { grid-template-columns: 1fr; } }
.project { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; position: relative; transition: border-color 160ms ease, box-shadow 160ms ease; }
.project:not(.project-next):hover { border-color: var(--blue); box-shadow: 0 10px 30px rgba(11,92,173,0.10); }
.project:not(.project-next)::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--blue), var(--neon-cyan), var(--neon-magenta)); }
.project-link { display: block; padding: 1.7rem 1.7rem 1.5rem; color: inherit; text-decoration: none; height: 100%; }
.project-next { padding: 1.7rem; border-style: dashed; background: var(--tint); }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 1rem; }
.project-meta .card-num { margin: 0; }
.project-status { color: var(--c-coverage); }
.project-status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 0.4rem; vertical-align: 0.05em; box-shadow: 0 0 8px currentColor; }
.project h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.7rem; }
.project p { color: var(--muted); font-size: 0.98rem; }
.project-tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tags li { font: 500 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); background: var(--blue-50); border-radius: 3px; padding: 0.4rem 0.55rem; }
.project-tool { color: var(--navy) !important; font-weight: 600; }
.project-tool span { color: var(--neon-magenta); margin-right: 0.3rem; }
.project-cta { display: inline-block; margin-top: 0.4rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.project-link:hover .project-cta, .project-cta:hover { text-decoration: underline; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid .section-head { margin-bottom: 1.4rem; }
.about-name { font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.about-grid > div > p:not(.about-name):not(.author-role) { max-width: 38rem; }
.author-role { font-weight: 600; color: var(--blue); }
.name-card { background: var(--navy); border-color: #13305A; }
.name-card .card-num { color: var(--neon-cyan); }
.name-card p:not(.card-num) { color: #C9D6E8 !important; }
.name-card cite { color: #fff; }
.text-link { color: var(--neon-cyan); font-weight: 600; }
.text-link:hover { color: #fff; }

.home-footer { display: block; }
.home-footer p { margin: 0 0 0.45rem; }

/* ---------- dispatches ---------- */
.dispatch-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.dispatch-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 160ms ease, box-shadow 160ms ease; }
.dispatch-item:hover { border-color: var(--blue); box-shadow: 0 10px 30px rgba(11,92,173,0.10); }
.dispatch-link { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: start; padding: 1.4rem 1.6rem; color: inherit; text-decoration: none; }
@media (max-width: 760px) { .dispatch-link { grid-template-columns: 1fr; gap: 0.6rem; } .dispatch-cta { display: none; } }
.dispatch-date { margin: 0.3rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; font: 500 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
@media (max-width: 760px) { .dispatch-date { flex-direction: row; gap: 1rem; } }
.dispatch-body h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.dispatch-body p { color: var(--muted); font-size: 0.98rem; margin-bottom: 0.8rem; }
.dispatch-body .project-tags { margin-bottom: 0; }
.dispatch-cta { font-weight: 700; color: var(--blue); white-space: nowrap; margin-top: 0.2rem; }
.dispatch-link:hover .dispatch-cta { text-decoration: underline; }
