@charset "utf-8";

/* --------
   Theme
-------- */
:root {
  --bg: #2a0000;
  --bg-2: #1e0000;
  --card: rgba(0, 0, 0, 0.45);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);

  --accent: #40ffff;      /* your original cyan vibe */
  --accent-2: #ffe14a;    /* your original hover yellow */
  --border: rgba(255, 210, 80, 0.35);

  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

/* --------
   Base
-------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  line-height: 1.55;

  /* Keeps your old mood, but a bit richer */
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 900px at 20% 10%, rgba(0, 255, 255, 0.08), transparent 55%),
    radial-gradient(900px 700px at 80% 30%, rgba(255, 225, 74, 0.06), transparent 55%),
    url("flower.webp");
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: cover, cover, auto;
  background-attachment: fixed, fixed, scroll;
}

/* Make sure content is readable even if the background image is busy */
.page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 40px);
}

/* --------
   Accessibility
-------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  background: #000;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
  z-index: 9999;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------
   Hero
-------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;

  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3.4vw, 28px);
}

.kicker {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 14px 0;
  line-height: 1.12;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  color: var(--accent);
  text-wrap: balance;
}

.meta {
  margin: 0;
  display: grid;
  gap: 8px;
}
.meta__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
}
.meta dt {
  color: var(--muted);
}
.meta dd {
  margin: 0;
}

.dedication {
  margin: 16px 0 0 0;
  color: var(--muted);
}

.cover {
  margin: 0;
  display: grid;
  place-items: center;
}
.cover img {
  width: 100%;
  height: auto;
  max-width: 420px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* --------
   Card + chapters
-------- */
.card {
  margin-top: clamp(16px, 3vw, 24px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3.4vw, 28px);
}

h2 {
  margin: 0 0 8px 0;
  font-size: clamp(1.2rem, 2.3vw, 1.45rem);
}

.hint {
  margin: 0 0 16px 0;
  color: var(--muted);
}

.chapters {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.chapter {
  display: block;
  padding: 12px 14px;

  text-decoration: none;
  color: var(--text);

  background: linear-gradient(180deg, rgba(30,0,0,0.7), rgba(20,0,0,0.65));
  border: 1px solid rgba(255, 210, 80, 0.30);
  border-radius: 14px;

  font-family: ui-serif, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  letter-spacing: 0.01em;

  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.chapter:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 225, 74, 0.7);
  background: linear-gradient(180deg, rgba(110,20,20,0.75), rgba(60,0,0,0.75));
  color: var(--accent-2);
}

.chapter:focus-visible {
  outline: 3px solid rgba(64, 255, 255, 0.55);
  outline-offset: 3px;
}

/* --------
   Footer
-------- */
.footer {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
}
.footer__small {
  margin: 0;
  font-size: 0.95rem;
}

/* --------
   Responsive
-------- */
@media (max-width: 780px) {
  body {
    background-attachment: scroll, scroll, scroll; /* avoids jank on some mobiles */
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .meta__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
