:root {
  --black: #0A0A0A;
  --wine: #5A0F1C;
  --purple: #2A0F2E;
  --red: #B11226;
  --white: #EAEAEA;
  --muted: rgba(234, 234, 234, 0.68);
  --line: rgba(234, 234, 234, 0.13);
  --hot: #ff2858;
  --violet: #c43cff;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html {
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  font-family: "Montserrat", Arial, sans-serif;
  background:
    radial-gradient(circle at 70% 0%, rgba(177, 18, 38, 0.22), transparent 28rem),
    radial-gradient(circle at 12% 12%, rgba(196, 60, 255, 0.08), transparent 18rem),
    linear-gradient(180deg, #050505 0%, #0A0A0A 48%, #14040b 100%);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255,255,255,0.14) 0, rgba(255,255,255,0.14) 1px, transparent 1px, transparent 5px);
  mix-blend-mode: screen;
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(14px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(10,10,10,0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.20em;
}

.brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(255,40,88,0.35));
}

.topbar nav {
  display: flex;
  gap: clamp(12px, 3vw, 26px);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar nav a { text-decoration: none; }
.topbar nav a:hover { color: var(--white); }

main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.unlock-screen {
  min-height: calc(100svh - 112px);
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 54px) 0;
}

.unlock-card {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(177,18,38,0.30), transparent 18rem),
    linear-gradient(145deg, rgba(234,234,234,0.075), rgba(234,234,234,0.02));
  box-shadow: var(--shadow);
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--hot);
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.055em;
}

.unlock-card h1 {
  font-size: clamp(3.1rem, 11vw, 6.7rem);
  line-height: 0.90;
  text-transform: lowercase;
}

.unlock-copy {
  max-width: 520px;
  margin: 18px auto 22px;
  color: var(--muted);
  line-height: 1.75;
}

.unlock-title {
  max-width: 520px;
  margin: 0 auto 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(234,234,234,0.04);
}

.unlock-title span {
  display: block;
  margin-bottom: 8px;
  color: var(--hot);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.unlock-title strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 3.5vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.hidden { display: none !important; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 999px;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
  border: 0;
  color: var(--white);
  cursor: pointer;
  font-family: "Montserrat", Arial, sans-serif;
}

.btn:hover { transform: translateY(-2px); }

.btn.primary {
  border: 1px solid rgba(234,234,234,0.18);
  background: linear-gradient(135deg, #B11226 0%, #5A0F1C 56%, #2A0F2E 100%);
  box-shadow: 0 12px 34px rgba(177,18,38,0.28);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(234,234,234,0.045);
  margin-left: 8px;
}

.btn.big {
  min-height: 56px;
  padding-inline: 32px;
}

.reader {
  padding: clamp(18px, 4vw, 42px) 0 70px;
}

body.locked .reader {
  display: none;
}

body.unlocked .unlock-screen {
  min-height: auto;
  padding: 24px 0 10px;
}

body.unlocked .unlock-card {
  padding: 22px;
}

body.unlocked .unlock-card h1,
body.unlocked .unlock-copy,
body.unlocked .unlock-title,
body.unlocked #unlockButton,
body.unlocked .status {
  display: none;
}

body.unlocked #readButton {
  display: inline-flex !important;
  margin: 0;
}

.chapter-head {
  padding: clamp(18px, 4vw, 44px) 0 22px;
  border-bottom: 1px solid var(--line);
}

.chapter-head h1 {
  max-width: 860px;
  font-size: clamp(2.65rem, 8.6vw, 6.1rem);
  line-height: 0.92;
  text-transform: lowercase;
}

.subtitle {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  line-height: 1.7;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.quick-actions .btn.ghost {
  margin-left: 0;
}

.story {
  padding: clamp(22px, 5vw, 58px) 0 20px;
}

.story p {
  width: min(760px, 100%);
  margin: 0 auto 1.18em;
  color: rgba(234,234,234,0.90);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.14rem, 2.2vw, 1.48rem);
  line-height: 1.85;
  letter-spacing: -0.012em;
}

.story p:first-child::first-letter {
  float: left;
  padding: 0.12em 0.08em 0 0;
  color: var(--hot);
  font-size: 4.2em;
  line-height: 0.72;
}

.story::before {
  content: "";
  display: block;
  width: 84px;
  height: 1px;
  margin: 0 auto 32px;
  background: linear-gradient(90deg, transparent, var(--hot), transparent);
  box-shadow: 0 0 18px rgba(255,40,88,0.7);
}

.end-card {
  margin-top: 46px;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(177,18,38,0.24), transparent 18rem),
    linear-gradient(145deg, rgba(234,234,234,0.065), rgba(234,234,234,0.018));
  box-shadow: var(--shadow);
  text-align: center;
}

.end-card h2 {
  max-width: 720px;
  margin: 0 auto 18px;
  font-size: clamp(2.15rem, 5.4vw, 4.2rem);
  line-height: 0.96;
  text-transform: lowercase;
}

.end-card p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 auto 24px;
  color: var(--muted);
  line-height: 1.75;
}

.footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.80rem;
}

.footer a {
  color: var(--white);
  text-decoration: none;
}

@media (max-width: 700px) {
  main,
  .footer {
    width: min(100% - 24px, 920px);
  }

  .topbar {
    padding: 10px 12px;
  }

  .brand {
    letter-spacing: 0.14em;
  }

  .topbar nav {
    gap: 14px;
    font-size: 0.64rem;
  }

  .unlock-screen {
    min-height: calc(100svh - 92px);
  }

  .unlock-card {
    border-radius: 18px;
    padding: 28px 18px;
  }

  .unlock-card h1 {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  #unlockButton,
  #readButton {
    width: 100%;
  }

  .btn.ghost {
    margin: 10px 0 0;
  }

  .reader {
    padding-top: 8px;
  }

  .chapter-head {
    padding-top: 20px;
  }

  .quick-actions {
    display: grid;
  }

  .quick-actions .btn {
    width: 100%;
  }

  .story {
    padding-top: 28px;
  }

  .story p {
    font-size: 1.06rem;
    line-height: 1.82;
  }

  .story p:first-child::first-letter {
    font-size: 3.2em;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .brand span {
    font-size: 0.76rem;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .topbar nav a[href^="mailto"] {
    display: none;
  }

  .chapter-head h1 {
    font-size: clamp(2.45rem, 14vw, 3.8rem);
  }

  .subtitle {
    font-size: 0.93rem;
  }

  .story p {
    font-size: 1.01rem;
  }
}
