/* ── Variables (alineadas con la landing) ── */
:root {
  color-scheme: light;
  --bg:        #f8f4ee;
  --bg-alt:    #f2ede4;
  --bg-card:   #fdfaf5;
  --ink:       #1a1612;
  --ink-2:     #3d3529;
  --muted:     #7a6e62;
  --gold:      #9a7a3a;
  --gold-lt:   #d6c49a;
  --gold-bg:   #f5efd8;
  --navy:      #1a3a5c;
  --navy-hov:  #0f2740;
  --line:      #ddd4be;
  --line-lt:   #ece6d6;
  --white:     #ffffff;
  --accent:    #1a3a5c;
  --paper:     #ffffff;

  --ff-head: 'Playfair Display', Georgia, serif;
  --ff-body: 'EB Garamond', Georgia, serif;
  --ff-ui:   system-ui, sans-serif;

  --radius:    3px;
  --shadow:    0 2px 18px rgba(26,22,18,.07);
  --shadow-lg: 0 8px 40px rgba(26,22,18,.12);
}

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

body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy);
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,244,238,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-nav__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-nav__logo {
  font-family: var(--ff-head);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav__logo span { color: var(--gold); }

.site-nav__link {
  font-family: var(--ff-ui);
  font-size: .88rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .15s;
}

.site-nav__link:hover { color: var(--navy); }

/* ── Footer ── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.5);
  padding: 36px 0;
  text-align: center;
  font-family: var(--ff-ui);
  font-size: .82rem;
  letter-spacing: .04em;
  margin-top: 3rem;
}

.site-footer a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .15s;
}

.site-footer a:hover { color: var(--white); }

.site-footer__logo {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 16px;
}

.site-footer__logo span { color: var(--gold-lt); }

.site-footer__links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* ── Wrap ── */
.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.wrap--wide {
  max-width: 82rem;
}

/* ── Page header ── */
.page-header {
  text-align: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--line-lt);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--ff-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 .5rem;
  color: var(--ink);
}

.page-header p {
  margin: 0;
  color: var(--muted);
  font-family: var(--ff-ui);
  font-size: .9rem;
  line-height: 1.6;
}

/* ── Desktop two-column generator layout ── */
.generator-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.generator-aside {
  position: sticky;
  top: 5rem;
}

.preview-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.preview-panel h2 {
  font-family: var(--ff-ui);
  font-size: .82rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-panel .preview-hint {
  font-family: var(--ff-ui);
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 .75rem;
}

@media (max-width: 860px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }

  .generator-aside {
    position: static;
    order: 1;
  }

  .wrap--wide {
    max-width: 52rem;
  }
}

/* ── Card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: var(--ff-ui);
  font-size: .82rem;
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Form elements ── */
label {
  display: block;
  font-family: var(--ff-ui);
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .3rem;
  font-weight: 500;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 1rem;
  margin-bottom: 1rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,.08);
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

textarea.lg {
  min-height: 8rem;
}

.row-2 {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 36rem) {
  .row-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Submit button ── */
.actions {
  margin-top: 1.25rem;
}

.actions button {
  font-family: var(--ff-ui);
  padding: .7rem 1.6rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .03em;
  transition: background .18s, transform .14s;
}

.actions button:hover {
  background: var(--navy-hov);
  transform: translateY(-1px);
}

/* ── Alert ── */
.alert {
  font-family: var(--ff-ui);
  background: #f3e8e6;
  border: 1px solid #d4b4ae;
  color: #4a2c28;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}

/* ── Preview box ── */
.preview-box {
  border: 1px solid var(--line-lt);
  padding: 1rem;
  margin-top: .5rem;
  min-height: 6rem;
  font-family: Georgia, serif;
  font-size: .85rem;
  background: var(--white);
  border-radius: 2px;
}

.preview-box .p-nombre {
  font-weight: bold;
  text-align: center;
  margin-bottom: .35rem;
}

.preview-box .p-small {
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}

.pv-cruz {
  text-align: center;
  margin-bottom: .3rem;
}

.pv-cruz svg {
  display: block;
  margin: 0 auto;
  max-width: 2.5rem;
  height: auto;
}

.pv-familia {
  font-size: .78rem;
  color: var(--ink);
  margin-top: .4rem;
  text-align: left;
}

.pv-oracion {
  font-size: .75rem;
  font-style: italic;
  color: var(--muted);
  margin-top: .35rem;
  text-align: right;
}

/* ── Ad slot ── */
.ad-slot {
  width: 100%;
  min-height: 90px;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-ui);
  font-size: .75rem;
  color: var(--line);
}

/* ── WhatsApp tip ── */
.whatsapp-tip {
  background: #f0f7f0;
  border: 1px solid #b8d9b8;
  color: #2a4a2a;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-family: var(--ff-ui);
  font-size: .88rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Result actions ── */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.25rem 0;
}

.result-actions a {
  display: inline-flex;
  align-items: center;
  padding: .65rem 1.2rem;
  background: var(--navy);
  color: var(--white) !important;
  text-decoration: none;
  border-radius: var(--radius);
  font-family: var(--ff-ui);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .03em;
  transition: background .18s, transform .14s;
}

.result-actions a:hover {
  background: var(--navy-hov);
  transform: translateY(-1px);
}

.result-actions a.secondary {
  background: var(--white);
  color: var(--navy) !important;
  border: 1.5px solid var(--navy);
}

.result-actions a.secondary:hover {
  background: var(--navy);
  color: var(--white) !important;
}

.thumb {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  margin: 1rem 0;
  background: var(--white);
  box-shadow: var(--shadow);
}

.note {
  font-family: var(--ff-ui);
  font-size: .85rem;
  color: var(--muted);
  margin-top: 1rem;
}
