﻿:root {
  --ink: #f7eedc;
  --muted: #c8b999;
  --gold: #d6aa54;
  --gold-soft: #f2d28a;
  --wine-deep: #260811;
  --charcoal: #100e0d;
  --black: #080706;
  --marble: rgba(255, 246, 226, 0.12);
  --border: rgba(214, 170, 84, 0.34);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --shell-gutter: 24px;
  --button-gap: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  background:
    radial-gradient(circle at 20% 5%, rgba(214, 170, 84, 0.18), transparent 30rem),
    radial-gradient(circle at 82% 18%, rgba(122, 20, 43, 0.42), transparent 26rem),
    radial-gradient(circle at 45% 92%, rgba(214, 170, 84, 0.12), transparent 28rem),
    linear-gradient(145deg, var(--black), var(--wine-deep) 52%, var(--charcoal));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 35%, var(--marble) 36%, transparent 37% 100%),
    linear-gradient(68deg, transparent 0 62%, rgba(214, 170, 84, 0.08) 63%, transparent 64% 100%);
  opacity: 0.55;
  mix-blend-mode: screen;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.page-shell {
  position: relative;
  width: min(1120px, calc(100% - var(--shell-gutter)));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 0;
  display: grid;
  align-content: center;
  gap: 24px;
}

.hero,
.track-card {
  position: relative;
  padding: clamp(28px, 7vw, 76px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(160deg, rgba(26, 17, 14, 0.92), rgba(38, 8, 17, 0.82));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after,
.track-card::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -130px;
  width: 310px;
  height: 310px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(214, 170, 84, 0.22), transparent 68%);
}

.kicker {
  margin: 0 0 14px;
  color: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.55rem, 11vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.home-title {
  max-width: 820px;
}

.subtitle {
  margin: 22px 0 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4.5vw, 2.2rem);
  line-height: 1.1;
}

.author,
.chapter {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.description {
  max-width: 680px;
  margin: 28px 0 0;
  color: rgba(247, 238, 220, 0.88);
  font-size: clamp(1.04rem, 3.4vw, 1.28rem);
  overflow-wrap: break-word;
}

.nav-grid,
.button-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--button-gap);
  margin-top: 34px;
}

.nav-grid {
  grid-template-columns: 1fr;
}

.button-stack {
  grid-template-columns: 1fr;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 16px 20px;
  border: 1px solid rgba(214, 170, 84, 0.54);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(8, 7, 6, 0.42);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  touch-action: manipulation;
}

.button:hover,
.button:focus,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold-soft);
  background: rgba(214, 170, 84, 0.14);
  outline: none;
}

.button.primary {
  color: #140c08;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border-color: transparent;
}

.button.back {
  color: var(--gold-soft);
  border-style: dashed;
}

.track-card {
  display: grid;
  gap: clamp(28px, 6vw, 64px);
}

.cover-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.07);
}

.cover-frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #2b1111, #6a1830 48%, #d6aa54);
}

.track-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.site-footer {
  color: rgba(247, 238, 220, 0.68);
  font-size: 0.88rem;
  text-align: center;
  overflow-wrap: break-word;
}

@supports (padding: max(0px)) {
  .page-shell {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@supports not (text-wrap: balance) {
  h1 {
    max-width: 14ch;
  }

  .home-title {
    max-width: 12ch;
  }
}

@media (min-width: 481px) and (max-width: 719px) {
  :root {
    --shell-gutter: 36px;
  }

  .hero,
  .track-card {
    padding: clamp(32px, 8vw, 52px);
  }

  body[data-page="track"] h1 {
    font-size: clamp(2.7rem, 9vw, 4.6rem);
  }

  .cover-frame {
    width: min(100%, 390px);
  }
}

@media (min-width: 720px) {
  :root {
    --shell-gutter: 64px;
  }

  .page-shell {
    padding: 48px 0;
  }

  .nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .track-card {
    grid-template-columns: minmax(260px, 430px) minmax(0, 1fr);
    align-items: center;
  }

  .cover-frame {
    width: min(100%, 430px);
  }

  .button-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button-stack .button:nth-child(3) {
    grid-column: 1 / -1;
  }

  .button.back {
    grid-column: 1 / -1;
  }
}

@media (min-width: 720px) and (max-width: 980px) {
  body[data-page="track"] h1 {
    font-size: clamp(2.65rem, 7vw, 4.5rem);
    line-height: 0.98;
  }

  .track-card {
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 34px;
  }

  .cover-frame {
    width: min(100%, 360px);
  }
}

@media (min-width: 981px) {
  body[data-page="track"] h1 {
    font-size: clamp(3.2rem, 7.5vw, 6.4rem);
  }

  .button.back {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1200px) {
  .page-shell {
    width: min(1180px, calc(100% - 96px));
  }

  .hero,
  .track-card {
    border-radius: 34px;
  }
}

@media (min-width: 1600px) {
  .page-shell {
    width: min(1240px, calc(100% - 140px));
  }
}

@media (max-width: 480px) {
  .hero,
  .track-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .hero::after,
  .track-card::after {
    right: -160px;
    bottom: -170px;
  }

  .kicker {
    margin-bottom: 10px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.4rem);
    line-height: 0.98;
  }

  body[data-page="track"] h1 {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }

  .subtitle {
    margin-top: 16px;
    font-size: clamp(1.15rem, 6vw, 1.55rem);
  }

  .author,
  .chapter {
    margin-top: 12px;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
  }

  .description {
    margin-top: 20px;
    font-size: 1rem;
  }

  .nav-grid,
  .button-stack {
    --button-gap: 12px;
    margin-top: 26px;
  }

  .button {
    width: 100%;
    min-height: 58px;
    padding: 15px 16px;
    font-size: 0.95rem;
  }

  .cover-frame {
    width: min(100%, 300px);
    padding: 8px;
    border-radius: 22px;
  }

  .cover-frame img {
    border-radius: 16px;
  }

  .site-footer {
    padding: 0 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  :root {
    --shell-gutter: 16px;
  }

  .hero,
  .track-card {
    padding: 20px 14px;
  }

  h1,
  body[data-page="track"] h1 {
    font-size: clamp(1.9rem, 11vw, 2.55rem);
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .page-shell {
    align-content: start;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hero,
  .track-card {
    padding: 22px;
  }

  .track-card {
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 24px;
  }

  .cover-frame {
    width: min(100%, 260px);
  }

  body[data-page="track"] h1 {
    font-size: clamp(2rem, 6vw, 3.4rem);
  }

  .description {
    margin-top: 16px;
  }

  .button-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
  }

  .button-stack .button:nth-child(3) {
    grid-column: 1 / -1;
  }

  .button.back {
    grid-column: 1 / -1;
  }
}

@media (hover: none) {
  .button:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  body,
  .hero,
  .track-card,
  .button,
  .button.primary {
    background: Canvas;
    color: CanvasText;
  }

  .hero,
  .track-card,
  .button,
  .cover-frame {
    border-color: ButtonText;
  }

  .button.primary {
    color: ButtonText;
  }
}

@media print {
  body {
    color: #111;
    background: #fff;
  }

  body::before,
  .hero::after,
  .track-card::after {
    display: none;
  }

  .page-shell {
    width: 100%;
    min-height: auto;
    padding: 0;
  }

  .hero,
  .track-card {
    box-shadow: none;
    border-color: #999;
  }
}
