:root {
  --sky-top: #48b3d3;
  --sky-mid: #6acdea;
  --sky-soft: #9bddf1;
  --sky-bottom: #f8fbff;
  --ink: #191617;
  --gold: #f5bf33;
  --red: #d4332f;
  --green: #2d6f43;
  --white: rgba(255, 255, 255, 0.88);
  --border: rgba(25, 22, 23, 0.16);
  --shadow: 0 22px 50px rgba(11, 46, 61, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 32%, var(--sky-soft) 65%, var(--sky-bottom) 100%);
}

.cover {
  position: relative;
  min-height: 100vh;
  /* Reserve space for the bottom globe so it stays scrollable; avoid horizontal scroll. */
  padding-bottom: clamp(5rem, 22vw, 13rem);
  overflow: visible;
  isolation: isolate;
}

.sky-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.55;
  pointer-events: none;
}

.sky-glow-left {
  top: 11%;
  left: -10%;
  width: 34vw;
  height: 18vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 72%);
}

.sky-glow-right {
  top: 6%;
  right: -8%;
  width: 28vw;
  height: 16vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 74%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  padding: 4.5rem clamp(1.25rem, 5vw, 2.5rem) 0;
  text-align: center;
}

.author{
  margin: 0;
}

.author {
  font-size: clamp(1.2rem, 2vw, 2rem);
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  margin: 0.65rem 0 0.45rem;
  /* Min below 3.8rem so vw can win on narrow screens. */
  font-size: clamp(1.85rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow-wrap: break-word;
}

.subtitle {
  font-size: clamp(1.35rem, 2.6vw, 2.4rem);
}

.download-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: min(92vw, 36rem);
  padding: 1.4rem;
  text-align: center;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.download-label {
  margin-bottom: 1rem;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.download-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 7.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(25, 22, 23, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.download-link__icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  object-fit: contain;
}

.download-link:hover,
.download-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(25, 22, 23, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

.download-link:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.download-link--pdf {
  border-color: rgba(212, 51, 47, 0.4);
}

.download-link--pdf:hover,
.download-link--pdf:focus-visible {
  border-color: var(--red);
}

.download-link--epub {
  border-color: rgba(45, 111, 67, 0.45);
}

.download-link--epub:hover,
.download-link--epub:focus-visible {
  border-color: var(--green);
}

.decor {
  position: absolute;
  user-select: none;
  pointer-events: none;
}

.decor-star {
  z-index: 2;
  animation: drift 8s ease-in-out infinite;
}

.star-1 {
  top: 8%;
  left: 4%;
  width: clamp(2.8rem, 5vw, 4.8rem);
}

.star-2 {
  top: 11%;
  right: 10%;
  width: clamp(2.4rem, 4.2vw, 4rem);
  animation-delay: -2s;
}

.star-3 {
  top: 27%;
  right: 8%;
  width: clamp(2.1rem, 3.6vw, 3.2rem);
  animation-delay: -4.5s;
}

.star-4 {
  bottom: 18%;
  left: 16%;
  width: clamp(2.4rem, 4vw, 3.8rem);
  animation-delay: -1s;
}

.star-5 {
  top: 16%;
  left: 7%;
  width: clamp(1.6rem, 2.8vw, 2.6rem);
  animation-delay: -5s;
}

.star-6 {
  bottom: 27%;
  left: 31%;
  width: clamp(1.6rem, 2.6vw, 2.3rem);
  animation-delay: -3s;
}

.flying-girl {
  left: 1%;
  bottom: 40%;
  z-index: 3;
  width: min(56vw, 34rem);
  transform: rotate(6deg);
}

.world {
  position: absolute;
  right: -8vw;
  bottom: 0;
  z-index: 2;
  width: min(68vw, 52rem);
  /* Same aspect as terre.svg viewBox so contain shows the full art (cover on a square cropped right/left). */
  aspect-ratio: 6759 / 5234;
  background: url("../images/terre.svg") center / contain no-repeat;
}

.bateau {
  /* Perch on the crest of the globe (book cover), above water and other pins. */
  top: -4%;
  right: 22%;
  z-index: 5;
  width: 30%;
  transform: translateY(-4%);
}

.eiffel {
  top: 32%;
  left: 20%;
  z-index: 3;
  width: 10%;
}

.colleseum {
  top: 41%;
  right: 11%;
  z-index: 3;
  width: 17%;
}

.lamma {
  left: 4%;
  bottom: 15%;
  z-index: 3;
  width: 14%;
}

.plant {
  right: 8%;
  bottom: 2%;
  z-index: 3;
  width: 16%;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

@media (max-width: 900px) {
  .hero-copy {
    padding-top: 3rem;
  }

  .download-card {
    top: 46%;
    width: min(92vw, 28rem);
  }

  .download-actions {
    flex-direction: column;
  }

  .download-link {
    min-width: 0;
    flex: 1 1 auto;
  }

  .flying-girl {
    left: -10%;
    bottom: 26%;
    width: min(78vw, 30rem);
  }

  .world {
    right: -12vw;
    bottom: 0;
    width: min(78vw, 40rem);
  }

  .bateau {
    top: -5%;
    right: 20%;
    width: 32%;
  }
}

@media (max-width: 640px) {
  .cover {
    padding-bottom: clamp(6.5rem, 40vw, 15rem);
  }

  .hero-copy {
    padding-top: 2.3rem;
  }

  .subtitle {
    max-width: 18rem;
    margin: 0.3rem auto 0;
  }

  .download-card {
    top: 44%;
    padding: 1.2rem;
    border-radius: 22px;
  }

  .download-label {
    margin-bottom: 0.85rem;
    font-size: 0.8rem;
  }

  .download-link {
    padding: 0.6rem 0.95rem;
    font-size: 0.98rem;
  }

  .flying-girl {
    left: -18%;
    bottom: 28%;
    width: min(92vw, 28rem);
  }

  .world {
    right: -4vw;
    bottom: 0;
    width: min(96vw, 34rem);
  }

  .bateau {
    top: -6%;
    right: 18%;
    width: 34%;
    transform: translateY(-5%);
  }

  .eiffel {
    top: 30%;
    left: 18%;
  }

  .colleseum {
    top: 39%;
    right: 9%;
  }

  .lamma {
    left: 3%;
    bottom: 13%;
  }

  .plant {
    right: 6%;
    bottom: 1%;
  }

  .star-2,
  .star-3 {
    right: 5%;
  }
}
