:root {
  --bg-base: #050a10;
  --bg-deep: #0c1c2a;
  --panel: rgba(9, 18, 30, 0.84);
  --panel-strong: rgba(14, 26, 40, 0.92);
  --text: #ecf3fa;
  --muted: #b5c8d8;
  --line: rgba(120, 197, 235, 0.38);
  --accent: #79d2ff;
  --accent-2: #4dc0ff;
  --accent-3: #dce4ec;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 7%, rgba(128, 198, 230, 0.2), transparent 26%),
    radial-gradient(circle at 20% 70%, rgba(64, 126, 166, 0.2), transparent 34%),
    linear-gradient(160deg, var(--bg-base) 0%, var(--bg-deep) 56%, #10293f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(203, 234, 255, 0.03) 0,
    rgba(203, 234, 255, 0.03) 1px,
    transparent 1px,
    transparent 72px
  );
  opacity: 0.5;
  z-index: 0;
}

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 16% 26%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 38% 70%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 82% 18%, rgba(173, 225, 255, 0.55), transparent),
    radial-gradient(1px 1px at 67% 55%, rgba(255, 255, 255, 0.65), transparent),
    linear-gradient(180deg, rgba(165, 223, 255, 0.1) 0, transparent 65%);
  animation: drift 18s linear infinite;
  opacity: 0.78;
  z-index: 0;
}

.starfield::before,
.starfield::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.starfield::before {
  background: radial-gradient(circle at 20% 40%, rgba(133, 197, 228, 0.18), transparent 35%);
  animation: pulse 8s ease-in-out infinite;
}

.starfield::after {
  background: radial-gradient(circle at 76% 26%, rgba(104, 190, 237, 0.2), transparent 32%);
  animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-22px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
}

.site-header,
main,
.site-footer {
  position: relative;
}

main,
.site-footer {
  z-index: 1;
}

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.15rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  isolation: isolate;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(5, 10, 16, 0.92), rgba(5, 10, 16, 0.64));
  border-bottom: 1px solid rgba(150, 201, 233, 0.2);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font: 400 1.75rem/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.07rem;
  text-shadow: 0 0 16px rgba(115, 191, 236, 0.38);
}

.site-nav {
  display: flex;
  gap: 0.6rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font: 400 1.08rem/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.05rem;
  padding: 0.52rem 0.9rem;
  border: 1px solid transparent;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  background: rgba(255, 255, 255, 0.02);
  transition: 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  border-color: rgba(180, 219, 242, 0.36);
  background: linear-gradient(90deg, rgba(93, 153, 190, 0.32), rgba(121, 211, 255, 0.25));
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.2rem 1rem 1.5rem;
}

.hero {
  min-height: 64vh;
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 2rem 0 2.8rem;
}

.hero-layout {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: clamp(1.2rem, 3.1vw, 3rem);
  align-items: center;
}

.hero-copy {
  max-width: 780px;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 4.85vw, 4.35rem);
  line-height: 1.01;
  letter-spacing: 0.04rem;
  margin: 0.2rem 0 0.9rem;
}

.hero-copy p {
  max-width: 62ch;
}

.hero-image-frame {
  margin: 0;
  border: 1px solid rgba(192, 224, 243, 0.28);
  border-radius: 1.35rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(147, 207, 242, 0.2) inset;
  transform: rotate(-0.8deg);
  aspect-ratio: 2 / 3;
}

.hero-image-frame picture {
  display: block;
  height: 100%;
}

.responsive-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-cover-art,
.cover-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.kicker {
  color: var(--accent);
  letter-spacing: 0.16rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Bebas Neue", sans-serif;
  margin: 0;
  font-weight: 400;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 5.1rem);
  line-height: 0.96;
  letter-spacing: 0.04rem;
  color: #f7fbff;
  text-shadow:
    0 0 20px rgba(128, 199, 238, 0.35),
    0 0 40px rgba(53, 129, 176, 0.3);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.14;
  margin-bottom: 0.7rem;
  letter-spacing: 0.03rem;
}

h3 {
  font-size: 1.55rem;
  letter-spacing: 0.02rem;
}

p,
li {
  color: var(--muted);
  line-height: 1.72;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font: 400 1.05rem/1 "Bebas Neue", sans-serif;
  letter-spacing: 0.05rem;
  padding: 0.76rem 1.2rem;
  border: 1px solid var(--line);
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 32px rgba(93, 174, 218, 0.34);
}

.btn-primary {
  color: #07111b;
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent-2) 0%, #9dd8f7 50%, var(--accent-3) 100%);
}

.btn-ghost {
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.03);
}

.panel {
  margin-top: 1.2rem;
  padding: clamp(1.05rem, 2.4vw, 2.1rem);
  border: 1px solid rgba(175, 219, 245, 0.18);
  border-radius: 1.2rem;
  background:
    linear-gradient(150deg, rgba(173, 219, 245, 0.08), rgba(255, 255, 255, 0.01)),
    var(--panel);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(118, 193, 234, 0.12) inset;
}

.features {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.card {
  border: 1px solid rgba(186, 223, 245, 0.16);
  border-radius: 1rem;
  padding: 1rem;
  min-height: 205px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(140deg, rgba(83, 140, 181, 0.16), rgba(109, 196, 241, 0.09)),
    rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:nth-child(2) {
  transform: translateY(-10px);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.page-layout {
  padding-top: 0.7rem;
}

.page-hero {
  margin-bottom: 1.1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 1rem;
  align-items: center;
}

.portrait-frame {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(1.2deg);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(121, 188, 226, 0.2) inset;
  position: relative;
}

.portrait-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 10, 16, 0.04), rgba(5, 10, 16, 0.3));
}

.author-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 30%;
}

.book-grid {
  display: grid;
  grid-template-columns: minmax(200px, 330px) minmax(0, 1fr);
  gap: clamp(1rem, 2.8vw, 2.4rem);
  align-items: center;
  margin-top: 0.65rem;
}

.book-cover {
  aspect-ratio: 2 / 3;
  margin: 0;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(120, 197, 235, 0.22) inset;
  transform: rotate(-1deg);
}

.book-cover picture {
  display: block;
  height: 100%;
}

.book-copy h1 {
  margin-bottom: 0.7rem;
  line-height: 0.98;
  text-transform: none;
  font-size: clamp(2rem, 4.1vw, 3.2rem);
}

.meta-list {
  margin: 0 0 1.2rem;
  padding-left: 1.15rem;
}

.buy-box {
  border: 1px solid rgba(183, 222, 245, 0.2);
  border-radius: 1rem;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(83, 144, 184, 0.16), rgba(106, 194, 241, 0.12)),
    var(--panel-strong);
  max-width: 430px;
}

.price {
  margin: 0 0 0.8rem;
  color: #fff;
  font-size: 1.42rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.helper {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.preorder-status {
  margin: 0 0 0.8rem;
  color: #d5e8f5;
  font-weight: 600;
}

.newsletter {
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: "";
  position: absolute;
  inset: -120px auto auto -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 172, 217, 0.26), transparent 68%);
  pointer-events: none;
}

.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.7rem;
}

.chapter-content {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

.chapter-intro {
  text-align: center;
}

.chapter-intro p {
  margin-left: auto;
  margin-right: auto;
}

.chapter-content p {
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
  text-indent: 1.6em;
}

.chapter-content h2 {
  margin-bottom: 1rem;
  text-align: center;
}

.chapter-cta {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.field-input {
  min-width: 260px;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.8rem;
  padding: 0.76rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

.field-input::placeholder {
  color: rgba(237, 242, 255, 0.58);
}

.field-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(57, 231, 255, 0.26);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

code {
  color: #cfe8f8;
}

.site-footer {
  max-width: var(--max-width);
  margin: 1.3rem auto 0;
  padding: 1rem;
  color: rgba(245, 247, 255, 0.78);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 1.1rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.1rem, 6vw, 3.7rem);
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    right: 1rem;
    top: 4.1rem;
    display: none;
    flex-direction: column;
    min-width: 205px;
    padding: 0.6rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(168, 209, 234, 0.24);
    background: rgba(5, 10, 16, 0.96);
    backdrop-filter: blur(10px);
  }

  .site-nav.open {
    display: flex;
  }

  .book-grid,
  .features,
  .hero-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-image-frame,
  .portrait-frame,
  .book-cover {
    transform: none;
  }

  .book-cover {
    transform: none;
  }

  .card:nth-child(2) {
    transform: none;
  }

  .card {
    min-height: 0;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 10vw, 3.4rem);
    line-height: 0.96;
  }

  .field-input {
    min-width: 100%;
  }

  .chapter-cta .btn {
    width: 100%;
    text-align: center;
  }
}
