/* Same colors and fonts as the notebook (babybook/css/tokens.css). */
:root {
  --color-paper: #f8f4ed;
  --color-ink: #1f3a4d;
  --color-line: #8fa2ad;
  --color-sage: #a3b5a0;
  --color-sage-soft: #e2e9df;
  --color-rose: #e9a99e;
  --color-rose-soft: #f6e3de;
  --color-white: #fffdf9;

  --font-title: "Itim", "Comic Sans MS", cursive;
  --font-phrase: "Kalam", cursive;
  --font-body: "Patrick Hand", "Comic Sans MS", cursive;

  --gutter: 16px;
  --max-width: 1080px;
  --radius: 16px;
  --shadow: 0 6px 24px rgb(31 58 77 / 0.12);
}

@font-face {
  font-family: "Itim";
  src: url("../fuentes/itim-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Patrick Hand";
  src: url("../fuentes/patrick-hand-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("../fuentes/kalam-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.45;
}

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

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.15;
}

main > section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px var(--gutter);
}

/* Watercolor patch behind titles (same PNGs as the notebook). */
.blob {
  position: relative;
  display: inline-block;
  padding: 0.15em 0.6em 0.25em;
  isolation: isolate;
}

.blob::before {
  content: "";
  position: absolute;
  inset: -0.15em -0.4em -0.2em;
  z-index: -1;
  background: url("../img/mancha-titulo-sage.webp") center / 100% 100% no-repeat;
  transform: rotate(-1.5deg);
}

.blob--rose::before {
  background-image: url("../img/mancha-frase-rose.webp");
}

/* Header: brand on the left, languages in the corner. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px var(--gutter);
}

.top__brand {
  color: inherit;
  font-family: var(--font-title);
  font-size: 24px;
  text-decoration: none;
}

.languages {
  display: flex;
  gap: 4px;
}

.languages a {
  padding: 4px 10px;
  border-radius: 99px;
  color: inherit;
  font-family: var(--font-title);
  font-size: 16px;
  text-decoration: none;
}

.languages a:hover {
  background: var(--color-sage-soft);
}

.languages a[aria-current="true"] {
  background: var(--color-ink);
  color: var(--color-white);
}

/* Hero: text and price, cover image. */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero__text {
  position: relative;
}

.hero__sprig {
  position: absolute;
  top: -36px;
  right: 0;
  width: 56px;
  transform: rotate(12deg);
}

.hero__title {
  margin-bottom: 20px;
  font-size: clamp(48px, 10vw, 76px);
}

.hero__subtitle {
  margin-bottom: 12px;
  font-family: var(--font-title);
  font-size: 24px;
  line-height: 1.3;
}

.hero__lead {
  margin-bottom: 28px;
}

.hero__cover img {
  width: min(100%, 420px);
  margin: 0 auto;
  border-radius: 6px 14px 14px 6px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

/* Price and order button */
.buy__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 16px;
  font-family: var(--font-title);
  font-size: 36px;
}

.buy__format {
  font-family: var(--font-body);
  font-size: 18px;
}

.button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 99px;
  background: var(--color-rose);
  color: var(--color-ink);
  font-family: var(--font-title);
  font-size: 21px;
  text-decoration: none;
  box-shadow: 0 3px 0 rgb(31 58 77 / 0.15);
  transition: transform 0.15s;
}

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

.button:focus-visible,
.languages a:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 3px;
}

.buy__note {
  margin-top: 12px;
  font-size: 16px;
}

/* Section titles */
.section-title {
  margin-bottom: 16px;
  font-size: clamp(30px, 6vw, 40px);
  text-align: center;
}

.section-lead {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}

/* What's inside */
.spread img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.features {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  list-style: none;
}

.features li {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--color-white);
}

.features li:nth-child(odd) {
  background: var(--color-sage-soft);
}

.features li:nth-child(even) {
  background: var(--color-rose-soft);
}

.features h3 {
  margin-bottom: 6px;
  font-size: 23px;
}

/* A few pages */
.gallery__grid {
  display: grid;
  gap: 24px;
}

.gallery figure img {
  width: min(100%, 360px);
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.gallery figcaption {
  margin-top: 10px;
  font-family: var(--font-title);
  text-align: center;
}

/* Details */
.details__list {
  max-width: 640px;
  margin: 0 auto;
  list-style: none;
}

.details__list li {
  position: relative;
  padding: 8px 0 8px 32px;
}

.details__list li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 18px;
  height: 17px;
  background: url("../img/corazon.png") center / contain no-repeat;
}

/* Order */
.order {
  text-align: center;
}

.order__bunnies {
  width: 170px;
  margin: 0 auto 12px;
}

.order__text {
  max-width: 560px;
  margin: 0 auto 24px;
}

.order .buy__price {
  justify-content: center;
}

.bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px var(--gutter) 40px;
  font-size: 16px;
  text-align: center;
}

@media (min-width: 720px) {
  main > section {
    padding-block: 64px;
  }

  .hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    padding-top: 40px;
  }

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

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

  .button {
    transition: none;
  }
}
