/* ==========================================================
   CivitasDimora — Hoja de estilos
   Paleta tomada del logo:
   --navy        #192845  (fondo del logo)
   --navy-deep   #0E1531  (contraste profundo)
   --gold-light  #FCDF91  (dorado del logo, sobre fondos oscuros)
   --gold        #B8934A  (dorado para acentos sobre fondo claro)
   --olive       #6F7F5F  (hojas de laurel, detalles secundarios)
   --cream       #F7F3EA  (fondo claro cálido)
   ========================================================== */

:root {
  --navy: #192845;
  --navy-deep: #0E1531;
  --gold-light: #FCDF91;
  --gold: #B8934A;
  --olive: #6F7F5F;
  --cream: #F7F3EA;
  --paper: #FFFDF8;
  --ink: #1D2433;
  --muted: #5B6578;
  --line: #E4DCCB;

  --font-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 21, 49, 0.10);
  --shadow-lg: 0 24px 60px rgba(14, 21, 49, 0.28);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.container { width: min(var(--maxw), 92%); margin-inline: auto; }
.narrow { width: min(820px, 92%); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-light); color: var(--navy); padding: .6rem 1rem; z-index: 99;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: .75rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold-light); color: var(--navy-deep); }
.btn-primary:hover { background: #fff0bd; }
.btn-ghost { border-color: rgba(252, 223, 145, .55); color: var(--gold-light); }
.btn-ghost:hover { background: rgba(252, 223, 145, .10); }
.btn-small { padding: .55rem 1.1rem; font-size: .85rem; background: var(--gold); color: var(--navy-deep); }
.btn-small:hover { background: var(--gold-light); }
.btn-block { width: 100%; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(25, 40, 69, .96);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: 0 1px 0 rgba(252, 223, 145, .15);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; }
.brand { gap: .7rem; }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand-name {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.6rem; line-height: 1;
  color: #FFFBEF; letter-spacing: .01em; display: flex; flex-direction: column;
}
.brand-name small {
  font-family: var(--font-sans); font-size: .58rem; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase; color: var(--gold-light); margin-top: .35rem;
}

.main-nav { display: flex; align-items: center; gap: 1.8rem; }
.main-nav a:not(.btn) {
  color: #E9E2D2; text-decoration: none; font-size: .9rem; font-weight: 500;
  position: relative; padding: .25rem 0;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--gold-light); transition: width .25s ease;
}
.main-nav a:not(.btn):hover::after { width: 100%; }
.main-nav .btn-small { color: var(--navy-deep); }

.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  flex-direction: column; gap: 5px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--gold-light); transition: .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #E9E2D2;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(252, 223, 145, .12), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(111, 127, 95, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(4.5rem, 9vw, 7.5rem);
  overflow: hidden;
}
.hero::before {
  /* trama sutil de línea decorativa */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(252, 223, 145, .04) 1px, transparent 1px);
  background-size: 100% 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center;
}
.hero h1 { color: #FFFBEF; }
.hero h1 em { font-style: italic; color: var(--gold-light); font-weight: 500; }
.hero .eyebrow { color: var(--gold-light); }
.lead { font-size: 1.12rem; color: #D8D2C4; max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 2rem 0 2.2rem; }
.hero-badges {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light);
}
.hero-badges li::before { content: "✦ "; color: var(--gold); }

.hero-visual { display: grid; place-items: center; }
.hero-emblem {
  width: min(100%, 460px); aspect-ratio: 1.1 / 1;
  display: grid; place-items: center;
  border-radius: 28px;
  background: rgba(252, 223, 145, .04);
  border: 1px solid rgba(252, 223, 145, .18);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}
.hero-emblem img { width: 100%; height: auto; }

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--navy); color: #E9E2D2; }
.section-dark h2 { color: #FFFBEF; }
.section-dark .eyebrow { color: var(--gold-light); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Tarjetas de servicios ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: 0 1px 0 rgba(14, 21, 49, .03);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d6c9ad; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--navy); margin-bottom: 1.2rem;
}
.card-icon svg {
  width: 26px; height: 26px; fill: none; stroke: var(--gold-light);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 1.35rem; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }
.about-text > p:not(.eyebrow) { color: #3c4455; }
.values { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; }
.values li { display: flex; gap: .8rem; align-items: baseline; }
.values span { color: var(--gold); font-size: .9rem; }
.about-box {
  background: var(--navy); color: #E9E2D2;
  border-radius: 22px; padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.about-box::before {
  content: "“"; position: absolute; top: .2rem; left: 1.4rem;
  font-family: var(--font-serif); font-size: 6rem; line-height: 1; color: rgba(252, 223, 145, .25);
}
.quote {
  font-family: var(--font-serif); font-style: italic; font-size: 1.6rem; line-height: 1.4;
  color: #FFFBEF; margin: 1.5rem 0 1.2rem;
}
.quote-author { color: var(--gold-light); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 0; }

/* ---------- Proceso ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: paso;
}
.steps li {
  position: relative; padding: 2rem 1.5rem 1.8rem;
  border-top: 2px solid var(--gold);
  background: var(--paper);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 1px 0 rgba(14,21,49,.03);
}
.step-num {
  display: block; font-family: var(--font-serif); font-size: 2.6rem; font-weight: 600;
  color: var(--gold); line-height: 1; margin-bottom: .8rem;
}
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- Banda CTA ---------- */
.cta-band {
  background:
    linear-gradient(120deg, rgba(252,223,145,.08), transparent 40%),
    var(--navy-deep);
  color: #E9E2D2; text-align: center;
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  border-top: 1px solid rgba(252,223,145,.18);
  border-bottom: 1px solid rgba(252,223,145,.18);
}
.cta-inner h2 { color: #FFFBEF; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.cta-inner p { color: #CFC8B8; margin-bottom: 1.8rem; }
.cta-band .btn-primary { font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .9rem; }
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--navy); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-serif); font-size: 1.6rem; line-height: 1; color: var(--gold);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .8rem 0 .2rem; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.contact-info > p:not(.eyebrow) { color: #CFC8B8; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.contact-list strong { color: var(--gold-light); font-weight: 600; }
.contact-list a { color: #FFFBEF; text-underline-offset: 3px; }

.contact-form {
  background: var(--paper); color: var(--ink);
  border-radius: 22px; padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .8rem 1rem; border-radius: 10px;
  border: 1px solid #d9cfb9; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(184,147,74,.18);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .invalid { border-color: #b3261e; }
.form-error {
  background: #fdecea; color: #8a1f17; border-radius: 10px; padding: .7rem 1rem; font-size: .9rem;
}
.form-note { font-size: .78rem; color: var(--muted); margin: 1rem 0 0; text-align: center; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-deep); color: #B9B3A4; padding-top: 3.5rem; }
.footer-grid {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(252,223,145,.14);
}
.footer-grid img { width: 150px; height: auto; margin-bottom: .6rem; }
.footer-grid p { margin: 0; font-size: .9rem; }
.footer-grid nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-grid nav a { text-decoration: none; color: var(--gold-light); font-size: .9rem; }
.footer-grid nav a:hover { text-decoration: underline; }
.copy { padding: 1.4rem 0 1.8rem; font-size: .8rem; text-align: center; }
.copy p { margin: 0; }
.credit { margin-top: .5rem !important; }
.credit a { color: var(--gold-light); text-decoration: none; font-weight: 600; }
.credit a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; }
  .hero-emblem { width: min(70%, 300px); }
  .about-box { order: 2; }
}

@media (max-width: 760px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep);
    border-top: 1px solid rgba(252,223,145,.15);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav a:not(.btn) { padding: 1rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.05); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn-small { margin: 1rem 1.5rem 1.2rem; align-self: flex-start; }
  .site-header { position: sticky; }
  .nav-wrap { position: relative; }
  .cards, .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
