/*
 * adiostetita.com — landing page for "Adiós Tetita, Hola Mami".
 * Copies the book cover: cool off-white paper, periwinkle hand lettering with a
 * cream outline, orange stars, teal dots, the cover's pink wave + lime circles,
 * all with a light gouache grain. Sections join with soft waves, never straight edges.
 * The CloudFront CSP forbids inline styles — every style lives here.
 */

@font-face {
  font-family: 'Grandstander';
  src: url('assets/fonts/grandstander.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/nunito-italic.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-hi: #f7f8fb;
  --violet: #6c63b5;
  --deep: #4a4390;
  --night: #352f73;
  --ink: #4f4a7e;
  --muted: #6a6593;
  --cream: #eedfb4;
  --cream-edge: #dcc891;
  --star: #eda21a;
  --teal: #82aeb3;
  --pink: #f2c3cf;
  --pink-dot: #e3a0b4;
  --lime: #e6e49b;
  --lav: #b6afe2;
  --lav-lt: #dcd8f2;
  --display: 'Grandstander', 'Trebuchet MS', sans-serif;
  --body: 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
  --gutter: clamp(22px, 5vw, 48px);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--deep);
  text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--star);
  outline-offset: 3px;
}

.at-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.at-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Type ─────────────────────────────────────────────────────────────── */

.at-outl {
  text-shadow:
    3px 0 var(--cream),
    -3px 0 var(--cream),
    0 3px var(--cream),
    0 -3px var(--cream),
    2px 2px var(--cream),
    -2px 2px var(--cream),
    2px -2px var(--cream),
    -2px -2px var(--cream);
}

.at-outl-sm {
  text-shadow:
    2px 0 var(--cream),
    -2px 0 var(--cream),
    0 2px var(--cream),
    0 -2px var(--cream);
}

.at-h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  color: var(--violet);
  text-wrap: balance;
}

.at-eyebrow {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.at-lead {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}

.at-note {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.at-note strong {
  color: var(--deep);
}

.at-textlink {
  font-weight: 800;
  font-size: 17px;
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */

.at-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.at-btn:hover {
  transform: translateY(-3px) rotate(-1.2deg);
}

.at-btn svg {
  flex: none;
}

.at-btn-sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 16px;
  box-shadow: 0 0 0 4px var(--cream);
}

.at-btn-xl {
  min-height: 66px;
  padding: 0 34px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 23px;
  box-shadow:
    0 0 0 5px var(--cream),
    0 10px 0 5px var(--cream-edge);
}

.at-btn-deep {
  background: var(--deep);
}

/* ─── Header ───────────────────────────────────────────────────────────── */

.at-header {
  position: relative;
  z-index: 3;
  padding: 16px var(--gutter);
}

.at-header .at-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.at-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--violet);
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  min-height: 44px;
}

.at-brand svg {
  width: 28px;
  height: 28px;
}

/* ─── Hero: the book and the buy, together on the first screen ────────── */

.at-hero {
  position: relative;
  padding: clamp(8px, 2vw, 24px) var(--gutter) 0;
}

.at-hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    'title book'
    'buy book';
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 22px;
  align-items: center;
}

.at-hero-title {
  grid-area: title;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.at-hero-book {
  grid-area: book;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 560px;
}

.at-hero-buy {
  grid-area: buy;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.at-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--paper-hi);
  box-shadow: 0 0 0 3px var(--pink);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--deep);
}

.at-pill svg {
  width: 18px;
  height: 18px;
}

.at-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5.3vw, 76px);
  line-height: 1.04;
  letter-spacing: 0.02em;
  color: var(--violet);
  text-shadow:
    0.065em 0 var(--cream),
    -0.065em 0 var(--cream),
    0 0.065em var(--cream),
    0 -0.065em var(--cream),
    0.046em 0.046em var(--cream),
    -0.046em 0.046em var(--cream),
    0.046em -0.046em var(--cream),
    -0.046em -0.046em var(--cream),
    0.025em 0.06em var(--cream),
    -0.025em 0.06em var(--cream),
    0.06em 0.025em var(--cream),
    -0.06em -0.025em var(--cream);
}

.at-title .at-sr {
  text-shadow: none;
}

.at-line {
  display: block;
  white-space: nowrap;
}

.at-title .ch {
  display: inline-block;
  animation: at-pop 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}

.at-title .ch > span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.at-title .ch > span:hover {
  transform: translateY(-0.12em) scale(1.08) !important;
}

.at-title .sp {
  display: inline-block;
  width: 0.3em;
}

/* Hand-lettered wobble + staggered entrance, letter by letter (the space is child 6 / 5). */
.line-1 .ch:nth-child(1) {
  animation-delay: 0.05s;
}
.line-1 .ch:nth-child(2) {
  animation-delay: 0.1s;
}
.line-1 .ch:nth-child(3) {
  animation-delay: 0.15s;
}
.line-1 .ch:nth-child(4) {
  animation-delay: 0.2s;
}
.line-1 .ch:nth-child(5) {
  animation-delay: 0.25s;
}
.line-1 .ch:nth-child(7) {
  animation-delay: 0.32s;
}
.line-1 .ch:nth-child(8) {
  animation-delay: 0.37s;
}
.line-1 .ch:nth-child(9) {
  animation-delay: 0.42s;
}
.line-1 .ch:nth-child(10) {
  animation-delay: 0.47s;
}
.line-1 .ch:nth-child(11) {
  animation-delay: 0.52s;
}
.line-1 .ch:nth-child(12) {
  animation-delay: 0.57s;
}
.line-1 .ch:nth-child(13) {
  animation-delay: 0.62s;
}
.line-2 .ch:nth-child(1) {
  animation-delay: 0.75s;
}
.line-2 .ch:nth-child(2) {
  animation-delay: 0.8s;
}
.line-2 .ch:nth-child(3) {
  animation-delay: 0.85s;
}
.line-2 .ch:nth-child(4) {
  animation-delay: 0.9s;
}
.line-2 .ch:nth-child(6) {
  animation-delay: 0.97s;
}
.line-2 .ch:nth-child(7) {
  animation-delay: 1.02s;
}
.line-2 .ch:nth-child(8) {
  animation-delay: 1.07s;
}
.line-2 .ch:nth-child(9) {
  animation-delay: 1.12s;
}

.line-1 .ch:nth-child(1) > span {
  transform: rotate(-4deg);
}
.line-1 .ch:nth-child(2) > span {
  transform: rotate(2deg);
}
.line-1 .ch:nth-child(3) > span {
  transform: rotate(-3deg) translateY(-0.04em);
}
.line-1 .ch:nth-child(4) > span {
  transform: rotate(3deg);
}
.line-1 .ch:nth-child(5) > span {
  transform: rotate(-5deg) translateY(0.03em);
}
.line-1 .ch:nth-child(7) > span {
  transform: rotate(2deg);
}
.line-1 .ch:nth-child(8) > span {
  transform: rotate(-2deg);
}
.line-1 .ch:nth-child(9) > span {
  transform: rotate(3deg) translateY(0.02em);
}
.line-1 .ch:nth-child(10) > span {
  transform: rotate(-3deg) translateY(-0.05em);
}
.line-1 .ch:nth-child(11) > span {
  transform: rotate(2deg);
}
.line-1 .ch:nth-child(12) > span {
  transform: rotate(-4deg);
}
.line-1 .ch:nth-child(13) > span {
  transform: rotate(8deg);
}
.line-2 .ch:nth-child(1) > span {
  transform: rotate(-3deg);
}
.line-2 .ch:nth-child(2) > span {
  transform: rotate(3deg) translateY(0.03em);
}
.line-2 .ch:nth-child(3) > span {
  transform: rotate(-2deg);
}
.line-2 .ch:nth-child(4) > span {
  transform: rotate(4deg);
}
.line-2 .ch:nth-child(6) > span {
  transform: rotate(-3deg);
}
.line-2 .ch:nth-child(7) > span {
  transform: rotate(3deg) translateY(-0.03em);
}
.line-2 .ch:nth-child(8) > span {
  transform: rotate(-2deg);
}
.line-2 .ch:nth-child(9) > span {
  transform: rotate(4deg) translateY(-0.05em);
}

.at-sub {
  margin: 0;
  max-width: 30em;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.5;
}

.at-by {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  color: var(--muted);
}

.at-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.at-price strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--deep);
}

.at-price-note {
  font-size: 16px;
  color: var(--muted);
}

.at-price-note s {
  margin-right: 4px;
}

/* USD / MXN: a small two-way switch next to the price */
.at-cur {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-hi);
  box-shadow: 0 0 0 2px var(--lav-lt);
}

.at-cur button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.at-cur button[aria-pressed='true'] {
  background: var(--violet);
  color: #fff;
}

.at-cur button:focus-visible {
  outline: 3px solid var(--star);
  outline-offset: 2px;
}

.at-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.at-trust {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--deep);
}

.at-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.at-trust svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* The book as a floating 3D hardcover */
.at-blob {
  position: absolute;
  inset: 6% 2% 4% 6%;
  width: 92%;
  height: 90%;
}

.at-hero-star {
  position: absolute;
  animation: at-twinkle 3.4s ease-in-out infinite;
}

.at-hero-star-1 {
  left: 4%;
  top: 6%;
  width: 40px;
  height: 40px;
}

.at-hero-star-2 {
  right: 2%;
  bottom: 22%;
  width: 26px;
  height: 26px;
  animation-duration: 2.9s;
  animation-delay: 0.8s;
}

.at-book3d {
  position: relative;
  width: min(80%, 430px);
  perspective: 1500px;
  animation: at-float 6s ease-in-out infinite;
}

.at-book {
  position: relative;
  transform: rotateY(-24deg) rotateX(5deg) rotateZ(-1.5deg);
  transform-style: preserve-3d;
}

.at-book-pages {
  position: absolute;
  top: 1.6%;
  bottom: 1.6%;
  left: 4%;
  right: -16px;
  border-radius: 2px 8px 8px 2px;
  background: repeating-linear-gradient(to right, #fffdf7 0 2px, #e6e1ef 2px 3px);
  transform: translateZ(-18px);
  box-shadow: 0 30px 50px rgba(74, 67, 144, 0.28);
}

.at-book-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px 9px 9px 3px;
  box-shadow: 0 0 0 1px rgba(74, 67, 144, 0.12);
}

.at-book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7%;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(
    to right,
    rgba(53, 47, 115, 0.28),
    rgba(255, 255, 255, 0.35) 45%,
    rgba(53, 47, 115, 0.08)
  );
  pointer-events: none;
}

.at-book-shadow {
  position: absolute;
  left: 12%;
  right: 4%;
  bottom: -38px;
  height: 30px;
  border-radius: 50%;
  background: rgba(74, 67, 144, 0.18);
  filter: blur(10px);
  animation: at-shadow 6s ease-in-out infinite;
}

.at-hills {
  display: block;
  width: 100%;
  height: clamp(110px, 13vw, 190px);
  margin-top: clamp(8px, 2vw, 24px);
}

/* ─── Sections + soft wave joins ───────────────────────────────────────── */

.at-sec {
  position: relative;
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(64px, 8vw, 104px);
}

.at-wave {
  display: block;
  width: 100%;
  height: clamp(56px, 7vw, 110px);
  margin-top: -1px;
}

.at-wave--from-paper {
  background: var(--paper);
}
.at-wave--from-lav-lt {
  background: var(--lav-lt);
}
.at-wave--from-pink {
  background: var(--pink);
}

/* ─── The tetita says goodbye, mami stays ──────────────────────────────── */

.at-msg .at-wrap {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.at-msg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 80px);
}

.at-msg-copy {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.at-morph {
  position: relative;
  flex: none;
  width: clamp(200px, 24vw, 280px);
  height: clamp(200px, 24vw, 280px);
}

.at-morph svg {
  position: absolute;
}

.at-morph-blob {
  inset: 0;
  width: 100%;
  height: 100%;
}

.at-morph-heart {
  left: 18%;
  top: 18%;
  width: 64%;
  height: 64%;
  overflow: visible;
}

.at-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px 32px;
}

.at-point {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.at-point svg {
  width: 104px;
  height: 94px;
}

.at-point h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  color: var(--violet);
}

.at-point p {
  margin: 0;
  font-size: 17px;
}

/* ─── Flip-through book ────────────────────────────────────────────────── */

.at-flip {
  background: var(--lav-lt);
  padding-top: clamp(40px, 6vw, 80px);
}

.at-flip .at-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.at-flip-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 40px;
}

.at-flip-head > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
}

.at-bookframe {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  perspective: 2200px;
}

.at-fbook {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.6, 0.1, 0.3, 1);
}

.at-fbook.is-closed {
  transform: translateX(-25%);
}

.at-base {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  box-shadow: 0 18px 40px rgba(74, 67, 144, 0.2);
}

.at-base-l {
  left: 0;
  border-radius: 10px 0 0 10px;
  background: var(--paper-hi);
  transition: opacity 0.4s;
}

.at-fbook.is-closed .at-base-l {
  opacity: 0;
}

.at-base-r {
  left: 50%;
  border-radius: 0 10px 10px 0;
  background: var(--paper);
  box-shadow:
    inset 18px 0 24px -18px rgba(74, 67, 144, 0.3),
    0 18px 40px rgba(74, 67, 144, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.4vw, 16px);
  padding: 6%;
  text-align: center;
}

.at-base-r span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 2.4vw, 30px);
  line-height: 1.1;
  color: var(--violet);
}

.at-leaf {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.6, 0.1, 0.3, 1);
}

.at-leaf.is-turned {
  transform: rotateY(-180deg);
}

.at-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
}

.at-front {
  border-radius: 0 10px 10px 0;
  background: var(--paper-hi);
  box-shadow: inset 18px 0 24px -18px rgba(74, 67, 144, 0.3);
}

.at-back {
  transform: rotateY(180deg);
  border-radius: 10px 0 0 10px;
  background: var(--paper-hi);
  box-shadow: inset -18px 0 24px -18px rgba(74, 67, 144, 0.3);
}

.at-face-cover {
  padding: 0;
}

.at-face-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.at-face-end {
  flex-direction: column;
  gap: 4%;
  padding: 0;
  background: var(--paper);
}

.at-end-page-hills {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40%;
}

.at-end-page-heart {
  position: relative;
  width: 26%;
  height: auto;
  animation: at-beat 1.6s ease-in-out infinite;
}

.at-end-page-title {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 3.4vw, 44px);
  line-height: 1;
  color: var(--violet);
}

.at-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.at-controls button {
  cursor: pointer;
  border: 0;
}

.at-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

.at-prev {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--paper-hi);
  box-shadow: 0 0 0 3px var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
}

.at-next {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 0 4px var(--cream);
}

.at-dots {
  display: flex;
  align-items: center;
}

.at-dot {
  width: 40px;
  height: 44px;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.at-dot span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--lav);
  transition:
    width 0.3s,
    background 0.3s;
}

.at-dot[aria-current='true'] span {
  width: 28px;
  background: var(--violet);
}

.at-pagelabel {
  margin: -16px 0 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--deep);
}

/* ─── Who it's for ─────────────────────────────────────────────────────── */

.at-aud {
  background: var(--pink);
  padding-top: clamp(40px, 6vw, 80px);
}

.at-aud .at-wrap {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.at-aud ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 40px 28px;
}

.at-aud li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--deep);
}

.at-med {
  width: 160px;
  height: 160px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 7px var(--cream),
    0 14px 0 7px var(--pink-dot);
}

.at-med-star {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.at-med-star svg {
  width: 80px;
  height: 80px;
}

/* ─── Authors ──────────────────────────────────────────────────────────── */

.at-authors .at-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.at-authors-art {
  flex: 1 1 460px;
  min-width: 0;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.at-authors-copy {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.at-authors-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.at-authors-list h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--deep);
}

.at-authors-list p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* ─── Reviews (shown once there are real ones) + FAQ ─────────────────────── */

.at-rev {
  padding-top: 0;
}

.at-rev .at-wrap {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.at-revlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 28px;
  margin-top: 32px;
}

.at-review {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.at-review p {
  margin: 0;
  border-radius: 28px 28px 28px 6px;
  padding: 24px 26px;
  font-size: 18px;
  font-style: italic;
  color: var(--deep);
}

.at-review:nth-child(1) p {
  background: var(--pink);
}
.at-review:nth-child(2) p {
  background: var(--lime);
}
.at-review:nth-child(3) p {
  background: var(--lav-lt);
}

.at-review footer {
  padding-left: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

/* The thinking-mom illustration sits right of the questions; on phones it comes first. */
.at-faq-layout {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 40px 56px;
}

.at-faq-art {
  flex: 0 1 340px;
  min-width: 0;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.at-faq {
  flex: 1 1 520px;
  min-width: 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.at-faq details {
  background: var(--paper-hi);
  border-radius: 22px;
  padding: 18px 24px;
}

.at-faq details + details {
  margin-top: 12px;
}

.at-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 32px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--deep);
}

.at-faq summary::-webkit-details-marker {
  display: none;
}

.at-faq summary::after {
  content: '+';
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--star);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: #fff;
  transition: transform 0.3s;
}

.at-faq details[open] summary::after {
  transform: rotate(45deg);
}

.at-faq details p {
  margin: 12px 0 0;
  font-size: 17px;
}

/* ─── Final offer, at bedtime ──────────────────────────────────────────── */

.at-end {
  position: relative;
  overflow: hidden;
  background: var(--lav);
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
}

.at-end-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.at-end-deco > * {
  position: absolute;
}

.at-moon {
  right: 7%;
  top: 5%;
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 0 16px rgba(238, 223, 180, 0.8));
}

.at-end-star-1 {
  left: 6%;
  top: 8%;
  width: 30px;
  height: 30px;
  animation: at-twinkle 2.4s ease-in-out infinite;
}

.at-end-star-2 {
  left: 48%;
  top: 4%;
  width: 22px;
  height: 22px;
  animation: at-twinkle 2.7s ease-in-out 1.4s infinite;
}

.at-once {
  position: relative;
  margin: 0 auto 28px;
  max-width: 1000px;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  color: var(--night);
}

.at-offer {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--paper-hi);
  border-radius: 44px;
  box-shadow:
    0 0 0 8px var(--cream),
    0 30px 60px rgba(53, 47, 115, 0.25);
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.at-offer-book {
  position: relative;
  flex: 0 1 300px;
  min-width: 0;
  margin: 0 auto;
}

.at-offer-book img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    8px 8px 0 var(--lav-lt),
    0 18px 34px rgba(53, 47, 115, 0.25);
  animation: at-bob 6s ease-in-out infinite;
}

.at-offer-copy {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--night);
}

.at-offer-copy .at-h2 {
  font-size: clamp(32px, 4vw, 50px);
}

.at-offer-copy ul {
  margin: 4px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.at-offer-copy li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 17px;
}

.at-offer-copy li svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
}

.at-offer-copy p {
  margin: 0;
  font-size: 15px;
}

.at-end-hills {
  display: block;
  width: calc(100% + 2 * var(--gutter));
  height: clamp(90px, 11vw, 170px);
  margin: clamp(40px, 6vw, 72px) calc(-1 * var(--gutter)) 0;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

.at-footer {
  background: var(--pink);
  color: var(--night);
  padding: 8px var(--gutter) 40px;
  font-size: 15px;
}

.at-footer .at-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.at-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.at-footer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--violet);
}

.at-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.at-footer a {
  display: inline-block;
  padding: 10px 0;
  color: var(--night);
}

.at-footer p {
  margin: 0;
  max-width: 60em;
}

/* ─── Sticky buy bar (phones; slides in once the hero button scrolls away) ─ */

.at-stickybuy {
  display: none;
}

.at-stickybuy img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}

.at-stickybuy div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.at-stickybuy b {
  font-family: var(--display);
  font-size: 16px;
  color: var(--violet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.at-stickybuy div > span {
  font-size: 14px;
  font-weight: 800;
  color: var(--deep);
}

/* ─── 404 ──────────────────────────────────────────────────────────────── */

.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px var(--gutter);
  text-align: center;
}

/* ─── Phones ───────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .at-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'title'
      'book'
      'buy';
    row-gap: 14px;
    text-align: center;
  }

  .at-hero-title,
  .at-hero-buy {
    align-items: center;
  }

  .at-hero-book {
    min-height: 0;
    padding: 18px 0 30px;
  }

  .at-book3d {
    width: min(64%, 250px);
  }

  .at-sub {
    font-size: 17px;
  }

  .at-price strong {
    font-size: 38px;
  }

  .at-cta,
  .at-price,
  .at-trust {
    justify-content: center;
  }

  /* "Comprar la edición digital" stays on one line at 360px. */
  .at-btn-xl {
    width: 100%;
    max-width: 360px;
    padding: 0 18px;
    font-size: clamp(16px, 4.8vw, 20px);
    white-space: nowrap;
  }

  .at-hide-sm {
    display: none !important;
  }

  body {
    padding-bottom: 84px;
  }

  .at-stickybuy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(247, 248, 251, 0.97);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 24px rgba(74, 67, 144, 0.18);
    transform: translateY(120%);
    transition: transform 0.35s cubic-bezier(0.3, 1.3, 0.5, 1);
  }

  .at-stickybuy.is-visible {
    transform: none;
  }
}

/* ─── Motion ───────────────────────────────────────────────────────────── */

@keyframes at-pop {
  0% {
    transform: translateY(-0.6em) scale(0.3);
    opacity: 0;
  }
  60% {
    transform: translateY(0.06em) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes at-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
@keyframes at-shadow {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(0.88);
    opacity: 0.7;
  }
}
@keyframes at-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(0);
  }
}
@keyframes at-twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
  }
  50% {
    transform: scale(0.7) rotate(18deg);
  }
}
@keyframes at-beat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.15);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ─── Digital edition: buy link, thank-you page (/gracias), reader (/leer) ── */

/* Buttons and boxes set their own display, which would beat the hidden attribute. */
[hidden] {
  display: none !important;
}

.at-compra-msg {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  color: var(--deep);
}

button.at-btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

button.at-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Short pages: the footer sits at the bottom of the screen, not mid-page. */
.at-plain {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.at-plain main {
  flex: 1 0 auto;
}

.at-solo {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.at-loading {
  margin: 0;
  padding: 64px var(--gutter);
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

.at-recover {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-weight: 700;
}

.at-recover-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.at-recover input:not([type='checkbox']) {
  min-width: 0;
  min-height: 48px;
  padding: 0 18px;
  border: 3px solid var(--lav-lt);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

/* Side by side with its button on /leer; on its own line in a stacked form. */
.at-recover-row input {
  flex: 1 1 220px;
}

.at-recover input:focus-visible {
  outline: 3px solid var(--star);
  outline-offset: 2px;
}

.at-readerpage {
  padding: 4px var(--gutter) 48px;
}

.at-reader {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.at-reader-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.at-reader-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  color: var(--violet);
}

.at-reader-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.at-iconbtn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--paper-hi);
  color: var(--deep);
  box-shadow: 0 0 0 3px var(--lav-lt);
  cursor: pointer;
}

/* The page sits on the cream "mat" of the buttons, like the book's own cover edge. */
.at-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'prev page next';
  align-items: center;
  gap: 14px;
  touch-action: pan-y;
  user-select: none;
}

.at-stage:fullscreen {
  padding: 16px;
  background: var(--night);
}

.at-stage-page {
  grid-area: page;
  margin: 0;
  display: flex;
  justify-content: center;
}

.at-stage-page img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 240px);
  max-height: calc(100dvh - 240px);
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 0 0 5px var(--cream),
    0 12px 0 5px var(--cream-edge);
}

.at-stage:fullscreen .at-stage-page img {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border-radius: 8px;
  box-shadow: none;
}

.at-stage-nav {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 4px var(--cream);
  cursor: pointer;
}

.at-stage-nav[data-prev] {
  grid-area: prev;
}

.at-stage-nav[data-next] {
  grid-area: next;
}

.at-stage-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.at-stage-count {
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--muted);
}

.at-reader-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.at-optin {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
}

.at-optin input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--violet);
}

.at-btn-quiet {
  background: var(--paper-hi);
  color: var(--deep);
  box-shadow:
    0 0 0 3px var(--lav-lt),
    0 0 0 4px var(--cream);
}

.at-recover select {
  min-height: 48px;
  padding: 0 18px;
  border: 3px solid var(--lav-lt);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.at-recover select:focus-visible {
  outline: 3px solid var(--star);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .at-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'page page'
      'prev next';
  }

  .at-stage-nav[data-prev] {
    justify-self: start;
  }

  .at-stage-nav[data-next] {
    justify-self: end;
  }

  .at-stage-page img {
    max-height: calc(100dvh - 300px);
  }
}

/* ─── Legal pages (/privacidad, /terminos) ─────────────────────────────── */

.at-legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
  line-height: 1.6;
}

.at-legal h1 {
  margin: 0 0 8px;
}

.at-legal h2 {
  margin: 32px 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--deep);
}

.at-legal p,
.at-legal li {
  color: var(--ink);
}

.at-legal ul {
  padding-left: 22px;
}

/* ─── The other pages in the home page's look ──────────────────────────────
 * Thank-you, reader, authors, terms, privacy and not-found keep their own layout but
 * take the home page's dress (home.css): ink lettering without the cream outline, ink
 * buttons, a cream band on top and a plain white foot.
 */

body:not(.hm) .at-outl,
body:not(.hm) .at-outl-sm {
  text-shadow: none;
}

body:not(.hm) .at-brand,
body:not(.hm) .at-h2,
body:not(.hm) .at-reader-title,
body:not(.hm) .at-legal h1,
body:not(.hm) .at-legal h2 {
  color: #2f2a5c;
}

body:not(.hm) .at-brand svg,
body:not(.hm) .at-solo-star {
  display: none;
}

body:not(.hm) .at-header {
  margin-bottom: 28px;
  background: #f7f6dc;
  border-radius: 0 0 50% 50% / 0 0 22px 22px;
}

body:not(.hm) .at-btn {
  background: #2f2a5c;
  border-color: transparent;
  box-shadow: none;
}

body:not(.hm) .at-btn:hover {
  background: #1f1b45;
  transform: none;
}

body:not(.hm) .at-footer {
  padding-top: 24px;
  background: #fff;
  border-top: 1px solid #eceaf6;
  color: #6a6593;
}
