/* ==========================================================================
   Ana Isabel Dorado · "Azulejo y tinta"
   Papel crema + mosaico mediterráneo + trazo de pincel.
   Movimiento: fluido y artesanal (una sola curva, entradas cortas).
   Índice: 1 Tokens · 2 Base · 3 Componentes · 4 Secciones · 5 Movimiento · 6 Responsive
   ========================================================================== */

/* ------------------------------ 1. TOKENS ------------------------------ */
:root {
  /* Color por roles (60 / 30 / 10: papel / mar / naranja) */
  --paper:      #FAF5EA;
  --paper-2:    #F2E6CF;
  --peach:      #FFE6CC;
  --ink:        #3B2A21;
  --ink-soft:   #66524A;
  --sea:        #0E7C86;
  --sea-deep:   #0B5560;
  --sea-pale:   #CFEBE7;
  --sun:        #F6D56B;
  --orange:     #D9805F;   /* terracota del logo */
  --orange-deep:#8E3E22;   /* texto naranja sobre papel (contraste ≥ 4.5) */
  --tile-blue:  #1F4E9C;
  --red:        #C8382B;
  --line:       rgba(59, 42, 33, .16);
  --gold:       #A8873A;

  /* Tipografía: escala modular fluida (~1.25) */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand:    "Caveat", "Segoe Print", cursive;
  --step--1: clamp(.875rem, .85rem + .12vw, .95rem);
  --step-0:  clamp(1.0625rem, 1.02rem + .2vw, 1.1875rem);
  --step-1:  clamp(1.3rem, 1.2rem + .5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1vw, 1.95rem);
  --step-3:  clamp(2rem, 1.6rem + 1.8vw, 2.6rem);
  --step-4:  clamp(2.5rem, 1.9rem + 3vw, 3.6rem);
  --step-5:  clamp(3rem, 2rem + 5vw, 5rem);
  --step-6:  clamp(3.5rem, 1.8rem + 8.5vw, 8.25rem);

  /* Espaciado: múltiplos de 8 */
  --s1: .5rem;  --s2: 1rem;  --s3: 1.5rem;  --s4: 2rem;
  --s6: 3rem;   --s8: 4rem;  --s12: 6rem;
  --section: clamp(5rem, 9vw, 8rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1200px;

  /* Forma */
  --r-sm: 12px;  --r: 24px;  --r-lg: 40px;
  --shadow-1: 0 2px 6px rgba(59,42,33,.08), 0 8px 24px rgba(59,42,33,.08);
  --shadow-2: 0 4px 10px rgba(59,42,33,.10), 0 24px 48px rgba(59,42,33,.16);

  /* Movimiento: una sola personalidad */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --t: .7s;

  /* Azulejo (patrón) — SVG inline, sin archivos extra */
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23FAF5EA'/%3E%3Cpath d='M32 4 60 32 32 60 4 32Z' fill='none' stroke='%231F4E9C' stroke-width='2.5'/%3E%3Cpath d='M32 14 50 32 32 50 14 32Z' fill='%23CFEBE7'/%3E%3Ccircle cx='32' cy='32' r='7' fill='%23D9805F'/%3E%3Cg fill='%230E7C86'%3E%3Ccircle cx='32' cy='9' r='3'/%3E%3Ccircle cx='32' cy='55' r='3'/%3E%3Ccircle cx='9' cy='32' r='3'/%3E%3Ccircle cx='55' cy='32' r='3'/%3E%3C/g%3E%3Cg fill='%23F6D56B'%3E%3Ccircle cx='0' cy='0' r='6'/%3E%3Ccircle cx='64' cy='0' r='6'/%3E%3Ccircle cx='0' cy='64' r='6'/%3E%3Ccircle cx='64' cy='64' r='6'/%3E%3C/g%3E%3C/svg%3E");
  --tile-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%233B2A21'/%3E%3Cpath d='M32 4 60 32 32 60 4 32Z' fill='none' stroke='%2358a3aa' stroke-width='2.5'/%3E%3Cpath d='M32 14 50 32 32 50 14 32Z' fill='%230B5560'/%3E%3Ccircle cx='32' cy='32' r='7' fill='%23D9805F'/%3E%3Cg fill='%23F6D56B'%3E%3Ccircle cx='32' cy='9' r='3'/%3E%3Ccircle cx='32' cy='55' r='3'/%3E%3Ccircle cx='9' cy='32' r='3'/%3E%3Ccircle cx='55' cy='32' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* ------------------------------- 2. BASE ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 var(--s2); }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; }
em { font-style: italic; }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s2); top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .75rem 1rem; border-radius: var(--r-sm); transition: top .2s; }
.skip:focus { top: var(--s2); }

:focus-visible { outline: 3px solid var(--tile-blue); outline-offset: 3px; border-radius: 6px; }
.orders :focus-visible, .about :focus-visible, .site-footer :focus-visible { outline-color: var(--sun); }

.hand { font-family: var(--font-hand); font-weight: 700; line-height: 1.15; }
.kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-deep); margin-bottom: var(--s2); display: flex; align-items: center; gap: .75rem; }
.kicker::before { content: ""; width: 2rem; height: 3px; border-radius: 3px; background: currentColor; }
.h2 { font-size: var(--step-5); margin-bottom: var(--s3); }
.h2 em { color: var(--sea); font-weight: 500; }
.h3 { font-size: var(--step-4); margin-bottom: var(--s2); }
.h4 { font-size: var(--step-2); }
.h5 { font-size: var(--step-1); font-weight: 600; line-height: 1.2; }
.lead { font-size: var(--step-1); line-height: 1.5; max-width: 34ch; }
.section { padding-block: var(--section); position: relative; }
.section-head { margin-bottom: var(--s8); }

/* ---------------------------- 3. COMPONENTES --------------------------- */

/* Botones: relleno que barre + flecha que se desplaza */
.btn {
  --bg: var(--paper); --fg: var(--ink); --sweep: var(--sun);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.6rem; min-height: 48px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--sweep); transform: translateX(-101%); transition: transform .5s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn .arr { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover .arr, .btn:focus-visible .arr, .link-arrow:hover .arr { transform: translateX(6px); }
.btn-primary { --bg: var(--orange); --sweep: var(--sun); }
.btn-ghost { --bg: transparent; --sweep: var(--sea-pale); }
.btn-lg { padding: 1.15rem 2.1rem; font-size: 1.125rem; }
.btn.is-pending { border-style: dashed; }

.link-arrow { display: inline-flex; gap: .4rem; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--orange); padding-bottom: 2px; }
.link-arrow .arr { transition: transform .35s var(--ease); }

/* Etiquetas de estado: forma + texto + color (no solo color) */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .8rem .3rem .6rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 700; line-height: 1.2; letter-spacing: .01em;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
}
.badge::before { content: ""; width: .6rem; height: .6rem; flex: none; background: currentColor; }
.b-disponible { background: var(--sea-deep); color: #fff; border-color: var(--sea-deep); }
.b-disponible::before { border-radius: 50%; }
.b-personalizable { background: var(--sun); }
.b-personalizable::before { border-radius: 2px; transform: rotate(45deg) scale(.9); }
.b-ejemplo { background: var(--paper); }
.b-ejemplo::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* Cinta de azulejo */
.tile-band { height: 32px; background: var(--tile) 0 0 / 32px 32px repeat-x; position: relative; z-index: 2; }
.tile-band-dark { background-image: var(--tile-dark); }

/* Cabecera fija que se reduce */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease); padding-block: 20px; }
.site-header.is-small { background: rgba(251, 244, 228, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); padding-block: 8px; }
.header-inner { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.brand-mark { border-radius: 10px; transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-name { background: var(--paper); padding: .25rem .8rem; border-radius: 999px; transition: background .4s; }
.is-small .brand-name { background: transparent; padding-inline: 0; }
.brand-name em { color: var(--orange-deep); }

.main-nav ul { display: flex; align-items: center; gap: .25rem; }
.main-nav a { display: block; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; transition: background .3s; }
.main-nav a:hover { background: var(--sea-pale); }
.main-nav a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.main-nav .nav-cta { background: var(--orange); }
.main-nav .nav-cta:hover { background: var(--sun); }
.main-nav .nav-cta[aria-current="true"] { background: var(--ink); }
.site-header:not(.is-small) .main-nav ul { background: var(--paper); padding: .35rem; border-radius: 999px; box-shadow: var(--shadow-1); }

.menu-toggle { display: none; position: relative; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer; }
.menu-toggle .bars { position: absolute; inset: 0; display: grid; place-content: center; gap: 5px; }
.menu-toggle i { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .4s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --------------------------- 4. SECCIONES ------------------------------ */

/* SOBRE MÍ */
.about { background: var(--sea-deep); color: var(--paper); overflow: clip; }
.about .kicker { color: var(--sun); }
.about .h2 em { color: var(--sun); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
.portrait { margin: 0; position: relative; justify-self: center; max-width: 340px; }
.polaroid { background: var(--paper); padding: 14px 14px 8px; border-radius: 6px; box-shadow: var(--shadow-2); transform: rotate(-3deg); color: var(--ink); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%; border-radius: 2px; }
.polaroid figcaption { font-size: 1.9rem; text-align: center; padding-top: .35rem; }
.tape { position: absolute; top: -14px; left: 50%; width: 110px; height: 32px; background: rgba(246, 213, 107, .85); transform: translateX(-50%) rotate(4deg); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.about-text p { max-width: 52ch; }
.about-text .lead { max-width: 30ch; margin-bottom: var(--s3); }
.sign { font-size: var(--step-3); color: var(--sun); margin-top: var(--s3); transform: rotate(-2deg); transform-origin: left; }

/* LIBROS */
.books { background: var(--paper); overflow-x: clip; }
.book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6) var(--s8); align-items: center; margin-bottom: var(--s12); }
.book:last-child { margin-bottom: 0; }
.book-rev .book-stage { order: 2; }
.book-rev .book-info { order: 1; }
.book-rev .compare { order: 3; }
.book-stage { perspective: 1100px; display: grid; place-items: center; }
.cover-stack { position: relative; width: min(100%, 300px); aspect-ratio: 2 / 3; }
.cover { position: absolute; border-radius: 4px 10px 10px 4px; box-shadow: var(--shadow-2); }
.cover.front { inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: transform .6s var(--ease); will-change: transform; border-left: 6px solid rgba(0,0,0,.35); }
.cover.back { inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transform: translate(26%, 3%) rotate(7deg); transition: transform .7s var(--ease); }
.cover-stack:hover .cover.back { transform: translate(40%, 1%) rotate(11deg); }
.specs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: var(--s3); }
.specs li { padding: .45rem 1rem; border-radius: 999px; background: var(--paper-2); font-size: 1rem; }
.specs strong { font-weight: 700; }
.label { font-family: var(--font-body); font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); margin-bottom: .5rem; }
.placeholder { background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(232,116,42,.1) 10px 20px); border: 2px dashed var(--orange-deep); padding: var(--s2); border-radius: var(--r-sm); color: var(--ink-soft); max-width: 56ch; }
.pull { margin: 0 0 var(--s3); padding-left: var(--s3); border-left: 5px solid var(--orange); max-width: 36ch; }
.pull p { font-family: var(--font-display); font-style: italic; font-size: var(--step-2); line-height: 1.2; margin-bottom: .4rem; }
.pull cite { font-size: var(--step--1); color: var(--ink-soft); font-style: normal; }

.compare { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s3); margin-top: var(--s2); }
.deal { border: 2px solid var(--ink); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); }
.deal-tag { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; margin: 0; line-height: 1; }
.deal-sub { color: var(--ink-soft); font-weight: 600; margin-bottom: var(--s1); }
.deal ul { margin-bottom: var(--s2); }
.deal li { padding-left: 1.4rem; position: relative; }
.deal li::before { content: ""; position: absolute; left: 0; top: .72em; width: .6rem; height: .6rem; background: var(--sea); transform: rotate(45deg); }
.deal-amazon { background: var(--paper); }
.deal-mine { background: var(--sun); box-shadow: 8px 8px 0 var(--ink); position: relative; }
.deal-mine .deal-sub { color: var(--ink); }
.deal-copy { max-width: 58ch; }
.deal-copy .price { font-family: var(--font-display); font-size: 1.4em; }
.deal-mine .btn-primary { --bg: var(--ink); --fg: var(--paper); --sweep: var(--orange); }
.deal-mine .btn-primary:hover { color: var(--ink); box-shadow: 0 6px 0 rgba(59,42,33,.4); }

/* MUNDO CREATIVO */
.world { background: var(--peach); }
.world-head { display: grid; grid-template-columns: auto 1fr; gap: var(--s6); align-items: center; margin-bottom: var(--s6); }
.world-logo img { width: clamp(120px, 16vw, 200px); border-radius: var(--r); box-shadow: var(--shadow-1); border: 3px solid var(--ink); transform: rotate(-4deg); }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2) var(--s3); margin-bottom: var(--s6); font-size: var(--step--1); color: var(--ink-soft); }
.legend li { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: var(--s3); }
.filter { padding: .6rem 1.25rem; min-height: 44px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; cursor: pointer; transition: background .3s, transform .35s var(--ease), color .3s; }
.filter:hover { transform: translateY(-2px); background: var(--sun); }
.filter.is-active { background: var(--ink); color: var(--paper); }

.cat-panel { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); padding: var(--s3) var(--s4); margin-bottom: var(--s6); box-shadow: 6px 6px 0 var(--ink); }
.cat-copy { flex: 1 1 320px; }
.cat-copy p { margin: .35rem 0 0; max-width: 60ch; }
.cat-precio { font-weight: 700; color: var(--orange-deep); }
.cat-panel.swap .cat-copy { animation: fadeUp .5s var(--ease); }

.gallery { columns: 3 260px; column-gap: var(--s3); }
.piece { position: relative; margin: 0 0 var(--s3); break-inside: avoid; border-radius: var(--r); overflow: hidden; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-1); cursor: default; transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .25s; }
.piece img { width: 100%; transition: transform .9s var(--ease); }
.piece:hover, .piece:focus-visible { box-shadow: var(--shadow-2); }
.piece:hover img, .piece:focus-visible img { transform: scale(1.06); }
.piece .badge { position: absolute; top: .75rem; left: .75rem; z-index: 2; }
.piece figcaption { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem .9rem; color: #fff; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.15; background: linear-gradient(to top, rgba(11,85,96,.94) 15%, rgba(11,85,96,0)); transform: translateY(101%); transition: transform .5s var(--ease); }
.piece:hover figcaption, .piece:focus-visible figcaption, .piece:focus-within figcaption { transform: translateY(0); }
.piece.is-out { opacity: 0; transform: scale(.94); }
.piece.pop { animation: pop .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.piece[hidden] { display: none; }

/* ENCARGOS */
.orders { background: var(--sea-deep); color: var(--paper); overflow: clip; }
.orders .kicker { color: var(--sun); }
.orders .h2 em { color: var(--sun); }
.orders .btn-primary { --bg: var(--orange); --fg: var(--ink); }
.orders-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: start; }
.orders-copy .lead { margin-bottom: var(--s4); }
.orders-stage { position: relative; }
.collage { position: relative; min-height: 380px; }
.collage figure { position: absolute; margin: 0; background: var(--paper); padding: 10px 10px 28px; border-radius: 6px; box-shadow: var(--shadow-2); width: 46%; }
.collage img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.collage figure:nth-child(1) { left: 2%; top: 4%; transform: rotate(-6deg); }
.collage figure:nth-child(2) { right: 4%; top: 0; transform: rotate(5deg); z-index: 2; }
.collage figure:nth-child(3) { left: 24%; bottom: 0; transform: rotate(-2deg); z-index: 3; }
.js .orders-stage.open .collage { display: none; }
.form-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .7s var(--ease), opacity .5s var(--ease); }
.js .form-wrap:not(.open) { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .6s var(--ease), opacity .3s, visibility 0s .6s; }
.form-inner { overflow: hidden; min-height: 0; padding: 0 14px 14px 0; }
.order-form { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 3rem); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--sun); display: grid; gap: var(--s3); }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; font-size: .95rem; }
.opt { font-weight: 500; color: var(--ink-soft); }
.field input:not([type="checkbox"]):not([type="file"]), .field select, .field textarea { width: 100%; padding: .85rem 1rem; min-height: 48px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: #fff; transition: box-shadow .25s, border-color .25s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input[type="file"] { padding: .6rem; border: 2px dashed var(--ink); border-radius: var(--r-sm); background: var(--paper-2); width: 100%; font-size: .9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--sea-pale); border-color: var(--sea); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.file-note { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fff6f4; }
.err { color: #A52A1F; font-weight: 600; font-size: .9rem; margin: 0; min-height: 0; }
.err:empty { display: none; }
.err::before { content: "⚠ "; }
.field.check { grid-template-columns: auto 1fr; align-items: start; column-gap: .75rem; }
.field.check input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--sea); }
.field.check label { font-weight: 500; }
.field.check .err { grid-column: 1 / -1; }
.order-form [hidden] { display: none; }
.form-intro { margin: calc(var(--s2) * -1) 0 0; color: var(--ink-soft); }
.step { display: flex; align-items: center; gap: .6rem; margin: var(--s2) 0 0; padding-top: var(--s3); border-top: 1px solid var(--line); font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.step span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--font-body); font-size: .95rem; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { font-weight: 700; font-size: .95rem; padding: 0; margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; cursor: pointer; }
.field .chips .chip input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.chip span { display: flex; align-items: center; min-height: 44px; padding: .45rem 1.1rem; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 600; transition: background .25s, color .25s; }
.chip:hover span { background: var(--sun); }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--sea); outline-offset: 2px; }
.field.invalid .chip span { border-color: var(--red); }
.link-btn { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 700; text-decoration: underline; cursor: pointer; }
.preview { display: flex; align-items: center; gap: var(--s2); }
.preview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); border: 2px solid var(--ink); }
.field-row { align-items: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-send { justify-self: start; min-width: 220px; }
.btn-send .send-check { position: absolute; width: 28px; height: 28px; opacity: 0; transform: scale(.4); }
.btn-send .send-check path { stroke-dasharray: 30; stroke-dashoffset: 30; }
.btn-send.is-done { --bg: var(--sea); --fg: #fff; pointer-events: none; }
.btn-send.is-done .send-label { opacity: 0; transform: translateY(-8px); }
.send-label { transition: opacity .3s, transform .3s; }
.btn-send.is-done .send-check { opacity: 1; transform: scale(1); transition: transform .5s var(--ease), opacity .3s; }
.btn-send.is-done .send-check path { stroke-dashoffset: 0; transition: stroke-dashoffset .6s .2s ease-out; }
.btn-send.is-loading { opacity: .7; pointer-events: none; }
.form-status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: var(--sea-deep); }
.form-status.bad { color: #A52A1F; }

/* ARTÍCULOS */
.articles { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.card { display: flex; flex-direction: column; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-8px); box-shadow: 8px 8px 0 var(--ink); }
.card-media { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--sea-pale); border-bottom: 2px solid var(--ink); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .card-media img { transform: scale(1.07); }
.card-body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); flex: 1; justify-content: space-between; }

/* CONTACTO */
.contact { background: var(--sun); }
.contact .kicker { color: var(--ink); }
.contact .h2 em { color: var(--sea-deep); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
.contact-list { display: grid; gap: var(--s2); }
.contact-link { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); text-decoration: none; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.contact-link:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--ink); }
.contact-link small { display: block; font-size: var(--step--1); color: var(--ink-soft); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.contact-link strong { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; overflow-wrap: anywhere; }
.ic { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--sea-deep); color: var(--paper); transition: transform .5s var(--ease), background .3s; }
.ic svg { width: 28px; height: 28px; }
.contact-link:hover .ic { background: var(--orange); color: var(--ink); }
.contact-link:hover .ic-ig { transform: rotate(-14deg) scale(1.1); }
.contact-link:hover .ic-mail { transform: translateY(-4px) scale(1.08); }
.ic-mail .flap { transform-origin: 12px 7.5px; transition: transform .5s var(--ease); }
.contact-link:hover .ic-mail .flap { transform: scaleY(-.7) translateY(-1px); }

/* FOOTER */
.site-footer { background: var(--ink); color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: var(--s6); padding-block: var(--s8) var(--s4); }
.footer-brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; }
.footer-brand img { width: 72px; border-radius: 14px; }
.footer-brand em { color: var(--sun); }
.footer-brand small { display: block; font-family: var(--font-body); font-size: var(--step--1); opacity: .8; margin-top: .3rem; }
.footer-nav, .footer-social { display: grid; gap: .35rem; }
.footer-nav { grid-template-columns: 1fr 1fr; }
.site-footer a:not(.footer-brand) { text-decoration: none; opacity: .85; padding-block: .2rem; display: inline-block; border-bottom: 1px solid transparent; transition: opacity .3s, border-color .3s; }
.site-footer a:not(.footer-brand):hover { opacity: 1; border-color: var(--sun); }
.copyright { text-align: center; font-size: var(--step--1); opacity: .75; padding: var(--s2) var(--gutter) var(--s4); margin: 0; border-top: 1px solid rgba(255,255,255,.12); width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }

/* Aviso emergente (enlaces pendientes) */
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 90; max-width: min(92vw, 520px); background: var(--ink); color: var(--paper); padding: .9rem 1.3rem; border-radius: 999px; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-2); transform: translate(-50%, 140%); opacity: 0; transition: transform .5s var(--ease), opacity .4s; text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------------------------- 5. MOVIMIENTO ---------------------------- */
@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 560; } to { stroke-dashoffset: 0; } }

/* Estados iniciales: SOLO si hay JS (sin JS todo se ve) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.js [data-reveal="zoom"] { transform: scale(.9); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .hero-title .ch { transform: translateY(110%) rotate(5deg); transition: transform .9s var(--ease); transition-delay: calc(var(--n) * 38ms + .15s); }
.js .hero-title.in .ch { transform: none; }
.js .brush path { stroke-dashoffset: 560; }
.js .brush.in path { animation: draw 1.1s .9s var(--ease) forwards; }
.js .hero-quote[data-reveal].in { transform: rotate(-1.5deg); }
.js .sign[data-reveal].in { transform: rotate(-2deg); }

/* ----------------------------- 6. RESPONSIVE --------------------------- */
@media (max-width: 960px) {
  .menu-toggle { display: block; position: relative; z-index: 60; }
  .main-nav { position: fixed; inset: 0; z-index: 55; background: var(--paper); display: grid; align-content: center; padding: 6rem var(--gutter) 3rem; clip-path: circle(0% at calc(100% - 48px) 44px); visibility: hidden; transition: clip-path .7s var(--ease), visibility 0s .7s; }
  .main-nav.open { clip-path: circle(150% at calc(100% - 48px) 44px); visibility: visible; transition: clip-path .7s var(--ease); }
  .main-nav ul, .site-header:not(.is-small) .main-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; background: none; box-shadow: none; padding: 0; }
  .main-nav a { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; padding: .6rem .5rem; border-radius: var(--r-sm); }
  .main-nav .nav-cta { background: none; }
  .main-nav li { opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .5s var(--ease); }
  .main-nav.open li { opacity: 1; transform: none; }
  .main-nav.open li:nth-child(1) { transition-delay: .25s; } .main-nav.open li:nth-child(2) { transition-delay: .3s; }
  .main-nav.open li:nth-child(3) { transition-delay: .35s; } .main-nav.open li:nth-child(4) { transition-delay: .4s; }
  .main-nav.open li:nth-child(5) { transition-delay: .45s; } .main-nav.open li:nth-child(6) { transition-delay: .5s; } .main-nav.open li:nth-child(7) { transition-delay: .55s; }

  .hero-grid, .about-grid, .book, .orders-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { justify-self: center; width: min(86%, 420px); margin-top: var(--s4); }
  .book-rev .book-stage, .book-rev .book-info, .book-rev .compare { order: 0; }
  .book-stage { margin-bottom: var(--s3); }
  .cover-stack { width: min(66%, 260px); margin-right: 18%; }
  .compare { grid-template-columns: 1fr; }
  .world-head { grid-template-columns: 1fr; gap: var(--s3); }
  .legend { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .d-sun { left: auto; right: 4%; top: 9.5rem; }
  .d-shell { left: auto; right: 6%; bottom: 3%; }
}
@media (max-width: 560px) {
  .brand-name { font-size: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .gallery { columns: 2 140px; column-gap: var(--s2); }
  .piece { margin-bottom: var(--s2); border-radius: var(--r-sm); }
  .piece .badge { font-size: .7rem; top: .4rem; left: .4rem; padding: .2rem .55rem .2rem .4rem; }
  .cat-panel { padding: var(--s3); box-shadow: 4px 4px 0 var(--ink); }
  .deal { padding: var(--s3); }
  .btn { width: 100%; }
  .btn-send { min-width: 0; }
  .photo-note { right: 0; }
}
/* En pantallas táctiles no hay "hover": el nombre de la pieza se ve siempre */
@media (hover: none) {
  .piece figcaption { transform: none; font-size: 1rem; padding-top: 1.75rem; }
}

/* Accesibilidad: sin movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .hero-title .ch { opacity: 1; transform: none; }
  .js .brush path { stroke-dashoffset: 0; }
  .decor i { animation: none; }
}



/* ==========================================================================
   7. LOGO · PORTADA (HUB) · SUBPÁGINAS
   ========================================================================== */

/* Entrada de página (suave, solo opacity/transform) */
body { animation: pageIn .7s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Titular grande con letras enmascaradas (portadas de página) */
.hero-title { font-size: var(--step-6); font-weight: 700; line-height: .95; letter-spacing: -.035em; word-spacing: .14em; font-variation-settings: "opsz" 144; }
.hero-title .line { display: block; overflow: hidden; padding: .05em .08em .14em 0; margin-bottom: -.06em; }
.hero-title .ch { display: inline-block; will-change: transform; }

/* Cabecera con logo (subpáginas): siempre sobre papel para que el logo se lea */
.brand img { height: 84px; width: auto; transition: height .4s var(--ease), transform .5s var(--ease); }
.is-small .brand img { height: 60px; }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }
.sub .site-header { background: rgba(250, 245, 234, .96); box-shadow: 0 1px 0 var(--line); padding-block: 8px; }
.sub .site-header:not(.is-small) .main-nav ul { background: transparent; box-shadow: none; padding: 0; }
.sub main > .section:first-child { padding-top: calc(var(--section) + 72px); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.main-nav .nav-cta[aria-current="page"] { background: var(--ink); }

/* ------------------------------ PORTADA ------------------------------ */
.hub { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: clip; isolation: isolate;
  background:
    radial-gradient(60rem 40rem at 50% 46%, #fffaf0 0%, rgba(255,250,240,0) 70%),
    radial-gradient(34rem 28rem at 8% 8%, rgba(207,235,231,.8), transparent 70%),
    radial-gradient(34rem 28rem at 96% 92%, rgba(246,213,107,.45), transparent 70%),
    radial-gradient(30rem 24rem at 94% 6%, rgba(217,128,95,.22), transparent 70%),
    var(--paper); }
.hub-stage { --mx: 0; --my: 0; position: relative; width: min(100% - var(--gutter) * 2, 1240px); height: min(88svh, 800px); margin: 0 auto; }

/* Logo central */
.hub-logo { position: absolute; left: 50%; top: 47%; width: clamp(240px, 27vw, 390px); transform: translate3d(calc(-50% + var(--mx) * -8px), calc(-50% + var(--my) * -8px), 0); z-index: 3; transition: transform .3s ease-out; }
.hub-logo img { width: 100%; height: auto; animation: logoIn 1.4s .15s var(--ease) both; filter: drop-shadow(0 12px 22px rgba(59,42,33,.12)); }
@keyframes logoIn { from { opacity: 0; transform: scale(.86) translateY(24px); } to { opacity: 1; transform: none; } }
.hub-ring { position: absolute; left: 50%; top: 47%; width: clamp(380px, 50vw, 720px); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; }
.hub-ring svg { width: 100%; height: 100%; animation: spin 90s linear infinite; }
.hub-ring svg:nth-child(2) { position: absolute; inset: 9%; width: 82%; height: 82%; animation-duration: 120s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.hub-ring { animation: fadeIn 2s .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Botones orbitando el logo */
.hub-slot { position: absolute; z-index: 4; transform: translate3d(calc(var(--mx) * 12px), calc(var(--my) * 12px), 0); transition: transform .3s ease-out; }
.hub-slot.s-libros   { left: 1%;  top: 12%; --fx: -60px; --fy: -40px; --d: .55s; }
.hub-slot.s-mundo    { right: 0%; top: 18%; --fx: 60px;  --fy: -40px; --d: .7s; }
.hub-slot.s-encargos { left: 5%;  bottom: 13%; --fx: -60px; --fy: 40px; --d: .85s; }
.hub-slot.s-sobre    { right: 4%; bottom: 10%; --fx: 60px;  --fy: 40px; --d: 1s; }
.hub-btn { --hover: var(--sea-pale); position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: var(--s2);
  width: clamp(250px, 24vw, 310px); padding: 1rem 1.25rem; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink); animation: slotIn 1s var(--d) var(--ease) both;
  transition: box-shadow .35s var(--ease), translate .35s var(--ease); }
@keyframes slotIn { from { opacity: 0; transform: translate3d(var(--fx), var(--fy), 0) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.hub-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hover); transform: translateY(101%); transition: transform .5s var(--ease); }
.hub-btn:hover::before, .hub-btn:focus-visible::before { transform: translateY(0); }
.hub-btn:hover, .hub-btn:focus-visible { box-shadow: 10px 10px 0 var(--ink);  }
.s-mundo .hub-btn { --hover: var(--sun); }
.s-encargos .hub-btn { --hover: var(--peach); }
.s-sobre .hub-btn { --hover: #E9D9B8; }
.hub-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; transition: transform .5s var(--ease), background .3s; }
.hub-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-btn:hover .hub-ic { transform: rotate(-12deg) scale(1.1); background: var(--sea-deep); }
.hub-txt { display: grid; line-height: 1.15; }
.hub-txt strong { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; letter-spacing: -.01em; }
.hub-txt small { font-size: .9rem; color: var(--ink-soft); margin-top: .2rem; }
.hub-btn .arr { margin-left: auto; font-size: 1.4rem; transition: transform .35s var(--ease); }
.hub-btn:hover .arr { transform: translateX(6px); }

.hub-foot { position: absolute; left: 0; right: 0; bottom: 3.2%; text-align: center; z-index: 4; animation: fadeIn 1.2s 1.4s ease both; }
.hub-tag { font-size: var(--step-2); margin: 0 0 .35rem; color: var(--sea-deep); }
.hub-links { display: flex; justify-content: center; gap: var(--s3); flex-wrap: wrap; font-weight: 600; }
.hub-links a { text-decoration: none; border-bottom: 2px solid var(--orange); padding-bottom: 2px; transition: color .3s; }
.hub-links a:hover { color: var(--orange-deep); }

.hub .decor { z-index: 2; }
.hub-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hub .d-sun { top: 6%; left: 44%; width: clamp(54px, 6vw, 96px); }
.hub .d-tile { top: 70%; left: 33%; width: clamp(34px, 3.6vw, 56px); }
.hub .d-star { top: 30%; right: 33%; width: clamp(26px, 2.6vw, 40px); }
.hub .d-shell { bottom: 12%; right: 33%; left: auto; width: clamp(40px, 4.4vw, 70px); }

/* ------------------------ Pie de subpágina ------------------------- */
.explore { background: var(--paper-2); padding-block: var(--s8); }
.explore .h4 { margin-bottom: var(--s3); }
.explore-list { display: flex; flex-wrap: wrap; gap: .75rem; }
.explore-list a { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.3rem; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; text-decoration: none; transition: transform .35s var(--ease), background .3s, box-shadow .35s var(--ease); }
.explore-list a:hover { background: var(--sun); transform: translateY(-3px); box-shadow: 0 5px 0 var(--ink); }
.explore-list .arr { transition: transform .35s var(--ease); }
.explore-list a:hover .arr { transform: translateX(5px); }
.footer-brand .logo-badge { background: var(--paper); border-radius: var(--r); padding: .6rem .9rem; }
.footer-brand .logo-badge img { width: 120px; border-radius: 0; }

/* Encargos como página propia: formulario siempre visible */
.orders-side { display: grid; gap: var(--s4); }
.orders-side .collage { min-height: 360px; }

@media (max-width: 960px) {
  .brand img, .is-small .brand img { height: 56px; }
  .hub { align-items: start; padding: var(--s4) 0 var(--s8); }
  .hub-stage { height: auto; display: grid; justify-items: center; gap: var(--s3); }
  .hub-logo { position: relative; left: auto; top: auto; transform: none; width: min(66vw, 300px); margin-top: var(--s2); }
  .hub-ring { top: 150px; width: 105vw; opacity: .6; }
  .hub-slot { position: relative; inset: auto !important; transform: none; width: 100%; max-width: 420px; }
  .hub-btn { width: 100%; box-shadow: 4px 4px 0 var(--ink); animation: slotIn .9s calc(var(--d) - .2s) var(--ease) both; --fx: 0px; --fy: 30px; }
  .hub-foot { position: relative; bottom: auto; margin-top: var(--s2); }
  .hub-decor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .hub-logo img, .hub-btn, .hub-foot, .hub-ring { animation: none !important; }
  .hub-ring svg { animation: none; }
}


/* Decoración flotante (portada) */
.decor { position: absolute; display: block; }
.decor i { display: block; animation: float 7s ease-in-out infinite; }
.decor svg { width: 100%; height: auto; }
.d-sun i { animation-duration: 9s; }
.d-tile i { animation-duration: 8s; animation-delay: -2s; }
.d-star i { animation-duration: 6s; animation-delay: -1s; }
.d-shell i { animation-duration: 10s; animation-delay: -4s; }


/* Portada: solo se mueve el círculo rayado; el resto queda quieto */
.hub .decor i { animation: none; }


/* ------------------------- PANTALLA DE CARGA ------------------------- */
.loader { display: none; }
.loading .loader { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: var(--s4);
  background: radial-gradient(40rem 30rem at 50% 45%, #fffaf0, var(--paper)); transition: transform 1s var(--ease), opacity .6s ease .35s; }
.loading .loader.done { transform: translateY(-102%); opacity: 0; pointer-events: none; }
.loader-logo { position: relative; width: clamp(200px, 24vw, 300px); aspect-ratio: 401 / 463; }
.loader-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-logo .ghost { display: none; }
.loader-logo .fill { clip-path: none; }  /* logo quieto y completo; solo se anima la barra */
@keyframes paint { to { clip-path: inset(0 0 0 0); } }
.loader-bar { width: clamp(140px, 16vw, 200px); height: 3px; border-radius: 3px; background: rgba(59, 42, 33, .12); overflow: hidden; }
.loader-bar i { display: block; height: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); animation: bar 2s .2s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes bar { to { transform: scaleX(1); } }
/* La portada espera a que termine la carga para entrar */
.loading .hub-logo img, .loading .hub-btn, .loading .hub-foot, .loading .hub-ring { animation-play-state: paused; }
.loading { overflow: hidden; }


/* ==========================================================================
   8. MI MUNDO CREATIVO: categorías y subpáginas de productos
   ========================================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s4); margin-top: var(--s2); }
.cat-grid > li { grid-column: span 2; }
.cat-grid > li:nth-child(4) { grid-column: 2 / span 2; }
.cat-grid > li:nth-child(5) { grid-column: 4 / span 2; }
.cat-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.cat-card:hover, .cat-card:focus-visible { transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--ink); }
.cat-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 2px solid var(--ink); background: var(--sea-pale); }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.cat-card:hover .cat-photo img { transform: scale(1.07); }
.cat-body { display: flex; flex-direction: column; gap: .5rem; padding: var(--s3); flex: 1; }
.cat-name { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; line-height: 1.05; letter-spacing: -.015em; }
.cat-sub { color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }
.cat-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: auto; padding-top: var(--s2); flex-wrap: wrap; }
.cat-price { background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: .3rem .9rem; font-weight: 700; font-size: .95rem; }
.cat-go { font-weight: 700; display: inline-flex; gap: .4rem; }
.cat-go .arr { transition: transform .35s var(--ease); }
.cat-card:hover .cat-go .arr { transform: translateX(6px); }
.cat-note { margin: var(--s6) 0 0; text-align: center; font-size: var(--step-1); }
.cat-note a { font-weight: 700; border-bottom: 2px solid var(--orange); text-decoration: none; }

/* Subpágina de categoría */
.crumbs { font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); margin-bottom: var(--s4); display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs a { color: var(--orange-deep); text-decoration: none; border-bottom: 1px solid currentColor; }
.cat-head { margin-bottom: var(--s6); }
.cat-head .lead { max-width: 46ch; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s4); margin-bottom: var(--s12); }
.product { display: flex; flex-direction: column; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.product:hover { transform: translateY(-6px); box-shadow: 8px 8px 0 var(--ink); }
.prod-photo { position: relative; aspect-ratio: 1; overflow: hidden; border-bottom: 2px solid var(--ink); background: var(--sea-pale); }
.prod-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.product:hover .prod-photo img { transform: scale(1.06); }
.prod-photo .badge { position: absolute; top: .75rem; left: .75rem; }
.prod-body { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); flex: 1; }
.prod-body .h5 { margin-bottom: .25rem; }
.price-list { display: grid; gap: .35rem; margin: .25rem 0; }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); padding-bottom: .35rem; border-bottom: 1px dashed var(--line); }
.price-list strong { font-family: var(--font-display); font-size: var(--step-1); color: var(--orange-deep); white-space: nowrap; }
.prod-note { font-size: .9375rem; color: var(--ink-soft); margin: 0 0 var(--s1); }
.prod-body .btn { margin-top: auto; align-self: flex-start; }
.btn-sm { padding: .6rem 1.2rem; min-height: 44px; font-size: .95rem; }
.gal-title { margin-bottom: var(--s3); }
.mosaic { columns: 3 240px; column-gap: var(--s3); margin-bottom: var(--s12); }
.shot { break-inside: avoid; margin: 0 0 var(--s3); border-radius: var(--r); overflow: hidden; border: 2px solid var(--ink); box-shadow: var(--shadow-1); }
.shot img { width: 100%; transition: transform .9s var(--ease); }
.shot:hover img { transform: scale(1.06); }
.cat-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; background: var(--sun); border: 2px solid var(--ink); border-radius: var(--r-lg); padding: var(--s4); box-shadow: 8px 8px 0 var(--ink); }
.cat-cta .h4 { max-width: 28ch; margin: 0; }
.cat-cta .btn-primary { --bg: var(--ink); --fg: var(--paper); --sweep: var(--orange); }
.cat-cta .btn-primary:hover { color: var(--ink); }
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid > li, .cat-grid > li:nth-child(4), .cat-grid > li:nth-child(5) { grid-column: auto; }
  .cat-grid > li:nth-child(5) { grid-column: 1 / -1; max-width: 50%; justify-self: center; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-grid > li:nth-child(5) { max-width: none; }
  .mosaic { columns: 2 140px; column-gap: var(--s2); }
  .shot { margin-bottom: var(--s2); border-radius: var(--r-sm); }
  .cat-cta { padding: var(--s3); box-shadow: 4px 4px 0 var(--ink); }
}
