/* Galería de plantillas y selector de categoría. */
:root { --papel: #FBF8F6; --hoja: #FFFFFF; --linea: #E8DEDF; --tinta: #2A2226; --tinta-suave: #6B5E64; --vino: #7A2E3A; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--papel); color: var(--tinta); font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.55; }
:focus-visible { outline: 2px solid var(--vino); outline-offset: 3px; }
.top { display: flex; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--linea); background: var(--hoja); }
.brand { font-family: "Newsreader", Georgia, serif; font-size: 18px; color: var(--tinta); text-decoration: none; }
.brand em { font-family: "Pinyon Script", cursive; font-style: normal; color: var(--vino); font-size: 25px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 36px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
.eyebrow { margin: 0; font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 18px; color: var(--vino, #7A2E3A); }
h1 { margin: 4px 0 8px; font-family: "Newsreader", Georgia, serif; font-weight: 400; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; }
.lead { margin: 0 0 20px; color: var(--tinta-suave); max-width: 60ch; }
.note { margin: 28px 0 0; font-size: 13px; color: var(--tinta-suave); }

.cats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 40px; }
.cats a { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 18px 0; border-bottom: 1px solid #D3C6B8; color: var(--tinta); text-decoration: none; }
.cats a::after { content: "→"; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--vino); font-size: 18px; transition: transform .15s; }
.cats a:hover::after { transform: translateX(4px); }

.cats b { font-family: "Newsreader", Georgia, serif; font-weight: 400; font-size: 25px; line-height: 1.2; }
.cats span { color: var(--tinta-suave); font-size: 15px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--linea); margin-bottom: 24px; scrollbar-width: none; }
.tabs a { padding: 10px 12px; white-space: nowrap; color: var(--tinta-suave); text-decoration: none; border-bottom: 1.5px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--tinta); border-bottom-color: var(--tinta); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 20px; }
.grid form { margin: 0; }
a.tpl { text-decoration: none; }
.tpl { display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; gap: 4px; }
.scene { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3.4; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--linea); }
.tpl:hover .scene { box-shadow: 0 0 0 1px var(--tinta-suave); }
.mini-card { position: absolute; left: 22%; top: 6%; width: 56%; aspect-ratio: 5 / 7; background: #FFFEFB; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 18px -8px rgba(0,0,0,.45);
  display: flex; flex-direction: column; align-items: center; padding: 9% 8% 0; text-align: center; transform: rotate(-2deg); gap: 3px; }
.mini-card small { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: #6B5E64; font-weight: 600; }
.mini-card b { font-family: var(--fd); font-weight: 400; font-size: 21px; line-height: 1.05; color: #2A2226; }
.mini-card i { font-style: normal; font-size: 9px; color: var(--ac); }
.mini-env { position: absolute; left: 12%; right: 12%; bottom: -4%; transform: rotate(2deg); }
.mini-env .envelope { cursor: inherit; }
.tpl-name { font-family: "Newsreader", Georgia, serif; font-size: 19px; margin-top: 8px; }
.tpl-cta { font-size: 13px; color: var(--vino); font-weight: 600; }
/* Miniatura con papel real, lámina de olivo y orilla rasgada (mismas imágenes que la invitación). */
.mini-card { background: #FFFDF8 url("/img/papel-liso.webp") 0 0 / 160px; background-blend-mode: multiply; overflow: hidden; }
.mini-card > * { position: relative; z-index: 1; }
.mini-card.orn-olivo::before { content: ""; position: absolute; z-index: 0; width: 70%; aspect-ratio: 900 / 1018; top: -16%; left: -26%; transform: rotate(-28deg);
  background: url("/img/lamina-olivo.webp") center / contain no-repeat; mix-blend-mode: multiply; pointer-events: none; }
.mini-card.edge-rasgado { clip-path: polygon(0 1%, 8% 0, 17% 1.2%, 29% .2%, 41% 1%, 55% 0, 68% .9%, 80% .1%, 92% 1%, 100% .3%, 99.2% 12%, 100% 26%, 99.3% 41%, 100% 57%, 99.1% 72%, 100% 88%, 99.4% 100%, 85% 99.2%, 70% 100%, 56% 99.1%, 40% 100%, 26% 99.3%, 12% 100%, 0 99.2%, .8% 85%, 0 70%, .9% 54%, 0 38%, .7% 22%, 0 9%); }
.mini-card.orn-rosas::before, .mini-card.orn-lavanda::before { content: ""; position: absolute; z-index: 0; pointer-events: none; mix-blend-mode: multiply; background: center / contain no-repeat; }
.mini-card.orn-rosas::before { width: 50%; aspect-ratio: 900 / 1131; top: -32%; left: -18%; transform: rotate(138deg); background-image: url("/img/lamina-rosa.webp"); }
.mini-card.orn-lavanda::before { width: 26%; aspect-ratio: 700 / 1682; top: -30%; left: 4%; transform: rotate(150deg); background-image: url("/img/lamina-lavanda.webp"); }
.mini-card.orn-eucalipto::before { content: ""; position: absolute; z-index: 0; pointer-events: none; mix-blend-mode: multiply; width: 44%; aspect-ratio: 900 / 1451; top: -28%; left: -4%; transform: rotate(150deg); background: url("/img/lamina-eucalipto.webp") center / contain no-repeat; }
.mini-cover { position: absolute; z-index: 0; top: 4%; left: 5%; right: 5%; height: 34%; background-size: cover; background-position: center; background-repeat: no-repeat; -webkit-mask: linear-gradient(#000 60%, transparent); mask: linear-gradient(#000 60%, transparent); }
.mini-card:has(.mini-cover) { padding-top: 40%; }
.cover-mar { background-image: url("/img/pintura-marino.webp"); } .cover-atardecer { background-image: url("/img/pintura-burdeos.webp"); } .cover-cabo { background-image: url("/img/pintura-noche.webp"); }
