/* tnhec.com -- McBling melancholy, never-resolving chronicle */

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

:root {
  --bg: #1c1024;
  --surface: #2a1a35;
  --pink: #e84393;
  --gold: #d4a745;
  --violet: #6c5ce7;
  --text: #ede4f5;
  --text-mute: #8a7a9e;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Lora", Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body { min-height: 100vh; position: relative; }

.meta-mono {
  font-family: "Overpass Mono", "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-mute);
}

.meta-domain { color: var(--gold); }

.site-meta {
  position: fixed;
  top: 24px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  z-index: 80;
  pointer-events: none;
}

/* Rhinestones */
.rhinestones {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.gem {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--pink) 30%, transparent 70%);
  box-shadow: 0 0 8px rgba(232, 67, 147, 0.7);
  animation: gemTwinkle 3s ease-in-out infinite;
}
.gem.g1 { top: 12%; left: 8%; animation-delay: 0s; }
.gem.g2 { top: 38%; left: 92%; animation-delay: 0.6s; }
.gem.g3 { top: 22%; left: 70%; animation-delay: 1.2s; background: radial-gradient(circle, #fff, var(--gold) 30%, transparent 70%); }
.gem.g4 { top: 62%; left: 14%; animation-delay: 1.8s; background: radial-gradient(circle, #fff, var(--violet) 30%, transparent 70%); }
.gem.g5 { top: 78%; left: 86%; animation-delay: 2.4s; }
.gem.g6 { top: 88%; left: 42%; animation-delay: 1s; background: radial-gradient(circle, #fff, var(--gold) 30%, transparent 70%); }

@keyframes gemTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* Fish layer */
.fish-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 4;
  color: var(--pink);
  opacity: 0.5;
}

.fish { width: 40px; height: 18px; }
.fish use { color: var(--pink); }
.fish-a { animation: swimRight 42s linear infinite; transform: translate(-100px, 18vh); }
.fish-b { animation: swimRight 56s linear infinite -8s; transform: translate(-100px, 38vh); color: var(--gold); }
.fish-c { animation: swimRight 36s linear infinite -20s; transform: translate(-100px, 62vh); color: var(--violet); }
.fish-d { animation: swimRight 48s linear infinite -30s; transform: translate(-100px, 80vh); }
.fish-e { animation: swimRight 60s linear infinite -45s; transform: translate(-100px, 90vh); color: var(--gold); }

@keyframes swimRight {
  0%   { transform: translate(-10vw, var(--y, 30vh)); }
  100% { transform: translate(110vw, var(--y, 30vh)); }
}

.fish-a { --y: 18vh; }
.fish-b { --y: 38vh; }
.fish-c { --y: 62vh; }
.fish-d { --y: 80vh; }
.fish-e { --y: 90vh; }

/* Snap container */
.snap-container {
  scroll-snap-type: y proximity;
}

/* Hero */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 120px clamp(32px, 6vw, 100px) 80px;
  scroll-snap-align: start;
  overflow: hidden;
}

.holo-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e84393, #d4a745, #6c5ce7, #e84393);
  background-size: 400% 400%;
  animation: holoShift 8s ease infinite;
  opacity: 0.18;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}

@keyframes holoShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.kicker {
  display: inline-block;
  font-family: "Overpass Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  padding: 8px 0;
}

.hero-title {
  font-family: "Abril Fatface", "Playfair Display", serif;
  font-weight: 400;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.hero-title .line {
  display: block;
  background: linear-gradient(135deg, #e84393, #d4a745, #6c5ce7, #e84393);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holoShift 8s ease infinite;
  opacity: 0;
  transform: translateX(-20px);
  animation-fill-mode: forwards;
}

.hero-title .line { animation-name: holoShift, lineReveal; animation-duration: 8s, 700ms; animation-timing-function: ease, ease-out; animation-iteration-count: infinite, 1; animation-fill-mode: none, forwards; }

.hero-title .offset-1 { padding-left: 0.6em; animation-delay: 0s, 200ms; }
.hero-title .offset-2 { padding-left: 1.2em; animation-delay: 0s, 350ms; }
.hero-title .offset-3 { padding-left: 1.8em; animation-delay: 0s, 500ms; }
.hero-title .offset-4 { padding-left: 0.4em; animation-delay: 0s, 650ms; }

@keyframes lineReveal {
  to { opacity: 1; transform: translateX(0); }
}

.open-book {
  position: absolute;
  right: clamp(20px, 5vw, 80px);
  bottom: 40px;
  width: clamp(140px, 16vw, 220px);
  height: auto;
  color: var(--pink);
  opacity: 0.75;
  animation: bookFlutter 5s ease-in-out infinite;
}

.open-book .page {
  transform-origin: 110px 75px;
  animation: pageTurn 6s ease-in-out infinite;
}

@keyframes bookFlutter {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

@keyframes pageTurn {
  0%, 30% { transform: rotateY(0deg); }
  50% { transform: rotateY(-50deg); }
  70%, 100% { transform: rotateY(0deg); }
}

/* Sections */
section { scroll-snap-align: start; }

.chapters,
.shelf-section {
  position: relative;
  z-index: 2;
  padding: 100px clamp(32px, 6vw, 100px);
  max-width: 1180px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 56px;
  border-left: 2px solid var(--gold);
  padding-left: 20px;
}

.section-title {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(34px, 4.5vw, 60px);
  margin-top: 12px;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(212, 167, 69, 0.25);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
}

.card-feature {
  grid-row: span 3;
  padding: 56px 48px;
}

.card-feature .card-title {
  font-size: clamp(28px, 3vw, 44px);
}

.card-illus {
  width: 64px;
  height: 64px;
  color: var(--pink);
  margin-bottom: 24px;
}

.card-feature .card-illus { width: 88px; height: 88px; }

.card-illus svg { width: 100%; height: 100%; }

.card-tag {
  display: block;
  margin-bottom: 16px;
  color: var(--gold);
}

.card-title {
  font-family: "Abril Fatface", serif;
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}

.card-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.card-body em { color: var(--pink); font-style: italic; font-weight: 700; }

.card-link {
  display: inline-block;
  margin-top: 20px;
  font-family: "Overpass Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--pink);
  border-bottom: 1px solid var(--pink);
  padding-bottom: 2px;
}

/* Skeleton shimmer */
.card.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    rgba(232, 67, 147, 0.08) 0%,
    rgba(212, 167, 69, 0.18) 35%,
    rgba(108, 92, 231, 0.18) 55%,
    rgba(232, 67, 147, 0.08) 100%);
  background-size: 200% 100%;
  animation: shimmerSweep 1.5s linear forwards;
  pointer-events: none;
  z-index: 4;
}

.card.skeleton > * {
  opacity: 0;
  animation: contentReveal 400ms ease 1.5s forwards;
}

@keyframes shimmerSweep {
  0%   { background-position: 200% 0; opacity: 1; }
  90%  { opacity: 1; }
  100% { background-position: -100% 0; opacity: 0; }
}

@keyframes contentReveal {
  to { opacity: 1; }
}

.card.revealed::after { display: none; }
.card.revealed > * { opacity: 1; animation: none; }

/* Shelf */
.shelf {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 32px 0 24px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.shelf::-webkit-scrollbar { height: 6px; }
.shelf::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 3px; }
.shelf::-webkit-scrollbar-track { background: rgba(232, 67, 147, 0.15); }

.spine {
  flex: 0 0 auto;
  width: 38px;
  height: 240px;
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border: 1px solid rgba(212, 167, 69, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 300ms ease, border-color 300ms ease;
}

.spine:hover { transform: translateY(-6px); border-color: var(--pink); }

.spine-text {
  font-family: "Lora", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 12px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.1em;
  color: var(--text);
  white-space: nowrap;
}

.spine-1 { background: linear-gradient(180deg, #e84393, #2a1a35); }
.spine-2 { background: linear-gradient(180deg, #6c5ce7, #2a1a35); }
.spine-3 { background: linear-gradient(180deg, #d4a745, #2a1a35); }
.spine-4 { background: linear-gradient(180deg, #2a1a35, #1c1024); }
.spine-5 { background: linear-gradient(180deg, #e84393, #6c5ce7); }
.spine-6 { background: linear-gradient(180deg, #d4a745, #e84393); }
.spine-7 { background: linear-gradient(180deg, #2a1a35, #6c5ce7); }
.spine-8 { background: linear-gradient(180deg, #6c5ce7, #d4a745); }
.spine-9 { background: linear-gradient(180deg, #e84393, #d4a745); }
.spine-10 { background: linear-gradient(180deg, #d4a745, #6c5ce7); }

/* Footer */
.site-footer {
  padding: 80px clamp(32px, 6vw, 100px) 60px;
  text-align: center;
  border-top: 1px solid rgba(212, 167, 69, 0.2);
  position: relative;
  z-index: 2;
}

.footer-line {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: clamp(20px, 3vw, 30px);
  color: var(--text);
  margin-bottom: 18px;
}

.dots { display: inline-block; }
.dots::after {
  content: ".";
  animation: dotBlink 2s steps(4, end) infinite;
}

@keyframes dotBlink {
  0%   { content: "."; opacity: 1; }
  25%  { content: ".."; opacity: 1; }
  50%  { content: "..."; opacity: 1; }
  75%  { content: "..."; opacity: 0.2; }
  100% { content: "."; opacity: 1; }
}

.footer-meta {
  color: var(--gold);
}

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
  .card-feature { grid-row: auto; padding: 36px 28px; }
  .open-book { width: 110px; }
}
