/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:root {
  --primary: #2f5d50;
  --primary-dark: #1f4438;
  --primary-light: #f0f6f3;
  --accent: #c76f4c;
  --accent-light: #f6e7de;
  --cream: #faf7f2;
  --cream-dark: #f1e9dd;
  --text: #2b2b28;
  --text-soft: #5c584f;
  --border: #e6ddce;
  --radius: 18px;
  --shadow: 0 20px 40px -25px rgba(31, 68, 56, 0.35);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, .brand-text strong {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--primary-dark);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--primary); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--primary); color: var(--primary-dark); }
.btn-ghost:hover { background: var(--primary-light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: 'Fraunces', serif; font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; margin: 0; }
.brand-text small { color: var(--text-soft); font-size: .78rem; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--text-soft); }
.site-nav a:hover { color: var(--primary-dark); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 10px 20px; border-radius: 999px; font-weight: 600 !important;
}
.nav-cta:hover { background: #a95b3c; }

.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-burger span { width: 26px; height: 2px; background: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  color: var(--accent); font-weight: 700; margin-bottom: 12px;
}
.hero-subtitle { font-size: 1.15rem; color: var(--text-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0 12px; }
.hero-price { color: var(--text-soft); font-size: .95rem; }
.hero-media img, .hero-placeholder {
  border-radius: var(--radius);
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  box-shadow: var(--shadow);
}
.hero-placeholder {
  background: linear-gradient(155deg, var(--primary-light), var(--accent-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}

/* ---------- Quote band ---------- */
.quote-band { background: var(--primary-dark); color: #fff; padding: 48px 0; }
.quote-band p {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem); text-align: center; max-width: 760px; margin: 0 auto;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--cream-dark); }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--text-soft); max-width: 55ch; margin: 0 auto 40px; }

.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px;
}
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { font-size: 1.8rem; margin-bottom: 10px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card-body { color: var(--text-soft); font-size: .96rem; }
.card-body p:last-child { margin-bottom: 0; }
.empty-hint { color: var(--text-soft); font-style: italic; }

.about-teaser {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center;
}
.about-teaser-media img, .about-teaser-media .hero-placeholder {
  aspect-ratio: 1/1; border-radius: var(--radius);
}
.link-arrow {
  display: inline-block; margin-top: 10px; font-weight: 600; color: var(--primary-dark);
  text-decoration: none; border-bottom: 2px solid var(--accent);
}

.prose { color: var(--text-soft); font-size: 1.02rem; }
.prose-narrow { max-width: 70ch; margin: 0 auto; }
.prose p { margin-bottom: 1.1em; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--primary-dark); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item div { color: var(--text-soft); margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent-light); text-align: center; padding: 64px 0; margin-top: 0;
}
.cta-band p { color: var(--text-soft); }

/* ---------- Page header (subpages) ---------- */
.page-header { padding: 56px 0 24px; text-align: center; }
.page-header .hero-subtitle { margin: 0 auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.contact-list li { margin-bottom: 18px; }
.contact-list a { color: var(--primary-dark); text-decoration: none; }
.price-box {
  margin-top: 28px; padding: 22px; background: var(--primary-light);
  border-radius: var(--radius);
}
.price-box h3 { margin-bottom: 10px; font-size: 1.05rem; }
.price-box p { margin: 0 0 6px; color: var(--text-soft); }

.contact-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: .92rem; }
.form-row input:not([type="checkbox"]), .form-row textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--cream);
}
.form-row input:not([type="checkbox"]):focus, .form-row textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.form-row-check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-soft); }
.form-row-check input[type="checkbox"] { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); }
.form-row .errorlist { color: #b3392a; font-size: .85rem; margin: 4px 0 0; padding: 0; list-style: none; }
.honeypot { position: absolute; left: -9999px; }

.alert { padding: 14px 18px; border-radius: 12px; margin: 20px 0; }
.alert-success { background: var(--primary-light); color: var(--primary-dark); }
.alert-error { background: #fbe3de; color: #8a2f1d; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: calc(var(--reveal-i, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #e7ede9; padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer-col p, .footer-col a { color: #c7d4cc; font-size: .92rem; text-decoration: none; line-height: 1.8; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .82rem; color: #9fb0a6; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner, .about-teaser, .contact-grid { grid-template-columns: 1fr; }
  .about-teaser-media { order: -1; max-width: 260px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-burger { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 16px 24px;
    display: none;
    gap: 16px;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-cta { text-align: center; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
}

/* ---------- Panel de edición (/app/) ---------- */
.panel-body { background: var(--cream); }
.panel-main { padding: 40px 0 80px; }

.panel-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.panel-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.panel-nav { flex-wrap: wrap; row-gap: 10px; }
.panel-nav a.is-active { color: var(--primary-dark); }
.panel-logout-form { margin: 0; }
.panel-cuentas-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary-dark);
  transition: background .15s ease;
}
.panel-cuentas-link:hover { background: var(--accent-light); color: var(--accent); }
.panel-cuentas-link svg { width: 18px; height: 18px; display: block; }
button.nav-cta {
  border: none; font-family: inherit; font-size: .95rem; cursor: pointer;
}

.panel-anchor-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 28px;
}
.panel-anchor-nav a {
  background: var(--accent-light); color: var(--primary-dark);
  padding: 6px 14px; border-radius: 999px; font-size: .85rem;
  font-weight: 600; text-decoration: none;
}
.panel-anchor-nav a:hover { background: var(--primary-light); }

.panel-list-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 8px;
}

.panel-section { margin-bottom: 24px; }
.panel-section h2 { font-size: 1.2rem; margin-bottom: 20px; }

.panel-form-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px;
}
.panel-form-actions form { margin: 0; }

.panel-list { padding: 0; overflow: hidden; }
.panel-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.panel-row:last-child { border-bottom: none; }
a.panel-row-link { text-decoration: none; color: inherit; transition: background .15s ease; }
a.panel-row-link:hover { background: var(--cream-dark); }

.panel-row-move { display: flex; flex-direction: column; gap: 4px; }
.panel-row-move form { margin: 0; }
.panel-row-body { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.panel-row-body strong { color: var(--primary-dark); }
.panel-row-meta { font-size: .85rem; color: var(--text-soft); }
.panel-row-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.panel-row-actions form { margin: 0; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; width: fit-content;
}
.badge-on { background: var(--primary-light); color: var(--primary-dark); }
.badge-off { background: var(--cream-dark); color: var(--text-soft); }

.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-danger { background: transparent; border-color: #b3392a; color: #b3392a; }
.btn-danger:hover { background: #fbe3de; }

.panel-thumb {
  width: 96px; height: 96px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 10px;
}

.form-row select {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--cream);
}
.form-row select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.panel-login-body { display: flex; min-height: 100vh; }
.panel-login-wrap { margin: auto; padding: 24px; width: 100%; max-width: 420px; }
.panel-login-form { width: 100%; }
.panel-login-brand { text-align: center; margin-bottom: 24px; }
.panel-login-brand .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: 'Fraunces', serif; font-size: 1.3rem; margin-bottom: 14px;
}
.panel-login-brand h1 { font-size: 1.5rem; margin-bottom: 6px; }
.panel-login-submit { width: 100%; text-align: center; margin-top: 8px; }
