/* Club Gatófilos — estilos del sitio.
   Paleta: crema de jardín, naranja de gato atigrado, verde hierba gatera. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fbf4e9;
  --paper: #fffdf8;
  --ink: #3a2c22;
  --ink-soft: #6b5a4c;
  --line: #eadcc6;
  --orange: #e8743b;
  --orange-dark: #c4571f;
  --green: #5e9a6b;
  --green-dark: #44784f;
  --green-soft: #d6e6cb;
  --pink: #f2a7a0;
  --gold: #c9a227;
  --accent: var(--orange);
  --radius: 22px;
  --shadow: 0 2px 0 var(--ink), 0 14px 30px -18px rgba(58, 44, 34, 0.45);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  /* Las cartas van ligeramente giradas: que no generen scroll horizontal. */
  overflow-x: clip;
}

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

a {
  color: var(--orange-dark);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}
h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
}
h3 {
  font-size: 1.3rem;
}
h1 em,
h2 em {
  color: var(--orange);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap {
    padding: 0 28px;
  }
}
.narrow {
  max-width: 720px;
}

.kicker {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--green-dark);
  margin-bottom: 0.6em;
}
.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.muted {
  color: var(--ink-soft);
}
.small {
  font-size: 0.9rem;
}
.sr-only,
.hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 50;
}
.skip:focus {
  left: 8px;
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ── Cabecera ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 244, 233, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 40px;
  height: 40px;
  transition: transform 0.3s;
}
.brand:hover .logo-mark {
  transform: rotate(-8deg);
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  white-space: nowrap;
}
.brand-name b {
  color: var(--orange);
}
.btn.btn-sm {
  font-size: 0.9rem;
  padding: 8px 16px;
  box-shadow: none;
}
.page-test .header-cta {
  display: none;
}
@media (max-width: 380px) {
  .brand-name {
    font-size: 1.1rem;
  }
}

/* ── Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 800 1rem/1.2 var(--sans);
  padding: 13px 22px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: center;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 0 var(--ink);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
}
.btn-ghost:hover {
  background: #fff;
  transform: translateY(-1px);
}
.btn-lg {
  font-size: 1.1rem;
  padding: 16px 28px;
}
.btn-link {
  background: none;
  border: 0;
  color: var(--ink-soft);
  font: 700 0.95rem var(--sans);
  cursor: pointer;
  padding: 8px 0;
}
.btn-link:hover {
  color: var(--ink);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: 48px 0;
}
@media (min-width: 900px) {
  .section {
    padding: 72px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── Formularios ────────────────────────────────────────── */
input[type="email"],
input[type="text"] {
  width: 100%;
  font: 600 1.05rem var(--sans);
  padding: 13px 16px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
}
input::placeholder {
  color: #b3a594;
}
.field {
  display: block;
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}
.field > span,
.field legend {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.field-row input {
  flex: 1 1 220px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--orange);
  flex: none;
}
.form-msg {
  min-height: 1.4em;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 6px 0 10px;
}
.form-msg.is-error {
  color: #b3261e;
}
.form-msg.is-ok {
  color: var(--green-dark);
}

.toggle {
  display: inline-flex;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.toggle input,
.coat input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle span {
  display: block;
  padding: 10px 26px;
  font-weight: 800;
  cursor: pointer;
}
.toggle input:checked + span {
  background: var(--ink);
  color: var(--paper);
}
.toggle input:focus-visible + span {
  outline: 3px solid var(--orange);
  outline-offset: -5px;
}

.coats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 420px) {
  .coats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.coat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border-radius: 16px;
  border: 2.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.coat:hover {
  transform: translateY(-2px);
}
.coat-art svg {
  width: 72px;
  height: auto;
}
.coat-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
.coat:has(input:checked) {
  border-color: var(--ink);
  background: #fff4e8;
  box-shadow: 0 3px 0 var(--ink);
}
.coat:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ── Test ───────────────────────────────────────────────── */
.quiz-app {
  padding: 32px 0 56px;
}
.test-hero {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 960px) {
  .quiz-app {
    padding-top: 56px;
  }
  .test-hero {
    grid-template-columns: 1.05fr 1fr;
  }
}
.facts {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.mini-deck {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mini-card {
  position: relative;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.2s;
}
.mini-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1.5px solid var(--accent);
  border-radius: 11px;
  pointer-events: none;
}
.mini-card:nth-child(odd) {
  transform: rotate(-1.5deg);
}
.mini-card:nth-child(even) {
  transform: rotate(1.5deg);
}
.mini-card:hover {
  transform: translateY(-4px) rotate(0);
}
.mini-card a {
  display: block;
  padding: 22px 6px 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 14px;
}
.mini-card.is-current {
  background: #fff4e8;
  box-shadow: 0 3px 0 var(--accent);
}
.mini-deck-wide {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.mini-card svg {
  width: 78%;
  margin: 0 auto;
  height: auto;
}
.mini-numeral {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  font: italic 600 0.85rem var(--serif);
  color: var(--accent);
}
.mini-title {
  display: block;
  font: 700 0.82rem/1.2 var(--serif);
  margin-top: 4px;
}

.science {
  margin-top: 56px;
  padding: 28px 22px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 28px;
}
@media (min-width: 860px) {
  .science {
    padding: 40px;
  }
}
.science-grid {
  display: grid;
  gap: 8px 40px;
}
@media (min-width: 860px) {
  .science-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.dimensions {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid var(--ink);
  vertical-align: -1px;
}

.panel {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  padding: 26px 20px;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .panel {
    padding: 40px;
  }
}

.progress {
  margin-bottom: 22px;
}
.progress-bar {
  height: 14px;
  border-radius: 999px;
  background: #efe6d8;
  border: 2px solid var(--ink);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 10px, #ef8a55 10px 20px);
  transition: width 0.35s ease;
}
.progress-label {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 8px 0 0;
}
.question {
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  margin-bottom: 22px;
  outline: none;
}
.options {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: 700 1.02rem/1.35 var(--sans);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 16px;
  border: 2.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.option:hover {
  border-color: var(--ink);
  transform: translateX(3px);
}
.option-key {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  font-size: 0.85rem;
  font-weight: 900;
  background: var(--cream);
}
.option.is-selected {
  border-color: var(--ink);
  background: #fff1e4;
}
.option.is-selected .option-key {
  background: var(--orange);
  color: #fff;
}
.option-na {
  border-style: dashed;
  color: var(--ink-soft);
}

.gate {
  display: grid;
  gap: 28px;
  align-items: center;
}
@media (min-width: 720px) {
  .gate {
    grid-template-columns: 200px 1fr;
  }
}
.card-back {
  width: 170px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0 30%, transparent 31%),
    repeating-linear-gradient(45deg, var(--orange) 0 12px, #ef8a55 12px 24px);
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 var(--ink);
  animation: wiggle 3s ease-in-out infinite;
}
.card-back::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
}
.card-back-paw {
  font-size: 3rem;
}
.card-back-q {
  position: absolute;
  bottom: 14px;
  font: italic 700 1.6rem var(--serif);
  color: #fff;
}
@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg) translateY(-4px);
  }
}

/* ── Resultado ──────────────────────────────────────────── */
.page-result main {
  padding: 28px 0 56px;
}
.banner {
  margin: 0 0 20px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 2px solid var(--ink);
  background: #fff4e0;
  font-weight: 800;
}
.result {
  display: grid;
  gap: 32px;
  align-items: start;
}
@media (min-width: 960px) {
  .result {
    grid-template-columns: 430px 1fr;
    gap: 56px;
  }
  .result-card {
    position: sticky;
    top: 88px;
  }
}
.card-frame {
  margin: 0 auto;
  max-width: 430px;
  aspect-ratio: 1080 / 1350;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px -20px rgba(58, 44, 34, 0.6);
  background: var(--paper);
  border: 3px solid var(--ink);
  animation: reveal 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.card-frame:has(img) {
  border: 0;
  background: none;
}
.card-frame img {
  width: 100%;
  height: 100%;
}
.card-placeholder {
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 22%, var(--paper)) 0 42%, var(--paper) 43%);
  display: grid;
  place-items: center;
  height: 100%;
  position: relative;
  padding: 18%;
}
@keyframes reveal {
  from {
    transform: rotateY(90deg) scale(0.9);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.share {
  margin: 18px auto 0;
  max-width: 430px;
  display: grid;
  gap: 10px;
}
.share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.share-links a,
.share-links button {
  font: 800 0.9rem var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  cursor: pointer;
}
.share-links a:hover,
.share-links button:hover {
  background: #fff;
}
.share .small,
.share .form-msg {
  text-align: center;
  margin: 0;
}

.result-title {
  font-size: clamp(2rem, 5vw, 3rem);
}
.result-title em {
  color: var(--accent);
  display: block;
}
.result-tagline {
  font: italic 600 1.3rem var(--serif);
  color: var(--accent);
}
.result-body h2 {
  font-size: 1.45rem;
  margin-top: 1.6em;
}
.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
}
.traits {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 18px;
}
.trait {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--paper);
  border: 2px solid var(--line);
}
.trait p {
  margin: 8px 0 0;
}
.trait-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.trait-scale {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 700;
}
.trait-scale span + span::before {
  content: "↔ ";
}
.bar {
  height: 14px;
  border-radius: 999px;
  background: #efe6d8;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.tip {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.care {
  padding-left: 1.2em;
}
.care li {
  margin-bottom: 6px;
}
.care li::marker {
  content: "🐾  ";
}
.result-cta {
  margin: 36px 0 20px;
}

/* ── Páginas de texto ───────────────────────────────────── */
.prose h2 {
  font-size: 1.35rem;
  margin-top: 1.6em;
}
.lost {
  text-align: center;
}
.lost-code {
  font: 700 clamp(4rem, 18vw, 8rem) / 1 var(--serif);
  color: var(--orange);
  margin: 0 0 12px;
}
.lost-code span {
  display: inline-block;
  font-size: 0.6em;
  animation: wiggle 2.5s ease-in-out infinite;
}
.notice {
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff4e0;
  border: 2px solid var(--ink);
}

/* ── Pie ────────────────────────────────────────────────── */
.site-footer {
  margin-top: 40px;
  background: var(--green-soft);
  border-top: 2.5px solid var(--ink);
  position: relative;
  padding: 36px 0 24px;
}
/* Borde superior en arcos, como un seto. */
.grass {
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: radial-gradient(circle at 12px 22px, var(--green-soft) 12px, transparent 13px) 0 0 / 24px 20px repeat-x;
}
.footer-inner {
  display: grid;
  gap: 20px;
}
@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr;
  }
}
.footer-inner p {
  max-width: 44ch;
  margin-top: 10px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.footer-links a {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.footer-note {
  font-size: 0.85rem;
  margin-top: 24px;
}

.subscribe-form {
  position: relative;
}

/* ── Foto del gato ──────────────────────────────────────── */
.photo-step {
  text-align: center;
}
.photo-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 20px 0 6px;
  cursor: pointer;
}
.photo-drop input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.photo-drop:has(input:focus-visible) .btn {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.photo-preview {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px dashed var(--ink-soft);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.photo-preview:has(img) {
  border: 5px solid var(--orange);
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-empty {
  font-size: 3.4rem;
  opacity: 0.6;
}
.photo-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

/* ── Preguntas frecuentes y páginas de tipo ─────────────── */
.faq {
  margin-top: 48px;
}
.faq-item {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  font: 700 1.1rem/1.3 var(--serif);
  position: relative;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font: 800 1.4rem var(--sans);
  color: var(--orange);
}
.faq-item[open] summary::after {
  content: "–";
}
.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--ink-soft);
}
.breadcrumbs {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.breadcrumbs a {
  color: var(--ink-soft);
}
.result-seo {
  display: block;
  font-size: 0.5em;
  margin-top: 10px;
  color: var(--ink-soft) !important;
  font-weight: 600;
}
.other-types h2 {
  margin-bottom: 20px;
}
.photo-add {
  position: relative;
  cursor: pointer;
}
.photo-add input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.photo-add:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
