:root {
  --bg: #120d1f;
  --bg-alt: #1a1330;
  --surface: #221a3d;
  --gold: #d9b56a;
  --gold-soft: #f0dcae;
  --text: #ece6f5;
  --muted: #a99fbf;
  --line: rgba(217, 181, 106, 0.25);
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Cinzel", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--gold-soft); }
h3 { font-size: 1.3rem; color: var(--gold-soft); }
p { margin: 0 0 1em; }

.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 10% 20%, #fff8, transparent),
    radial-gradient(1px 1px at 30% 70%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, #fff9, transparent),
    radial-gradient(1px 1px at 75% 45%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 90% 80%, #fff8, transparent),
    radial-gradient(1px 1px at 45% 90%, #fff5, transparent),
    radial-gradient(ellipse at top, #2c1f52 0%, transparent 60%);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.25rem;
  background: rgba(18, 13, 31, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); color: var(--gold-soft); text-decoration: none; font-size: 1.1rem; }
.brand-mark { color: var(--gold); }
.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 1.05rem; }
.nav-links a:hover { color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; color: var(--gold); font-size: 1.6rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-block; padding: .7rem 1.5rem;
  background: linear-gradient(135deg, var(--gold), #b8914a);
  color: #1a1330 !important; text-decoration: none; border: 0; border-radius: 999px;
  font-family: var(--display); font-size: .95rem; letter-spacing: .05em; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(217,181,106,.3); }
.btn-ghost { background: transparent; color: var(--gold) !important; border: 1px solid var(--gold); }
.btn-small { padding: .45rem 1rem; font-size: .85rem; }

/* Layout */
.section { padding: 5rem 1rem; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-alt) 15%, var(--bg-alt) 85%, transparent); }
.container { max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 680px; }
.center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { font-family: var(--display); color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; margin-bottom: .6rem; }
.muted, .note { color: var(--muted); }
.note { font-size: 1rem; font-style: italic; max-width: 720px; margin: 2rem auto 0; }
.lead-sm { color: var(--muted); margin-bottom: 2.5rem; }

/* Hero */
.hero { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 4rem 1rem; }
.hero .lead { max-width: 640px; color: var(--muted); font-size: 1.3rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin: 1rem 0 2rem; }
.hero-note { color: var(--gold); font-style: italic; }

/* Quote */
.quote {
  margin: 0; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-size: 1.4rem; font-style: italic; color: var(--gold-soft);
}
.quote footer { font-size: 1rem; color: var(--muted); font-style: normal; }

/* Features */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; }
.feature-icon { font-size: 2.6rem; color: var(--gold); margin-bottom: .5rem; }

/* Tarot card */
.tarot-card {
  width: 110px; aspect-ratio: 7 / 12;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: .5rem .3rem;
  background: linear-gradient(160deg, #2e2350, #1b1433);
  border: 2px solid var(--gold); border-radius: 10px;
  box-shadow: inset 0 0 0 4px #1b1433, inset 0 0 0 5px var(--line);
  color: var(--gold-soft); font-family: var(--display); text-align: center;
}
.tc-num { font-size: .85rem; }
.tc-symbol { font-size: 2.2rem; color: var(--gold); }
.tc-name { font-size: .7rem; line-height: 1.1; }
.tarot-card.mini { width: 80px; }
.tarot-card.mini .tc-symbol { font-size: 1.6rem; }
.tarot-card.mini .tc-name { font-size: .55rem; }
.tarot-card.big { width: 170px; margin: 0 auto 1.5rem; }
.tarot-card.big .tc-symbol { font-size: 3.4rem; }
.tarot-card.big .tc-name { font-size: .9rem; }

/* Journey */
.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.5rem 1rem; }
.journey-item { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--muted); font-family: var(--serif); font-size: .95rem; width: 100%; }
.journey-item:hover .tarot-card, .journey-item:focus-visible .tarot-card { transform: translateY(-6px); box-shadow: 0 10px 25px rgba(217,181,106,.25); }
.journey-item .tarot-card { transition: transform .25s, box-shadow .25s; }
.journey-cap { text-align: center; line-height: 1.2; }

/* Modal */
.modal {
  max-width: 460px; width: calc(100% - 2rem); border: 1px solid var(--gold); border-radius: var(--radius);
  background: var(--surface); color: var(--text); padding: 2rem; text-align: center;
}
.modal::backdrop { background: rgba(0,0,0,.7); }
.modal-close { position: absolute; top: .5rem; right: .8rem; background: none; border: 0; color: var(--gold); font-size: 2rem; cursor: pointer; }
.question { color: var(--gold); font-style: italic; }

/* Numerology */
.num-form { display: flex; gap: .8rem; justify-content: center; align-items: center; flex-wrap: wrap; margin: 2rem 0; }
.num-form label { color: var(--muted); }
.num-form input {
  padding: .6rem .9rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 1.1rem; color-scheme: dark;
}
.num-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.calc { color: var(--muted); font-size: 1rem; }
.num-big { font-family: var(--display); font-size: 4.5rem; color: var(--gold); line-height: 1; margin: .5rem 0 1rem; }
.num-arcano { display: flex; gap: 1rem; align-items: center; justify-content: center; text-align: left; margin-top: 1rem; }
.num-arcano p { margin: 0; }

/* Runes */
.runes { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .7rem; max-width: 760px; margin: 0 auto 2rem; }
.rune {
  aspect-ratio: 3 / 4; border-radius: 40% 40% 35% 35%;
  background: linear-gradient(160deg, #cfc7b8, #8f8676); border: 0;
  color: #2a1f14; font-size: 1.8rem; cursor: pointer;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.3), 0 4px 10px rgba(0,0,0,.3);
  transition: transform .2s;
}
.rune:hover, .rune.active { transform: translateY(-4px) scale(1.05); outline: 2px solid var(--gold); }
.rune-detail { text-align: center; min-height: 140px; }
.rune-big { font-size: 3.5rem; color: var(--gold); display: block; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.contact-list li { margin-bottom: .6rem; }
.contact-list span { display: inline-block; width: 1.8rem; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) invert(.9) hue-rotate(200deg); }

/* Footer */
.footer { text-align: center; padding: 3rem 1rem; border-top: 1px solid var(--line); font-size: 1rem; }
.footer p:first-child { font-family: var(--display); color: var(--gold); }

/* Responsive */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: 1rem; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .two-col, .cards-grid { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 1rem; }
  .journey { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ---------- Comunidad: formularios, preguntas, blog, testimonios ---------- */
.page-top { padding-top: 3.5rem; }
.page-top h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); color: var(--gold-soft); }
.nav-links a[aria-current="page"] { color: var(--gold); }

.msg-form { display: grid; gap: 1rem; text-align: left; margin: 2rem 0; }
.msg-form label { display: grid; gap: .35rem; color: var(--muted); font-size: 1.05rem; }
.msg-form label.check { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.msg-form input:not([type=checkbox]), .msg-form textarea, .admin-msg textarea {
  width: 100%; padding: .7rem .9rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 1.1rem;
}
.msg-form textarea, .admin-msg textarea { resize: vertical; }
.msg-form input:focus, .msg-form textarea:focus, .admin-msg textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.msg-form input[type=checkbox] { width: 1.2rem; height: 1.2rem; accent-color: var(--gold); }
.msg-form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: #9fd8a8; }
.form-status.error { color: #f0a0a0; }
.turnstile-box:empty { display: none; }

.form-toggle { max-width: 640px; margin: 2rem auto 0; text-align: center; }
.form-toggle summary { list-style: none; }
.form-toggle summary::-webkit-details-marker { display: none; }

.msg-list { display: grid; gap: 1.25rem; margin-top: 2rem; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.msg header { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; margin-bottom: .5rem; }
.msg header strong { color: var(--gold-soft); font-family: var(--display); font-weight: 400; }
.msg time { color: var(--muted); font-size: .95rem; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-answer { margin-top: 1rem; padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: rgba(217,181,106,.07); border-radius: 6px; }
.msg-answer .eyebrow { display: block; margin-bottom: .4rem; }
.msg-answer p:last-child { margin-bottom: 0; }

.testimonios { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.testimonio { margin: 0; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-style: italic; }
.testimonio footer { color: var(--gold); font-style: normal; font-family: var(--display); font-size: .9rem; }

.posts { display: grid; gap: 1.25rem; margin-top: 2rem; }
.post-card { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: transform .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.post-card time { color: var(--muted); font-size: .95rem; }
.post-card h2 { font-size: 1.4rem; margin: .3rem 0 .5rem; }
.post-card p { color: var(--muted); }
.read-more { color: var(--gold); font-family: var(--display); font-size: .9rem; }
.post h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); color: var(--gold-soft); margin-top: .3rem; }
.post-body { font-size: 1.25rem; }
.eyebrow a { text-decoration: none; }

/* ---------- Panel de administración ---------- */
.admin .nav { position: sticky; }
.admin-user { display: flex; gap: .8rem; align-items: center; font-size: 1rem; }
.admin-main { padding: 2rem 1rem 4rem; }
.admin-error { background: var(--surface); border: 1px solid #f0a0a0; color: #f0a0a0; border-radius: var(--radius); padding: 1.25rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tabs button { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-family: inherit; font-size: 1.05rem; cursor: pointer; }
.tabs button.active { color: #1a1330; background: var(--gold); border-color: var(--gold); }
.admin-list { display: grid; gap: 1rem; }
.admin-msg label { display: grid; gap: .35rem; color: var(--muted); margin-top: .8rem; }
.admin-msg .row, .post-form .row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.admin-msg .contact { margin: .5rem 0 0; color: var(--muted); }
.admin-toolbar { margin-bottom: 1rem; }
.badge { font-family: var(--display); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold); }
.badge-private { border-color: var(--muted); color: var(--muted); }
.btn-danger { background: transparent; color: #f0a0a0 !important; border: 1px solid #f0a0a0; }
.post-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 0 0 1.5rem; }
.post-form h2 { margin: 0; }

/* ---------- Agenda ---------- */
.agenda-aviso { background: var(--surface); border: 1px solid #e8c77a; color: #e8c77a; border-radius: var(--radius); padding: .8rem 1.2rem; margin-bottom: 1rem; }
.agenda-aviso p { margin: .2rem 0; }
.admin-toolbar.row { display: flex; flex-wrap: wrap; gap: .5rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.msg-form select { width: 100%; padding: .7rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-family: inherit; font-size: 1.1rem; color-scheme: dark; }
.msg-form input[type=date], .msg-form input[type=time] { color-scheme: dark; }
.calendario-url { width: 100%; padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: .95rem; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0 1.5rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.cal-head h2 { margin: 0; font-size: 1.3rem; }
.cal-head h2::first-letter { text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.cal-dow { text-align: center; color: var(--muted); font-size: .85rem; font-family: var(--display); }
.cal-day { position: relative; aspect-ratio: 1; min-height: 38px; border-radius: 8px; border: 1px solid transparent; background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; }
.cal-day:hover { border-color: var(--line); }
.cal-day.hoy { border-color: var(--gold); }
.cal-day.sel { background: var(--gold); color: #1a1330; }
.cal-day em { font-style: normal; font-size: .7rem; min-width: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: var(--gold); color: #1a1330; }
.cal-day.sel em { background: #1a1330; color: var(--gold); }
.cita header strong { font-size: 1.2rem; }
.cita-cancelada { opacity: .55; }
.cita-realizada { opacity: .8; }
.admin .brand { white-space: nowrap; }
@media (max-width: 600px) {
  .admin #adminEmail { display: none; }
}
