@font-face {
  font-family: "Bubblegum Sans";
  src: url("/assets/fonts/bubblegum-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #feffff;
  --sky: #75d5ff;
  --sky-pale: #eaf9ff;
  --ink: #212121;
  --muted: #62676a;
  --line: #d9edf5;
  --warm-line: #f1d59f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.6;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.hero-inner,
.shop-section,
.how-it-works,
.order-note,
.footer-inner {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  width: min(340px, 42vw);
}

.brand img {
  width: 100%;
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.home-link {
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-link:hover,
.home-link:focus-visible,
footer a:hover,
footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cart-placeholder,
.paypal-button-slot button {
  min-height: 44px;
  border: 2px dashed #4d92af;
  border-radius: 8px;
  background: var(--sky-pale);
  color: #315e71;
  padding: 9px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero {
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.72), rgb(255 255 255 / 0.72)),
    radial-gradient(circle at 10px 10px, rgb(33 33 33 / 0.08) 1px, transparent 1.5px),
    var(--sky);
  background-size: auto, 24px 24px, auto;
  border-bottom: 1px solid #53b9e4;
}

.hero-inner {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 20px 76px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.08;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Bubblegum Sans", "Trebuchet MS", sans-serif;
  font-size: clamp(3rem, 7vw, 5.3rem);
  line-height: 0.98;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 30px;
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.hero-cta,
.order-note > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: white;
  padding: 12px 23px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-cta:hover,
.hero-cta:focus-visible,
.order-note > a:hover,
.order-note > a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgb(33 33 33 / 0.18);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
  color: white;
  text-align: center;
}

.benefits div {
  padding: 15px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.benefits div + div {
  border-left: 1px solid rgb(255 255 255 / 0.24);
}

.shop-section {
  padding-block: 84px 94px;
}

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

.section-heading h2,
.order-note h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
}

.section-heading > p:last-child {
  margin: 14px auto 0;
  color: var(--muted);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 12px 28px rgb(34 76 94 / 0.09);
}

.book-card:nth-child(4) {
  grid-column: 2 / 4;
}

.book-card:nth-child(5) {
  grid-column: 4 / 6;
}

.cover-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  background: linear-gradient(145deg, #eaf9ff, #c8efff);
  padding: 30px 40px;
}

.cover-wrap img {
  width: min(100%, 230px);
  height: auto;
  aspect-ratio: 638 / 1021;
  object-fit: cover;
  box-shadow: 0 15px 22px rgb(33 33 33 / 0.2);
}

.ribbon {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 0;
  background: var(--ink);
  color: white;
  padding: 8px 15px 8px 18px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.book-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 30px;
  text-align: center;
}

.book-number {
  margin: 0;
  color: #387d9b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.book-card h3 {
  margin: 5px 0 11px;
  font-family: "Bubblegum Sans", "Trebuchet MS", sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.08;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.availability {
  width: 100%;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 0.79rem;
  font-weight: 700;
}

.availability.preorder {
  color: #8a5612;
}

.price-placeholder {
  margin: 11px 0 12px;
  color: #387d9b;
  font-size: 1rem;
  font-weight: 700;
}

.paypal-button-slot,
.book-details > paypal-add-to-cart-button {
  width: 100%;
  margin-top: auto;
}

.book-details > paypal-add-to-cart-button {
  display: block;
  align-self: stretch;
  min-width: 0;
}

.book-details > paypal-add-to-cart-button [id^="paypal-form-fields-container-"][id$="-wrapper"] {
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

.book-details > paypal-add-to-cart-button .item-title {
  display: none !important;
}

.book-details > paypal-add-to-cart-button .item-header {
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  margin-bottom: 12px !important;
}

.book-details > paypal-add-to-cart-button .price-container {
  width: 100%;
  max-width: none !important;
  text-align: center !important;
}

.book-details > paypal-add-to-cart-button .price-container #price-label {
  display: inline-flex !important;
  justify-content: center !important;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sky-pale);
}

.book-details > paypal-add-to-cart-button .price-container #price-text,
.book-details > paypal-add-to-cart-button .price-container #discount-price {
  color: #2f7897 !important;
  font-family: "Montserrat", Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.book-details > paypal-add-to-cart-button .input-label[for="quantity"] {
  display: block;
  margin: 2px 0 6px !important;
  color: #315e71;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.7rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.book-details > paypal-add-to-cart-button .selectContainer {
  width: 104px;
  margin: 0 auto 12px;
}

.book-details > paypal-add-to-cart-button .selectContainer select#quantity {
  width: 100% !important;
  height: 42px;
  min-height: 42px !important;
  margin: 0 !important;
  border: 1px solid #a9d9ec !important;
  border-radius: 8px !important;
  background: #f8fdff !important;
  color: var(--ink);
  padding: 8px 34px 8px 12px !important;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.9rem !important;
  font-weight: 700;
  text-align: center;
  text-align-last: center;
}

.book-details > paypal-add-to-cart-button .selectContainer::after {
  top: 13px !important;
  right: 14px !important;
  border-color: transparent transparent #315e71 #315e71 !important;
}

.book-details > paypal-add-to-cart-button .selectContainer select#quantity:focus-visible {
  border-color: #4d92af !important;
  outline: 3px solid rgb(117 213 255 / 0.35);
  outline-offset: 2px;
}

.paypal-button-slot button {
  width: 100%;
}

.preorder-card {
  border-color: var(--warm-line);
}

.preorder-card .cover-wrap {
  background: linear-gradient(145deg, #fff8e8, #ffe5b7);
}

.how-it-works {
  border-top: 1px solid var(--line);
  padding-block: 82px 90px;
}

.section-heading.compact {
  margin-bottom: 38px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.steps li > span {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky);
  font-family: "Oswald", Arial, sans-serif;
  font-size: 1.35rem;
}

.steps h3 {
  margin: 0 0 5px;
  font-family: "Oswald", Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.order-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 90px;
  border: 1px solid #95dcfa;
  border-radius: 12px;
  background: var(--sky-pale);
  padding: 42px 48px;
}

.order-note > div {
  max-width: 740px;
}

.order-note h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.order-note p:last-child {
  margin: 14px 0 0;
}

.order-note > a {
  flex: 0 0 auto;
}

footer {
  background: var(--ink);
  color: white;
}

.footer-inner {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  font-size: 0.82rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner div {
  display: flex;
  gap: 24px;
}

.footer-inner a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 84px;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-card:nth-child(n) {
    grid-column: auto;
    margin-left: 0;
    width: auto;
  }

  .book-card:nth-child(5) {
    grid-column: 1 / -1;
    width: calc(50% - 15px);
    justify-self: center;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }

  .order-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero-inner,
  .shop-section,
  .how-it-works,
  .order-note,
  .footer-inner {
    width: min(100% - 28px, 1160px);
  }

  .header-inner {
    min-height: 78px;
    gap: 14px;
  }

  .brand {
    width: min(210px, 58vw);
  }

  .home-link {
    display: none;
  }

  .cart-placeholder {
    max-width: 118px;
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.62rem;
  }

  .hero-inner {
    min-height: 380px;
    padding: 56px 5px 62px;
  }

  .benefits {
    grid-template-columns: 1fr;
  }

  .benefits div {
    padding: 10px 16px;
    font-size: 0.7rem;
  }

  .benefits div + div {
    border-top: 1px solid rgb(255 255 255 / 0.24);
    border-left: 0;
  }

  .shop-section,
  .how-it-works {
    padding-block: 64px 70px;
  }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .book-card:nth-child(5) {
    grid-column: auto;
    width: 100%;
  }

  .cover-wrap {
    padding: 28px 48px;
  }

  .cover-wrap img {
    width: min(100%, 245px);
  }

  .book-details {
    padding-inline: 24px;
  }

  .order-note {
    margin-bottom: 70px;
    padding: 32px 25px;
  }

  .order-note > a {
    width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 28px;
  }

  .footer-inner div {
    flex-direction: column;
    gap: 8px;
  }
}

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

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