:root {
  --bg: #0c0a12;
  --bg-elevated: #16121f;
  --cream: #f6f0e8;
  --muted: #b8aec8;
  --gold: #f4c95d;
  --coral: #ff6b4a;
  --magenta: #ff4d9a;
  --cyan: #3ee0c8;
  --lime: #c6f23a;
  --violet: #b38cff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Outfit, system-ui, sans-serif;
  color: var(--cream);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 12% -10%, rgba(244, 201, 93, 0.16), transparent 50%),
    radial-gradient(ellipse 55% 45% at 100% 8%, rgba(255, 77, 154, 0.14), transparent 46%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(62, 224, 200, 0.1), transparent 50%);
}

a {
  color: inherit;
}

.site-header,
.site-footer,
.home,
.poem-shell {
  width: min(1080px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1.25rem;
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: var(--cream);
}

.hero {
  padding: 2.5rem 0 2.75rem;
}

.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 500;
  line-height: 1.1;
  max-width: 14ch;
}

.hero p {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
}

.random-btn {
  appearance: none;
  margin-top: 1.75rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid rgba(246, 240, 232, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 77, 154, 0.22), rgba(62, 224, 200, 0.16));
  color: var(--cream);
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.random-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 240, 232, 0.4);
  box-shadow: 0 12px 32px rgba(255, 77, 154, 0.18);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  padding-bottom: 3.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 1.5rem 1.4rem 1.3rem;
  text-decoration: none;
  background: rgba(22, 18, 31, 0.82);
  border: 1px solid rgba(246, 240, 232, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transform: translateY(0) scale(1);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 70%, white);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    0 18px 40px color-mix(in srgb, var(--accent) 22%, transparent);
}

.card-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 500;
  margin: 0.7rem 0 0.85rem;
}

.card p {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.65;
  flex: 1;
}

.card-cta {
  margin-top: 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card--gold { --accent: var(--gold); }
.card--coral { --accent: var(--coral); }
.card--magenta { --accent: var(--magenta); }
.card--cyan { --accent: var(--cyan); }
.card--lime { --accent: var(--lime); }
.card--violet { --accent: var(--violet); }

.site-footer {
  padding: 0 0 2.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184, 174, 200, 0.7);
}

.poem-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.poem-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 4rem;
  text-align: center;
}

.poem-shell .accent-line {
  width: 64px;
  height: 2px;
  margin-bottom: 1.4rem;
  background: var(--accent, var(--gold));
}

.poem-shell h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
}

.poem-body {
  max-width: 34rem;
  margin-top: 2rem;
}

.poem-body p {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.75;
}

.poem-body p + p {
  margin-top: 1.15rem;
}

.back-link {
  display: inline-block;
  margin-top: 2.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease;
}

.back-link:hover {
  color: var(--cream);
}

@media (max-width: 860px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
