/* ============================================================
   HOME PAGE — spiral + list, light grey-white canvas
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.home-page {
  background: #edede8;
  color: #1c1c1a;
  font-family: 'Inter', sans-serif;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── STAR LAYER (subtle dark specks on light bg) ────────── */

.star-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.deco-star {
  position: absolute;
  border-radius: 50%;
  background: rgba(60, 63, 60, 1);
  pointer-events: none;
  animation: starTwinkle ease-in-out infinite alternate;
}
.deco-star--glyph {
  background: none;
  border-radius: 0;
  color: rgba(60, 63, 60, 1);
  font-style: normal;
  line-height: 1;
  display: inline-block;
  font-family: serif;
}

@keyframes starTwinkle {
  from { opacity: var(--star-op, 0.12); transform: scale(1); }
  to   { opacity: calc(var(--star-op, 0.12) * 0.08); transform: scale(0.5); }
}

/* ─── TOGGLE PILL ─────────────────────────────────────────── */

.h-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.h-toggle-btn {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.32);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.25s;
  text-transform: lowercase;
}
.h-toggle-btn.active { color: rgba(0, 0, 0, 0.82); }

.h-toggle-sep {
  color: rgba(0, 0, 0, 0.18);
  font-size: 10px;
  pointer-events: none;
  user-select: none;
}

/* ─── STAGES ──────────────────────────────────────────────── */

.h-stage {
  position: fixed;
  inset: 0;
  z-index: 3;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.h-stage--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
}

/* ─── SPIRAL STAGE — 70vw centered ───────────────────────── */

#spiral-stage {
  left: 50%;
  right: auto;
  width: 70vw;
  transform: translateX(-50%);
  overflow: hidden;
  cursor: grab;
  perspective: 760px;
  perspective-origin: 50% 50%;
}
#spiral-stage.is-dragging { cursor: grabbing; }

/* ─── SPIRAL CARDS ────────────────────────────────────────── */

.spiral-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 290px;
  height: 186px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1c;
  will-change: transform, opacity;
  outline: 1.5px solid transparent;
  transition: outline-color 0.25s;
  box-shadow: 0 10px 40px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12);
}
.spiral-card:hover { outline-color: rgba(100,102,98,0.4); }

.spiral-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.72;
  transition: opacity 0.38s;
}
.spiral-card:hover img { opacity: 1; }

.spiral-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.28s;
}
.spiral-card:hover .spiral-card-overlay { opacity: 1; }

.spiral-card-num {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  color: rgba(255,255,255,0.24);
  letter-spacing: 0.06em;
  font-weight: 300;
}

/* ─── SCROLL HINT ─────────────────────────────────────────── */

.h-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(0, 0, 0, 0.18);
  text-transform: uppercase;
  pointer-events: none;
  animation: hintFade 3.5s ease 1.5s both;
  white-space: nowrap;
  z-index: 5;
}
@keyframes hintFade {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  40%  { opacity: 1; }
  to   { opacity: 0; transform: translateX(-50%) translateY(0); }
}

/* ─── SPIRAL BOTTOM HUD ───────────────────────────────────── */

.spiral-hud {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  padding: 32px 40px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 100;
  background: linear-gradient(to top, rgba(237,237,232,0.85) 0%, transparent 100%);
}
.spiral-hud.is-visible { opacity: 1; }

.spiral-hud-category {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(0, 0, 0, 0.36);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.spiral-hud-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.82);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.spiral-hud-meta {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.3);
  letter-spacing: 0.05em;
}

/* ─── LIST STAGE ──────────────────────────────────────────── */

#list-stage {
  overflow-y: auto;
  padding-top: 90px;
}

.h-list {
  list-style: none;
  max-width: 680px;
  margin: 48px auto 120px;
  padding: 0 40px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.h-list-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  transition: padding-left 0.25s;
}
.h-list-item:hover { padding-left: 8px; }

.h-list-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 27px;
  font-weight: 300;
  color: rgba(0,0,0,0.36);
  transition: color 0.22s;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.h-list-item:hover .h-list-title { color: rgba(0,0,0,0.86); }

.h-list-year {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: rgba(0,0,0,0.18);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.22s, color 0.22s;
}
.h-list-item:hover .h-list-year {
  transform: translateX(-8px);
  color: rgba(0,0,0,0.38);
}

/* ─── CURSOR-FOLLOWING IMAGE (list view) ─────────────────── */

.cursor-img {
  position: fixed;
  top: 0; left: 0;
  width: 210px; height: 270px;
  pointer-events: none;
  z-index: 50;
  background-color: #1a1a1c;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}
.cursor-img.is-active { opacity: 0.88; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 900px) {
  #spiral-stage { width: 88vw; }
  .spiral-hud { width: 88vw; }
}

@media (max-width: 640px) {
  .h-toggle { padding: 6px 12px; gap: 4px; }
  .h-toggle-btn { font-size: 10px; padding: 2px 4px; }
  #spiral-stage { width: 100vw; transform: none; left: 0; }
  .spiral-hud { width: 100vw; padding: 20px; }
  .spiral-hud-title { font-size: 22px; }
  .h-list { padding: 0 20px; margin: 36px auto 100px; }
  .h-list-title { font-size: 21px; }
  .h-list-item { padding: 17px 0; }
}
