:root {
  --deep: #052f48;
  --ocean: #056b8d;
  --aqua: #37c8c2;
  --foam: #e9fbf8;
  --sand: #f7e7bc;
  --coral: #ff7d68;
  --ink: #12364a;
  --white: #ffffff;
  --shadow: 0 28px 70px rgba(1, 50, 72, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fffe;
  font-family: "Nunito", system-ui, sans-serif;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--white);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  width: min(1180px, calc(100% - 2rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  color: var(--white);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "Baloo 2", cursive;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.25rem;
}

.nav-link {
  font-weight: 800;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 5rem;
  padding: 7rem max(1.5rem, calc((100vw - 1180px) / 2)) 10rem;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 23%, rgba(99, 236, 222, 0.45), transparent 27%),
    linear-gradient(135deg, #063b58 0%, #066e8d 52%, #27aaa8 100%);
}

.hero-copy,
.cover-placeholder {
  position: relative;
  z-index: 5;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: #bff7ec;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", cursive;
  line-height: 1.03;
}

h1 {
  max-width: 720px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.4rem, 7vw, 6.65rem);
  letter-spacing: -0.045em;
}

h1 span {
  color: #9df4e6;
}

.intro {
  max-width: 650px;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.fact-list li {
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.fact-list strong {
  color: var(--white);
}

.button {
  min-height: 3.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.8rem 1.35rem;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover:not(.is-disabled) {
  transform: translateY(-2px);
}

.button:focus-visible,
.viewer-arrow:focus-visible,
.text-control:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 4px;
}

.button-primary {
  color: var(--deep);
  background: var(--sand);
  box-shadow: 0 12px 30px rgba(0, 27, 43, 0.22);
}

.quiet-note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.cover-placeholder {
  min-height: 490px;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.cover-glow {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: rgba(179, 255, 242, 0.38);
  filter: blur(18px);
}

.official-cover {
  width: min(330px, 80vw);
  aspect-ratio: 0.72;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1.25rem 1.8rem 1.8rem 1.25rem;
  object-fit: cover;
  box-shadow: 26px 30px 50px rgba(0, 34, 51, 0.28);
  transform: rotateY(-8deg) rotateZ(2deg);
}

.bubble {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.08);
}

.bubble-one {
  top: 18%;
  right: 7%;
  width: 95px;
  height: 95px;
}

.bubble-two {
  bottom: 20%;
  left: 5%;
  width: 48px;
  height: 48px;
}

.wave {
  position: absolute;
  left: -5%;
  bottom: -82px;
  width: 110%;
  height: 170px;
  border-radius: 50% 50% 0 0 / 55% 55% 0 0;
}

.wave-back {
  bottom: -42px;
  background: rgba(236, 255, 251, 0.35);
  transform: rotate(-2deg);
}

.wave-front {
  background: #f8fffe;
  transform: rotate(1deg);
}

.sample-section {
  padding: 6.5rem max(1.5rem, calc((100vw - 1100px) / 2));
}

.section-heading {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-heading .eyebrow {
  color: var(--ocean);
}

h2 {
  margin-bottom: 1rem;
  color: var(--deep);
  font-size: clamp(2.3rem, 5vw, 4rem);
  letter-spacing: -0.03em;
}

.section-heading > p:last-child,
.cta-section > div > p:last-child {
  color: #587686;
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-heading .selection-note {
  width: fit-content;
  margin: 1rem auto 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid #bfe4df;
  border-radius: 999px;
  color: #326777;
  background: #effaf8;
  font-size: 0.86rem;
  font-weight: 800;
}

.viewer-shell {
  overflow: hidden;
  border: 1px solid #cdebe7;
  border-radius: 1.8rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  color: #456879;
  border-bottom: 1px solid #dff2ef;
  font-size: 0.85rem;
  font-weight: 800;
}

.book-stage {
  min-height: 530px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  align-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(55, 200, 194, 0.12), transparent 38%),
    #effaf8;
}

.book-frame {
  width: min(720px, 100%);
  min-height: 430px;
  display: grid;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  border-radius: 0.8rem;
  background: var(--white);
  box-shadow: 0 22px 50px rgba(4, 71, 92, 0.14);
}

.empty-state {
  max-width: 430px;
  padding: 2rem;
  text-align: center;
}

.empty-icon {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border: 1px dashed #78cfc7;
  border-radius: 50%;
  color: var(--ocean);
  font-size: 2.3rem;
}

.empty-state h3 {
  margin-bottom: 0.75rem;
  color: var(--deep);
  font-size: 1.8rem;
}

.empty-state p {
  margin-bottom: 0;
  color: #66818f;
  line-height: 1.6;
}

.sample-page {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(78vh, 900px);
  display: block;
  object-fit: contain;
}

.sample-figure {
  width: 100%;
  display: grid;
  justify-items: center;
  margin: 0;
}

.sample-caption {
  margin: 0;
  padding: 0.8rem 1rem 0.9rem;
  color: var(--deep);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.viewer-arrow {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--ocean);
  font-size: 1.3rem;
  cursor: pointer;
}

.viewer-arrow:disabled,
.text-control:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.viewer-controls {
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
}

.text-control {
  width: max-content;
  border: 0;
  color: var(--ocean);
  background: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.text-control:last-child {
  justify-self: end;
}

.viewer-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.viewer-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b7d9d5;
}

.viewer-dot.is-current {
  background: var(--ocean);
  transform: scale(1.25);
}

.cta-section {
  width: min(1180px, calc(100% - 2rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.75fr);
  align-items: center;
  gap: 4rem;
  margin: 0 auto 4rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 2rem;
  color: var(--white);
  background:
    radial-gradient(circle at 90% 15%, rgba(64, 221, 211, 0.25), transparent 30%),
    var(--deep);
}

.cta-section h2,
.cta-section .eyebrow {
  color: var(--white);
}

.cta-section > div > p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
}

.cta-actions {
  display: grid;
  gap: 0.85rem;
}

.button-light {
  color: var(--deep);
  background: var(--sand);
}

.button-outline {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.is-disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.link-status {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.8rem;
  text-align: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem max(1.5rem, calc((100vw - 1180px) / 2));
  color: #64818e;
  border-top: 1px solid #dcefed;
  font-size: 0.85rem;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 8.5rem;
  }

  .hero-copy {
    text-align: center;
  }

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

  .hero-actions {
    justify-content: center;
  }

  .cover-placeholder {
    min-height: 430px;
  }

  .cta-section {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
  }

  .brand {
    max-width: 210px;
    line-height: 1.05;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 5rem);
  }

  .quiet-note {
    width: 100%;
  }

  .sample-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .book-stage {
    min-height: 430px;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    padding: 1rem 0.25rem;
  }

  .book-frame {
    min-height: 360px;
  }

  .viewer-arrow {
    width: 2.25rem;
    height: 2.25rem;
  }

  .viewer-controls {
    grid-template-columns: 1fr 1fr;
  }

  .viewer-dots {
    display: none;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
