/* =========================================================
   Casih & Asociados — Oscuro cálido
   ========================================================= */
@property --mesh-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg:      #0E0B09;
  --bg-2:    #15110E;
  --bg-3:    #1E1813;
  --cream:   #F2EBDA;
  --cream-2: #DDD2BC;
  --cream-3: #9A8D76;
  --gold:    #C49A5B;
  --gold-2:  #D9B77F;
  --wa:      #1FA855;
  --wa-2:    #178D46;
  --line:    rgba(242,235,218,.12);
  --serif:   "Manrope", "Inter", system-ui, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter:  clamp(20px, 5vw, 56px);
  --max:     1160px;
  --ease:    cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -.025em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.015em; }
em { font-style: normal; color: var(--gold-2); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--bg); padding: 8px 14px; z-index: 300; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }

.kicker { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; font-weight: 500; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: .95rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn .ic { width: 1.25em; height: 1.25em; flex: none; }
.btn-sm { padding: .7rem 1.15rem; font-size: .92rem; }
.btn-lg { padding: 1.1rem 1.8rem; font-size: 1.05rem; }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgba(31,168,85,.25); }
.btn-wa:hover { background: var(--wa-2); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31,168,85,.35); }
.btn-ghost { border-color: var(--line); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-2px); }

/* ---------- Header ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(14,11,9,.92); border-color: var(--line); backdrop-filter: blur(10px); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 76px; }
.brand img { height: 50px; width: auto; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: .92rem; color: var(--cream-2); position: relative; padding: .3rem 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; margin-right: -10px; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--cream); transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:nth-child(1) { top: 18px; } .burger span:nth-child(2) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; justify-content: center; gap: 2rem; padding: 100px var(--gutter) 40px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.menu.is-open { opacity: 1; visibility: visible; }
.menu nav { display: flex; flex-direction: column; gap: .4rem; }
.menu nav a { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; text-decoration: none; padding: .3rem 0; border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 130px 0 64px; overflow: clip; isolation: isolate; }
.hero-mesh { position: absolute; inset: -20%; z-index: -2; filter: blur(70px); opacity: .55;
  background:
    radial-gradient(40% 40% at 20% 30%, rgba(196,154,91,.45), transparent 70%),
    radial-gradient(35% 35% at 80% 20%, rgba(168,92,40,.30), transparent 70%),
    conic-gradient(from var(--mesh-angle) at 60% 70%, rgba(196,154,91,.18), rgba(30,24,19,.0) 40%, rgba(196,154,91,.14) 70%, rgba(30,24,19,0));
  animation: mesh 26s linear infinite; }
@keyframes mesh { to { --mesh-angle: 360deg; } }
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero-title { font-size: clamp(2.8rem, 8vw, 6.4rem); max-width: 14ch; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--cream-2); max-width: 36em; margin: 1.6rem 0 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin-top: 3.4rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--cream); }
.hero-facts span { font-size: .88rem; color: var(--cream-3); }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 11vw, 128px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(36px, 6vw, 64px); }

/* Áreas */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.area { background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 2rem 1.8rem; display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.area:hover { transform: translateY(-6px); border-color: rgba(196,154,91,.5); box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(196,154,91,.15); }
.area-num { font-family: var(--serif); font-weight: 600; color: var(--gold); font-size: 1rem; letter-spacing: .04em; margin-bottom: 1.2rem; }
.area h3 { margin-bottom: 1.2rem; }
.area ul { flex: 1; margin-bottom: 1.8rem; }
.area li { padding: .55rem 0; border-top: 1px solid var(--line); color: var(--cream-2); font-size: .98rem; }
.area-cta { color: var(--gold-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.area-cta span { display: inline-block; transition: transform .25s var(--ease); }
.area-cta:hover span { transform: translateX(5px); }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: s; }
.step { position: relative; padding-top: 1.6rem; border-top: 1px solid var(--gold); }
.step-n { font-family: var(--serif); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--gold); display: block; margin-bottom: .8rem; }
.step h3 { margin-bottom: .6rem; }
.step p { color: var(--cream-2); margin: 0; }
.inline-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin: 3rem 0 0; color: var(--cream-2); }

/* Estudio */
.estudio { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.estudio-photo { margin: 0; border-radius: 14px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.estudio-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(14,11,9,.45)); pointer-events: none; }
.estudio-photo img { width: 100%; height: auto; transition: transform 1.2s var(--ease); filter: saturate(.95) contrast(1.03); }
.estudio-photo:hover img { transform: scale(1.03); }
.estudio-text h2 { margin-bottom: .6rem; }
.matricula { color: var(--gold); font-size: .9rem; letter-spacing: .06em; margin-bottom: 1.6rem; }
.estudio-text p:not(.kicker):not(.matricula) { color: var(--cream-2); }

/* FAQ */
.faq-wrap { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.35rem 2.4rem 1.35rem 0; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.6rem; color: var(--gold); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--cream-2); padding-right: 2rem; margin: 0 0 1.4rem; }

/* Cierre y contacto */
.final-cta { text-align: center; padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.final-cta h2 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); margin-bottom: 2.2rem; }
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: stretch; border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 64px); }
.contact-list { margin: 0; display: grid; gap: 1.3rem; align-content: start; }
.contact-list dt { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .2rem; }
.contact-list dd { margin: 0; color: var(--cream-2); }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.contact-list a:hover { color: var(--gold-2); border-color: var(--gold); }
.link-arrow { color: var(--gold-2); font-weight: 500; }
.map { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); min-height: 340px; background: var(--bg-3); }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; filter: grayscale(.85) invert(.92) contrast(.9) hue-rotate(180deg); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 90px; }
.footer-inner { display: flex; align-items: center; gap: 1.5rem; }
.footer img { height: 56px; width: auto; opacity: .85; }
.legal { margin: 0; font-size: .82rem; color: var(--cream-3); line-height: 1.6; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 95; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.45); transition: transform .25s var(--ease), background .25s; }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); background: var(--wa-2); }

/* ---------- Reveal (seguro: visible si no hay JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .btn-wa { margin-left: auto; }
  .burger { display: block; }
  .areas, .steps { grid-template-columns: 1fr; }
  .estudio { grid-template-columns: 1fr; }
  .estudio-photo { max-width: 460px; }
  .contact { grid-template-columns: 1fr; }
  .hero-facts { gap: 1.2rem 2rem; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav .btn-wa span { display: none; }
  .nav .btn-wa { padding: .7rem; }
  .brand img { height: 42px; }
  .hero { padding-top: 110px; }
  .hero-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Solo se apaga lo realmente intrusivo */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Chips de situación (hero) ---------- */
.chips { margin: 1.6rem 0 2.2rem; }
.chips-label { font-size: .9rem; color: var(--cream-3); margin-bottom: .8rem; }
.chips-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { text-decoration: none; font-size: .95rem; padding: .6rem 1.05rem; border: 1px solid rgba(196,154,91,.4); border-radius: 999px; color: var(--cream); background: rgba(196,154,91,.06); transition: background .25s, border-color .25s, transform .25s var(--ease); }
.chip:hover { background: rgba(196,154,91,.18); border-color: var(--gold-2); transform: translateY(-2px); }

/* ---------- Situaciones ---------- */
.lead { color: var(--cream-2); max-width: 36em; margin: 1rem 0 0; font-size: 1.1rem; }
.sits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.sit { background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 1.8rem 1.6rem; display: flex; flex-direction: column; gap: .9rem; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.sit:hover { transform: translateY(-5px); border-color: rgba(196,154,91,.5); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.sit h3 { font-size: 1.3rem; }
.sit p { margin: 0; color: var(--cream-2); font-size: .98rem; }
.sit-bring { font-size: .88rem !important; color: var(--cream-3) !important; padding-top: .8rem; border-top: 1px solid var(--line); flex: 1; }
.sit-bring strong { color: var(--gold); font-weight: 600; }
.sit-cta { color: var(--gold-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.sit-cta span { display: inline-block; transition: transform .25s var(--ease); }
.sit-cta:hover span { transform: translateX(5px); }
.sindical { margin: 1.6rem 0 0; font-size: .95rem; color: var(--cream-3); }
.sindical a { color: var(--gold-2); }
@media (max-width: 900px) { .sits { grid-template-columns: 1fr; } }

/* ---------- Hero: servicios y barra de datos ---------- */
.hero-sub { margin: 1.4rem 0 1rem; }
.hero-services { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin: 0 0 2.2rem; font-weight: 600; font-size: clamp(.95rem, 1.5vw, 1.1rem); color: var(--gold-2); }
.hero-services i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); display: inline-block; }
.hero-title em { font-style: normal; color: var(--gold-2); }
.infobar { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(30,24,19,.55); backdrop-filter: blur(6px); overflow: hidden; }
.info-cell { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; text-decoration: none; }
.info-cell + .info-cell { border-left: 1px solid var(--line); }
.info-cell svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.info-cell p { margin: 0; display: flex; flex-direction: column; line-height: 1.35; }
.info-cell strong { font-weight: 600; font-size: 1rem; }
.info-cell span { font-size: .85rem; color: var(--cream-3); }
.info-link { transition: background .25s; }
.info-link:hover { background: rgba(196,154,91,.1); }
.info-link:hover span { color: var(--gold-2); }
@media (max-width: 900px) {
  .infobar { grid-template-columns: 1fr; }
  .info-cell + .info-cell { border-left: 0; border-top: 1px solid var(--line); }
}

.sit { scroll-margin-top: 96px; }
.sit:target { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 18px 40px rgba(0,0,0,.35); }
.sit-list { margin: 0; display: grid; gap: .45rem; }
.sit-list li { position: relative; padding-left: 1.2rem; color: var(--cream); font-size: .95rem; }
.sit-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
@media (max-width: 900px) { .sits { grid-template-columns: 1fr; } }

/* ---------- Página de gracias ---------- */
.thanks { min-height: 100svh; display: grid; place-items: center; padding: 48px 0; background: radial-gradient(60% 50% at 50% 30%, rgba(196,154,91,.18), transparent 70%), var(--bg); }
.thanks-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.thanks-inner img { height: 70px; width: auto; margin-bottom: 1rem; }
.thanks-inner h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; }
.thanks-inner p { max-width: 30em; color: var(--cream-2); margin: 0; }
.thanks-actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 1rem; }
