/* ==========================================================================
   Spanish Word Search — styles
   Palette follows the covers: lavender (Vol. 1), sky blue (Vol. 2), sun (Vol. 3)
   ========================================================================== */
:root {
  --paper: #fbf8f3;
  --paper-2: #f3eee6;
  --ink: #2a2140;
  --ink-2: #4c4560;
  --ink-3: #7a7489;
  --line: rgba(42,33,64,.12);
  --purple: #5b3d8f;
  --purple-d: #47306f;
  --lav: #c9b6e4;
  --sky: #a9d5f1;
  --sun: #f8d36a;
  --pink: #f2a9b8;
  --mint: #9fd8cc;
  --f-display: "Oswald", "Arial Narrow", sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(42,33,64,.06), 0 18px 40px -22px rgba(42,33,64,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--f-body); -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -.005em; }
p { margin: 0; }
.container { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--f-body); text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 10px 22px -12px rgba(91,61,143,.8); }
.btn-primary:hover { background: var(--purple-d); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-soon { background: var(--paper-2); color: var(--ink-3); cursor: default; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(251,248,243,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--purple); color: #fff; font: 700 22px/1 var(--f-display);
}
.brand-name { font: 500 19px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.brand-name b { font-weight: 700; color: var(--purple); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn) { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav-links a:not(.btn):hover { color: var(--ink); background: rgba(42,33,64,.05); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  background:
    radial-gradient(50% 60% at 85% 35%, rgba(201,182,228,.35), transparent 70%),
    radial-gradient(40% 50% at 5% 95%, rgba(169,213,241,.3), transparent 70%),
    var(--paper);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero-title { font-size: clamp(48px, 6.4vw, 88px); line-height: .98; text-transform: uppercase; color: var(--purple); }
.hero-title .hl {
  background: linear-gradient(transparent 58%, var(--pink) 58%, var(--pink) 92%, transparent 92%);
  padding-inline: .05em; color: var(--ink);
}
.hero-sub { margin-top: -8px; font: 500 clamp(20px, 2vw, 24px)/1.2 var(--f-body); color: var(--ink-2); }
.hero-lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 0; }
.hero-stats li { display: flex; flex-direction: column; gap: 2px; padding-right: clamp(18px, 3vw, 36px); }
.hero-stats li + li { padding-left: clamp(18px, 3vw, 36px); border-left: 1px solid var(--line); }
.hero-stats strong { font: 600 clamp(26px, 2.6vw, 32px)/1 var(--f-display); }
.hero-stats span { font-size: 14px; color: var(--ink-3); }

/* cover lying on a real puzzle page */
.hero-visual { position: relative; aspect-ratio: 600 / 560; max-width: 580px; width: 100%; justify-self: center; }
.desk-page {
  position: absolute; right: 2%; top: 2%; width: 60%;
  background: #fff; border-radius: 2px; transform: rotate(3deg);
  box-shadow: 0 1px 2px rgba(42,33,64,.08), 0 30px 50px -24px rgba(42,33,64,.35);
}
.desk-page img { width: 100%; height: auto; }
.desk-cover {
  position: absolute; left: 4%; bottom: 2%; width: 54%;
  border-radius: 2px 5px 5px 2px; overflow: hidden; transform: rotate(-4deg);
  outline: 1px solid transparent; backface-visibility: hidden;
  box-shadow: 0 2px 3px rgba(42,33,64,.12), 0 40px 60px -22px rgba(42,33,64,.5);
}
.desk-cover img { width: 100%; aspect-ratio: 900 / 1165; object-fit: cover; }
.desk-cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(255,255,255,.18) 1.5%, transparent 4%);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 620px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.kicker { font: 600 13px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--purple); }
.section-head h2 { font-size: clamp(36px, 4.4vw, 56px); text-transform: uppercase; }
.section-lead { font-size: 18px; color: var(--ink-2); }

/* how it works + video */
.how { background: #fff; border-block: 1px solid var(--line); }
.how-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.how .section-head { margin-bottom: 0; }
.steps { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; color: var(--ink-2); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 600 16px/1 var(--f-display);
}
.steps li:nth-child(1)::before { background: var(--lav); }
.steps li:nth-child(2)::before { background: var(--sky); }
.steps li:nth-child(3)::before { background: var(--sun); }
.steps b { color: var(--ink); }
.video-frame { margin: 0; }
.video-frame video { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--paper-2); }
.video-frame figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-3); text-align: center; }

/* books */
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 32px); }
.book {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.book:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover { background: var(--c); padding: 32px 18% 0; }
.book-cover img {
  width: 100%; border-radius: 2px 4px 0 0;
  box-shadow: 0 -2px 0 rgba(255,255,255,.4), 0 18px 34px -16px rgba(0,0,0,.4);
}
.book-body { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 28px; flex: 1; }
.book-level { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-c); }
.book h3 { font-size: 28px; text-transform: uppercase; }
.book-tagline { font-weight: 600; color: var(--ink); }
.book-desc { font-size: 15px; color: var(--ink-2); }
.book-features { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.book-features li { position: relative; padding-left: 22px; }
.book-features li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--a);
}
.book .btn { margin-top: auto; align-self: flex-start; }

/* look inside */
.inside { background: var(--paper-2); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.tabs button {
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font: 600 15px/1 var(--f-body); color: var(--ink-2); transition: background .25s, border-color .25s, color .25s;
}
.tabs button[aria-selected="true"] { background: var(--c); border-color: var(--c); color: var(--ink-c); }
.pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.page { margin: 0; }
.page img { width: 100%; height: auto; background: #fff; border-radius: 3px; box-shadow: var(--shadow); cursor: zoom-in; }
.page figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--ink-3); }
.inside-note { margin-top: 20px; text-align: center; font-size: 14px; color: var(--ink-3); }

/* faq */
.faq-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; }
.faq-list summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font: 500 22px/1 var(--f-display); color: var(--purple); transition: transform .25s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin-top: 10px; color: var(--ink-2); }

/* footer */
.site-footer { padding: 36px 0; border-top: 1px solid var(--line); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.muted { color: var(--ink-3); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(20,16,32,.82); }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; width: auto; background: #fff; border-radius: 3px; }
.lightbox-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links a:not(.btn) { display: none; }
  .hero-inner, .how-inner, .faq-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 440px; }
  .books { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { font-size: 16px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .pages { grid-template-columns: 1fr 1fr; }
  .pages .page:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
