/* ============================================================
   home.css — homepage-only styles (loaded in addition to cyber.css)
   ============================================================ */

/* --- Barlow Condensed for hero headline --- */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Hero: replace Inter with Barlow Condensed for the display headline */
.home-hero h1 {
  font-family: 'Barlow Condensed', 'Microsoft YaHei', sans-serif;
  font-weight: 700;
  font-size: clamp(4.6rem, 12vw, 11.5rem);
  line-height: .96;
  padding-bottom: .06em;
  letter-spacing: -.01em;
  /* Keep gradient from cyber.css — inherits background-clip */
}

/* hero-now: a small live-status strip beneath the CTAs */
.hero-now {
  display: inline-flex;
  align-items: center;
  gap: .52rem;
  margin-top: 1.55rem;
  padding: .46rem .82rem .46rem .58rem;
  border: 1px solid rgba(111, 255, 208, .28);
  border-radius: 999px;
  color: #a8f5e0;
  font-size: .8rem;
  text-decoration: none;
  background: rgba(111, 255, 208, .055);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.hero-now:hover {
  border-color: rgba(111, 255, 208, .6);
  background: rgba(111, 255, 208, .1);
  color: #d4fff4;
}
.hero-now-dot {
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
  background: #6fffd0;
  box-shadow: 0 0 0 3px rgba(111, 255, 208, .18), 0 0 10px rgba(111, 255, 208, .72);
  animation: now-breathe 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes now-breathe {
  0%, 100% { opacity: .6; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
.hero-now-label {
  white-space: nowrap;
  flex-shrink: 0;
  padding: .12rem .36rem;
  border-radius: 4px;
  color: #6fffd0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(111, 255, 208, .1);
}
.hero-now-title {
  color: inherit;
}

/* ============================================================
   Shared: home section header (replaces .section-head + .eyebrow on homepage)
   ============================================================ */
.home-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .7rem 1rem;
  margin: 0 0 1.5rem;
}
.home-section-head h2 {
  margin: 0;
  font-family: 'Barlow Condensed', 'Microsoft YaHei', sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: #f0faff;
  /* No gradient — hero already does the gradient headline */
}
.home-section-head p {
  grid-column: 1 / -1;
  max-width: 40em;
  margin: 0;
  color: #8fa9c3;
  line-height: 1.8;
}
.home-section-more {
  flex-shrink: 0;
  color: #6bddef;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.home-section-more:hover { color: #c0f5ff; }

/* ============================================================
   Feature board (Lobster Dashboard)
   ============================================================ */
.home-feature { margin-top: clamp(4.5rem, 9vw, 8rem); }

.feature-board {
  display: grid;
  grid-template-columns: minmax(0, .56fr) minmax(0, .44fr);
  gap: .75rem;
  border: 1px solid rgba(130, 222, 247, .22);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(6, 16, 34, .88), rgba(5, 9, 24, .72));
  box-shadow:
    0 32px 80px rgba(0, 0, 0, .38),
    0 0 48px rgba(65, 209, 236, .07),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}

.feature-photo {
  position: relative;
  min-height: 380px;
  margin: 0;
  overflow: hidden;
}
.feature-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  filter: saturate(.88) contrast(1.06);
  transition: transform .55s ease, filter .55s ease;
}
.feature-board:hover .feature-photo img {
  transform: scale(1.025);
  filter: saturate(.96) contrast(1.04);
}

.feature-detail {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.65rem 1.7rem 1.65rem 1.1rem;
}

.feature-screen {
  margin: 0;
  border: 1px solid rgba(130, 222, 247, .24);
  border-radius: 14px;
  overflow: hidden;
  background: #020b1e;
}
.feature-screen img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.feature-detail h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.03em;
  color: #f0faff;
}

/* Spec table */
.feature-spec {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.feature-spec caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.feature-spec tbody tr {
  border-bottom: 1px solid rgba(130, 222, 247, .1);
}
.feature-spec tbody tr:last-child {
  border-bottom: none;
}
.feature-spec th {
  padding: .38rem 0 .38rem .1rem;
  text-align: left;
  font-weight: 700;
  color: #5ec9e8;
  white-space: nowrap;
  width: 3.8rem;
  letter-spacing: .02em;
}
.feature-spec td {
  padding: .38rem .2rem .38rem .5rem;
  color: #9dbccc;
  line-height: 1.5;
}

.feature-links {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.feature-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .62rem 1.1rem;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-links a:hover { transform: translateY(-2px); }
.feature-links a.primary {
  color: #06111d;
  background: linear-gradient(90deg, #35f7ff, #a976ff);
  box-shadow: 0 0 20px rgba(53, 247, 255, .28);
}
.feature-links a.secondary {
  color: #dffcff;
  border: 1px solid rgba(53, 247, 255, .3);
  background: rgba(53, 247, 255, .07);
}
.feature-links a.secondary:hover {
  border-color: rgba(53, 247, 255, .6);
  background: rgba(53, 247, 255, .13);
}

/* ============================================================
   Section list  (replaces portal-grid on homepage)
   ============================================================ */
.home-sections {
  margin-top: clamp(4.5rem, 9vw, 8rem);
}

.section-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.section-list li {
  border: 1px solid rgba(120, 218, 242, .18);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(9, 26, 44, .68), rgba(5, 13, 30, .54));
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.section-list li:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 218, 242, .44);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .3), 0 0 28px rgba(65, 209, 236, .09);
}
.section-list a {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.5rem 1.5rem 1.3rem;
  color: inherit;
  text-decoration: none;
  height: 100%;
  border-radius: inherit;
}
.section-list strong {
  display: block;
  color: #f0faff;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  font-weight: 700;
  letter-spacing: -.02em;
}
.section-list span {
  color: #7898b4;
  font-size: .86rem;
  line-height: 1.6;
  flex: 1;
}
.section-list small {
  display: block;
  margin-top: .7rem;
  color: #4b8faa;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
}

/* ============================================================
   Build-status: ol wrapper inside the track
   ============================================================ */
.status-steps {
  display: contents; /* let children participate in the grid directly */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Line runs through the centre of the dots (track padding-top + half dot) */
.build-status-track .status-line { top: calc(1.55rem + .36rem); }
@media (max-width: 720px) {
  .build-status-track .status-line { top: calc(1.45rem + .36rem); }
}

/* ============================================================
   Latest posts: list style, not card grid
   ============================================================ */
.latest-posts { margin-top: clamp(4.5rem, 9vw, 8rem); }

.post-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(128, 218, 241, .14);
}
.post-rows li {
  border-bottom: 1px solid rgba(128, 218, 241, .1);
}
.post-rows a {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  align-items: baseline;
  gap: .8rem;
  padding: .88rem 0;
  color: inherit;
  text-decoration: none;
  transition: color .18s ease;
}
.post-rows a:hover { color: #c8f7ff; }
.post-rows a:hover strong { color: #fff; }
.post-rows a:hover time { color: #7cdcef; }
.post-rows time {
  color: #4e7a93;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
  white-space: nowrap;
}
.post-rows strong {
  color: #d5eeff;
  font-size: clamp(.9rem, 1.2vw, 1.06rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
  transition: color .18s ease;
}
.post-rows span {
  color: #4a7590;
  font-size: .75rem;
  white-space: nowrap;
  text-align: right;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .feature-board {
    grid-template-columns: 1fr;
  }
  .feature-photo { min-height: 0; aspect-ratio: 16 / 11; }
  .feature-photo img { object-position: center 25%; }
  .feature-detail {
    padding: 1.4rem;
  }
}

@media (max-width: 720px) {
  .home-feature,
  .home-sections,
  .build-status,
  .latest-posts {
    margin-top: 4rem;
  }
  .section-list {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .section-list a {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1rem 1.1rem;
    gap: .25rem .6rem;
  }
  .section-list strong { width: 100%; }
  .section-list span { font-size: .82rem; }
  .section-list small { margin-top: 0; }
  .post-rows a {
    grid-template-columns: 5.5rem 1fr;
    gap: .5rem;
  }
  .post-rows span { display: none; }
  .hero-now { margin-top: 1.2rem; align-items: flex-start; border-radius: 14px; }
  .hero-now-dot { margin-top: .4rem; }
  .feature-detail { padding: 1.2rem 1.1rem 1.4rem; gap: .8rem; }
  .feature-detail h3 { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-now-dot { animation: none; }
  .feature-board:hover .feature-photo img { transform: none; }
}

/* ============================================================
   Nav: brand + links only (status block and overline removed)
   ============================================================ */
.nav-inner { grid-template-columns: auto 1fr; }
.nav-links { justify-self: end; }
.nav-links a[aria-current='page'] { color: #f4fdff; background: rgba(129, 235, 255, .08); }
.nav-links a[aria-current='page']::after { opacity: .9; transform: scaleX(1); }

@media (max-width: 1024px) {
  .nav-inner { grid-template-columns: auto 1fr; }
}
@media (max-width: 720px) {
  .nav-links { order: 3; width: 100%; padding-top: .3rem; border-top: 1px solid rgba(142, 213, 236, .12); }
  .site-main { padding-top: 7rem; }
}

/* ============================================================
   Big Bang hero
   ============================================================ */
.is-home .cyber-canvas,
.is-home .cyber-cursor-glow { display: none; }

.bb-hero {
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(560px, 82vh, 820px);
  background:
    radial-gradient(ellipse 60% 55% at 70% 48%, rgba(120, 70, 200, .16), transparent 70%),
    radial-gradient(ellipse 40% 40% at 82% 30%, rgba(255, 120, 90, .07), transparent 70%),
    radial-gradient(ellipse 50% 45% at 58% 78%, rgba(40, 160, 220, .09), transparent 70%),
    #02040c;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.bb-hero::after { display: none; }
.bb-hero::before {
  z-index: 1;
  background: linear-gradient(90deg, rgba(2, 4, 12, .72) 0%, rgba(2, 4, 12, .38) 32%, rgba(2, 4, 12, 0) 55%);
}
.bb-hero.is-charging { cursor: none; }

.bb-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bb-hero .hero-copy {
  position: relative;
  z-index: 3;
  max-width: 640px;
  cursor: auto;
}
.bb-hero .hero-copy p { user-select: text; -webkit-user-select: text; }

/* --- reveal timed to the bang --- */
.bb-pending .bb-hero .hero-copy > * {
  opacity: 0;
  transform: translateY(10px) scale(.985);
  filter: blur(6px);
}
.bb-pending .bb-hero.is-banged .hero-copy > *,
.bb-fallback .bb-hero .hero-copy > * {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1), filter .9s ease;
}
.bb-pending .bb-hero.is-banged .hero-copy > :nth-child(2) { transition-delay: .25s; }
.bb-pending .bb-hero.is-banged .hero-copy > :nth-child(3) { transition-delay: .4s; }
.bb-pending .bb-hero.is-banged .hero-copy > :nth-child(4) { transition-delay: .6s; }
.bb-pending .bb-hero.is-banged .hero-copy > :nth-child(5) { transition-delay: .8s; }
.bb-pending .bb-hero.is-banged .hero-copy h1 {
  animation: bb-flare 1.6s ease-out both;
}
@keyframes bb-flare {
  0% { filter: brightness(2.6) blur(8px); letter-spacing: .08em; }
  45% { filter: brightness(1.4) blur(0); }
  100% { filter: drop-shadow(0 16px 30px rgba(50, 161, 206, .14)); letter-spacing: -.01em; }
}

/* --- galaxies: real links sitting on top of the canvas galaxies --- */
.bb-galaxies {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.bb-galaxy {
  position: absolute;
  top: var(--y);
  left: var(--x);
  --size: 120px;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  color: #eef8ff;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  outline: none;
}
.bb-galaxy-name,
.bb-galaxy-desc {
  position: absolute;
  left: 50%;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.bb-galaxy-name {
  top: calc(100% - 14px);
  padding: .26rem .62rem;
  border: 1px solid rgba(220, 235, 255, .2);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(4, 8, 22, .58);
  backdrop-filter: blur(6px);
  transition: border-color .25s ease, background .25s ease;
}
.bb-galaxy-desc {
  top: calc(100% + 18px);
  color: #9fb7cf;
  font-size: .74rem;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity .25s ease, transform .25s ease;
}
.bb-galaxy:hover .bb-galaxy-name,
.bb-galaxy:focus-visible .bb-galaxy-name {
  border-color: rgba(255, 220, 170, .7);
  background: rgba(30, 16, 30, .7);
}
.bb-galaxy:hover .bb-galaxy-desc,
.bb-galaxy:focus-visible .bb-galaxy-desc {
  opacity: 1;
  transform: translate(-50%, 0);
}
.bb-galaxy:focus-visible::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(255, 230, 190, .8);
  border-radius: 50%;
}
.bb-pending .bb-galaxy {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.bb-pending .bb-hero.is-formed .bb-galaxy,
.bb-fallback .bb-galaxy { opacity: 1; pointer-events: auto; }
.bb-pending .bb-hero.is-formed .bb-galaxy:nth-child(2) { transition-delay: .15s; }
.bb-pending .bb-hero.is-formed .bb-galaxy:nth-child(3) { transition-delay: .3s; }
.bb-pending .bb-hero.is-formed .bb-galaxy:nth-child(4) { transition-delay: .45s; }

/* --- hint --- */
.bb-hint {
  position: absolute;
  right: clamp(1.2rem, 3vw, 2.4rem);
  bottom: clamp(1rem, 2.4vw, 1.8rem);
  z-index: 3;
  margin: 0;
  color: #b9c9de;
  font-size: .78rem;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease;
}
.bb-hero.is-armed .bb-hint { opacity: .7; }
.bb-hero.is-armed.has-played .bb-hint { opacity: .3; }
.bb-hint-touch { display: none; }
@media (hover: none) {
  .bb-hint-fine { display: none; }
  .bb-hint-touch { display: inline; }
}

@media (max-width: 1100px) {
  .bb-galaxies { display: none; }
}
@media (max-width: 720px) {
  .bb-hero::before { background: linear-gradient(180deg, rgba(2, 4, 12, .55) 0%, rgba(2, 4, 12, .2) 60%, rgba(2, 4, 12, 0) 100%); }
  .bb-hero { min-height: 640px; padding-bottom: 3.4rem; }
  .bb-hero .hero-copy { padding-top: 1rem; }
  .bb-hint { left: 1.25rem; right: auto; bottom: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-hint { display: none; }
}
