@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair_display.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ink: #22201d;
  --muted: #6f6961;
  --cream: #fbf7ef;
  --paper: #fffdf9;
  --line: #e7ded0;
  --coral: #d45d4c;
  --coral-dark: #b54839;
  --pine: #1e3a32;
  --gold: #c7a25c;
  --rose: #f3e0d9;
  --shadow: 0 30px 70px -35px rgba(45, 35, 25, .45);
  --radius: 28px;
  --display: "Playfair Display", Georgia, serif;
  --body: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 85% -5%, rgba(212, 93, 76, .12), transparent 62%),
    radial-gradient(900px 500px at -5% 38%, rgba(199, 162, 92, .1), transparent 60%),
    var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
::selection { background: rgba(212, 93, 76, .22); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; top: -70px; left: 18px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px;
}
.skip-link:focus { top: 16px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(820px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section--tight { padding: 44px 0; }
.section--dark { background: var(--pine); color: #f8f1e2; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .74rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--coral-dark);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .65; }
.section--dark .eyebrow { color: #e8c888; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(2.8rem, 7vw, 5.9rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.7rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--muted); max-width: 62ch; }
.section--dark .lede { color: #cfd9d2; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 239, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-color: var(--line); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 900; letter-spacing: .02em; }
.brand-mark {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; gap: 1px; border-radius: 12px;
  background: var(--ink); color: #fff; font-family: var(--display); font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); white-space: nowrap; letter-spacing: -.06em;
}
.brand-mark span:last-child { color: var(--gold); }
.brand-name { font-size: .98rem; line-height: 1.1; }
.brand-name small { display: block; font-size: .58rem; letter-spacing: .18em; color: var(--muted); font-weight: 700; margin-top: 4px; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .92rem; font-weight: 700; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); width: 44px; height: 44px; border-radius: 50%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 25px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 800; font-size: .95rem;
  text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--coral); color: #fff; box-shadow: 0 12px 28px -14px rgba(213, 93, 76, .8); }
.btn--primary:hover { background: var(--coral-dark); }
.btn--ghost { border-color: rgba(34, 32, 29, .18); color: var(--ink); background: rgba(255, 253, 249, .5); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--small { min-height: 42px; padding: 8px 18px; font-size: .86rem; }
.btn--disabled { pointer-events: none; opacity: .68; }

.hero { padding: clamp(44px, 7vw, 88px) 0 clamp(66px, 8vw, 110px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(30px, 5vw, 72px); align-items: center; }
.hero-copy h1 { margin: 18px 0 22px; }
.hero-copy h1 em { color: var(--coral); font-style: italic; }
.hero-copy .lede { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 26px; }
.hero-note { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: #4f9c72; box-shadow: 0 0 0 5px rgba(79, 156, 114, .12); }
.hero-stack { position: relative; min-height: 560px; }
.hero-card {
  position: absolute; width: min(64%, 350px); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow); border: 5px solid var(--paper); background: var(--paper);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.hero-card img { width: 100%; height: auto; }
.hero-card--one { top: 4%; left: 1%; transform: rotate(-8deg); z-index: 1; }
.hero-card--two { top: 16%; right: 1%; transform: rotate(6deg); z-index: 2; }
.hero-card--three { bottom: 0; left: 21%; transform: rotate(-1deg); z-index: 3; }
.hero-stack:hover .hero-card--one { transform: rotate(-11deg) translateX(-8px); }
.hero-stack:hover .hero-card--two { transform: rotate(9deg) translateX(8px); }
.hero-stack:hover .hero-card--three { transform: rotate(0) translateY(-5px); }
.hero-sticker {
  position: absolute; z-index: 5; right: 4%; bottom: 8%;
  width: 112px; height: 112px; border-radius: 50%;
  background: var(--gold); color: var(--ink); display: grid; place-content: center; text-align: center;
  font-size: .72rem; font-weight: 900; letter-spacing: .1em; line-height: 1.35; text-transform: uppercase;
  transform: rotate(9deg); box-shadow: 0 16px 30px -18px rgba(0,0,0,.4);
}
.hero-sticker strong { display: block; font-family: var(--display); font-size: 1.45rem; letter-spacing: 0; text-transform: none; }

.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 253, 249, .45); }
.trust-items { display: flex; flex-wrap: wrap; gap: 18px 44px; justify-content: center; padding: 18px 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.trust-items span { display: inline-flex; align-items: center; gap: 9px; }
.trust-items span::before { content: "✦"; color: var(--gold); font-size: .9rem; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.section-head .lede { margin: 12px 0 0; }
.section-head--center { display: block; text-align: center; }
.section-head--center .lede { margin-inline: auto; }

.category-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 253, 249, .7); color: var(--muted); font-size: .84rem; font-weight: 700;
  text-decoration: none; transition: .2s ease;
}
.chip:hover { border-color: var(--coral); color: var(--coral-dark); transform: translateY(-1px); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { opacity: .7; }
.chip span { opacity: .55; margin-left: 4px; }

.template-card {
  padding: 0; border: 1px solid var(--line); text-align: left; color: inherit; font: inherit;
  cursor: pointer; display: block; width: 100%;
}
.template-card[hidden] { display: none; }
.template-card .template-meta { display: flex; }
.template-meta h3 { margin: 0; }
.template-meta p { color: var(--muted); }

.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.template-card {
  position: relative; margin: 0; border-radius: 22px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 18px 36px -32px rgba(50, 35, 20, .5);
  transition: transform .3s ease, box-shadow .3s ease;
}
.template-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(50, 35, 20, .55); }
.template-card img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; transition: transform .6s ease; }
.template-card:hover img { transform: scale(1.03); }
.template-meta { padding: 16px 17px 19px; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.template-meta h3 { font-size: 1.16rem; }
.template-meta p { margin: 5px 0 0; font-size: .78rem; color: var(--muted); }
.template-badge {
  flex: 0 0 auto; font-size: .6rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; color: var(--coral-dark); background: var(--rose);
}
.template-more { display: flex; justify-content: center; margin-top: 38px; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.how-card {
  position: relative; padding: 34px 30px; border-radius: var(--radius);
  background: rgba(255, 253, 249, .72); border: 1px solid var(--line); overflow: hidden;
}
.how-card::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; right: 20px; top: 4px; font-family: var(--display); font-size: 5rem;
  color: rgba(212, 93, 76, .1); line-height: 1;
}
.how-card h3 { margin: 16px 0 10px; }
.how-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.how-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--rose); display: grid; place-items: center; font-size: 1.3rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 80px); align-items: center; }
.phone-stage { position: relative; display: grid; place-items: center; padding: 30px; }
.phone {
  width: min(300px, 82%); aspect-ratio: 9 / 18.5; border-radius: 42px; padding: 10px;
  background: #171513; box-shadow: 0 40px 80px -40px rgba(0,0,0,.55); transform: rotate(-4deg);
}
.phone-screen { height: 100%; border-radius: 33px; overflow: hidden; background: var(--paper); position: relative; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; border-radius: 999px; background: #171513; z-index: 2; }
.phone-stage::after {
  content: ""; position: absolute; width: 330px; height: 330px; border-radius: 50%;
  background: rgba(199, 162, 92, .15); filter: blur(50px); z-index: -1;
}
.feature-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; align-items: start; }
.feature-check { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(199, 162, 92, .18); color: var(--pine); font-size: .8rem; font-weight: 900; margin-top: 3px; }
.feature-list strong { display: block; }
.feature-list span { color: var(--muted); font-size: .9rem; }

.download-panel {
  position: relative; overflow: hidden; border-radius: 36px; padding: clamp(34px, 6vw, 70px);
  background:
    radial-gradient(600px 360px at 85% 10%, rgba(199, 162, 92, .24), transparent 60%),
    radial-gradient(500px 400px at 0 100%, rgba(212, 93, 76, .18), transparent 60%),
    var(--pine);
  color: #f9f2e4;
}
.download-panel::after {
  content: ""; position: absolute; width: 340px; height: 340px; border: 1px solid rgba(232, 200, 136, .22);
  border-radius: 50%; right: -100px; top: -100px; box-shadow: 0 0 0 45px rgba(232,200,136,.05), 0 0 0 90px rgba(232,200,136,.03);
  pointer-events: none;
}
.download-panel h2 { color: #fff; max-width: 16ch; margin: 12px 0 18px; }
.download-panel p { color: #cfd9d2; max-width: 56ch; }
.download-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.download-actions .btn--primary { background: var(--gold); color: #1d2b27; }
.download-actions .btn--ghost { border-color: rgba(255,255,255,.25); color: #fff; }
.soon-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: .82rem; font-weight: 700; }

.faq { max-width: 900px; margin-inline: auto; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 4px 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 22px 2px; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--body); font-size: 1.5rem; color: var(--coral); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 22px; max-width: 72ch; }

.site-footer { padding: 64px 0 32px; background: #171e1b; color: #e8e3d8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, .65fr); gap: 40px; }
.footer-brand p { color: #9ba49f; max-width: 38ch; font-size: .9rem; margin-top: 16px; }
.footer-col h3 { font-family: var(--body); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #8f9a94; margin-bottom: 16px; }
.footer-col a { display: block; text-decoration: none; color: #d8d4ca; font-size: .9rem; padding: 5px 0; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.09); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: #8f9a94; }
.site-footer .brand-mark { background: #f4ead8; color: #171e1b; }
.site-footer .brand-name small { color: #9ba49f; }

/* Páginas legales y de error */
.page-hero { padding: 74px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.prose { padding: 56px 0 100px; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); margin: 42px 0 14px; }
.prose h3 { margin: 28px 0 10px; font-family: var(--body); font-size: 1.08rem; font-weight: 900; }
.prose p, .prose li { color: #514c45; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .notice {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  padding: 20px 22px; border-radius: 0 14px 14px 0; margin: 26px 0;
}
.error-page { min-height: 78vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.error-code { font-family: var(--display); font-size: clamp(5rem, 18vw, 10rem); line-height: 1; color: var(--coral); opacity: .25; }
.error-page h1 { margin: 12px 0 18px; }
.error-page .lede { margin-inline: auto; }
.error-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Vista previa de plantilla */
.template-dialog {
  width: min(960px, calc(100% - 30px)); max-height: 92vh; padding: 0; border: 0; border-radius: 26px;
  background: var(--paper); color: var(--ink); box-shadow: 0 50px 120px -30px rgba(0,0,0,.55); overflow: auto;
}
.template-dialog::backdrop { background: rgba(20, 25, 22, .7); backdrop-filter: blur(7px); }
.dialog-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.dialog-grid > img { width: 100%; height: 100%; min-height: 480px; object-fit: cover; }
.dialog-body { padding: clamp(26px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; align-items: start; }
.dialog-body h2 { margin: 10px 0 14px; }
.dialog-body .lede { font-size: 1rem; margin-bottom: 24px; }
.dialog-list { margin: 0 0 26px; width: 100%; display: grid; gap: 12px; }
.dialog-list div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dialog-list dt { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.dialog-list dd { margin: 0; font-size: .88rem; }
.dialog-note { font-size: .75rem; color: var(--muted); margin: 14px 0 0; }
.dialog-close {
  position: sticky; top: 12px; float: right; margin-right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-size: 1.5rem; line-height: 1;
}
@media (max-width: 760px) {
  .dialog-grid { grid-template-columns: 1fr; }
  .dialog-grid > img { max-height: 36vh; min-height: 0; object-position: top; }
  .dialog-body { padding: 22px; }
  .dialog-close { position: fixed; right: 22px; top: 20px; }
}

@media (max-width: 1020px) {
  .template-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { min-height: 500px; max-width: 600px; margin-inline: auto; width: 100%; }
  .hero-copy { text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-actions, .hero-note { justify-content: center; }
  .split { grid-template-columns: 1fr; }
  .phone-stage { order: -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 30px); }
  .nav { min-height: 66px; }
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    padding: 16px 20px 22px; background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: start; gap: 2px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 11px 0; font-size: 1rem; }
  .menu-toggle { display: grid; place-items: center; }
  .nav-actions .btn { display: none; }
  .site-header { position: relative; }
  .hero-stack { min-height: 400px; }
  .hero-card { width: 58%; }
  .hero-sticker { width: 86px; height: 86px; font-size: .58rem; right: 0; bottom: 0; }
  .hero-sticker strong { font-size: 1.15rem; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .template-meta { padding: 11px 12px 14px; display: block; }
  .template-meta h3 { font-size: .98rem; }
  .template-meta p { font-size: .7rem; }
  .template-badge { display: none; }
  .how-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head .btn { margin-top: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .trust-items { gap: 10px 22px; font-size: .68rem; }
  .page-hero { padding: 46px 0 32px; }
  .download-panel { border-radius: 26px; }
}
@media (max-width: 420px) {
  .template-grid { grid-template-columns: 1fr 1fr; }
  .hero-stack { min-height: 340px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
