/* ============ Duarte Legal Ensenada ============ */
:root {
  --bg: #0b0d11;
  --bg-dark: #08090c;
  --panel: #11141a;
  --gold: #c9a961;
  --gold-light: #e0c078;
  --text: #f2efe8;
  --body: #b6bac2;
  --muted: #9aa0ab;
  --dim: #8b909a;
  --faint: #5d626c;
  --border: rgba(201, 169, 97, 0.16);
  --border-strong: rgba(201, 169, 97, 0.25);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--text); margin: 0; }
h2 { font-size: 44px; line-height: 1.15; }
h3 { font-size: 31px; }
.center { text-align: center; }

.kicker { font-size: 11.5px; letter-spacing: 0.4em; }
.kicker.muted { color: var(--dim); }
.kicker.gold, .gold { color: var(--gold); }
.center + h2 { margin-top: 18px; }

.lead { font-size: 15.5px; line-height: 1.75; color: var(--muted); margin: 20px 0 0; }

/* ---- Animations ---- */
@keyframes duPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes duRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes duLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes duGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0); } 50% { box-shadow: 0 0 44px 0 rgba(201, 169, 97, 0.18); } }

.rise { animation: duRise 0.9s ease both; }
.rise.d1 { animation-delay: 0.15s; }
.rise.d2 { animation-delay: 0.35s; }
.rise.d3 { animation-delay: 0.5s; }
.rise.d4 { animation-delay: 0.65s; }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .rise, .reveal { animation: none; opacity: 1; transform: none; transition: none; }
}

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 64px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.18);
  background: rgba(11, 13, 17, 0.92);
  backdrop-filter: blur(12px);
}
.nav-brand { font-family: var(--serif); font-size: 19px; letter-spacing: 0.28em; color: var(--text); font-weight: 500; }
.nav-brand:hover { color: var(--text); }
.nav-brand span { color: var(--gold); }
.nav-links { display: flex; gap: 34px; align-items: center; font-size: 12.5px; letter-spacing: 0.14em; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--gold); }
.nav-links .nav-cta { color: var(--gold); border: 1px solid rgba(201, 169, 97, 0.5); padding: 9px 20px; }
.nav-links .nav-cta:hover { background: var(--gold); color: var(--bg); }

/* ---- Buttons ---- */
.btn { display: inline-block; font-size: 13px; letter-spacing: 0.16em; padding: 17px 36px; font-weight: 600; cursor: pointer; border: none; font-family: var(--sans); }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-light); color: var(--bg); }
.btn-ghost { border: 1px solid rgba(242, 239, 232, 0.3); color: var(--text); padding: 16px 34px; background: transparent; font-weight: 400; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { font-size: 12.5px; padding: 13px 28px; }
.link-btn { background: none; border: none; font-family: var(--sans); font-size: 12px; color: var(--dim); margin-top: 18px; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--gold); }

/* ---- Hero ---- */
.hero { padding: 120px 90px 104px; text-align: center; position: relative; overflow: hidden; }
.hero-frame { position: absolute; inset: 36px; border: 1px solid rgba(201, 169, 97, 0.14); pointer-events: none; animation: duGlow 6s ease-in-out infinite; }
.hero-kicker { font-size: 12px; letter-spacing: 0.42em; color: var(--gold); }
.hero h1 { font-size: 76px; line-height: 1.08; max-width: 860px; margin: 34px auto 0; }
.hero h1 em { color: var(--gold); }
.hero-rule { width: 64px; height: 1px; background: var(--gold); margin: 38px auto; transform-origin: center; animation: duLine 1s 0.5s ease both; }
.hero-sub { font-size: 17px; line-height: 1.7; color: var(--body); max-width: 580px; margin: 0 auto; }
.hero-actions { display: flex; gap: 18px; justify-content: center; margin-top: 46px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 64px; justify-content: center; margin-top: 76px; }
.stat-num { font-family: var(--serif); font-size: 34px; color: var(--gold); }
.stat-label { font-size: 11px; letter-spacing: 0.24em; color: var(--dim); margin-top: 4px; }
.stat-sep { width: 1px; background: rgba(201, 169, 97, 0.2); }

/* ---- Sections ---- */
.section { padding: 96px 64px; border-top: 1px solid var(--border); }
.section-dark { background: var(--bg-dark); }

/* ---- Servicios ---- */
.services { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--border); margin-top: 48px; border: 1px solid var(--border); }
.service { background: var(--bg); padding: 48px 38px; margin: 0; transition: background 0.3s ease; }
.service:hover { background: var(--panel); }
.service p { font-size: 14.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.service-star { background: var(--panel); position: relative; }
.service-star::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold); }
.service-tag { font-size: 10px; letter-spacing: 0.3em; color: var(--gold); margin-bottom: 10px; }
.mini-rule { width: 34px; height: 1px; background: rgba(201, 169, 97, 0.5); margin: 16px 0; }

/* ---- Tecnología ---- */
.tech { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.tech h2 { font-size: 46px; margin-top: 20px; }
.tech-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.tech-item { background: var(--bg); padding: 26px 30px; display: flex; gap: 20px; align-items: baseline; transition: background 0.3s ease; }
.tech-item:hover { background: var(--panel); }
.tech-num { font-family: var(--serif); font-size: 22px; color: var(--gold); }
.tech-title { font-size: 15px; color: var(--text); letter-spacing: 0.04em; }
.tech-desc { font-size: 13.5px; line-height: 1.6; color: var(--dim); margin-top: 5px; }

/* ---- Método ---- */
.moments { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; margin: 56px auto 0; max-width: 1100px; }
.moment { border-top: 1px solid var(--gold); padding-top: 26px; }
.moment-tag { font-size: 11px; letter-spacing: 0.3em; color: var(--gold); }
.moment h3 { font-size: 26px; margin-top: 12px; }
.moment p { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; }

/* ---- Diagnóstico ---- */
.diag { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.2fr; gap: 70px; align-items: start; }
.diag h2 { font-size: 46px; margin-top: 20px; }
.disclaimer { font-size: 12px; line-height: 1.7; color: var(--faint); margin-top: 24px; border-left: 1px solid rgba(201, 169, 97, 0.3); padding-left: 16px; }
.diag-panel { border: 1px solid var(--border-strong); padding: 38px; background: var(--bg); }
.panel-label { font-size: 11px; letter-spacing: 0.26em; color: var(--dim); }
.panel-label.gold { color: var(--gold); }
#case-text { width: 100%; margin-top: 14px; border: 1px solid rgba(242, 239, 232, 0.16); background: transparent; padding: 18px; font-family: var(--sans); font-size: 14.5px; line-height: 1.6; color: var(--text); min-height: 130px; resize: vertical; outline: none; }
#case-text:focus { border-color: rgba(201, 169, 97, 0.6); }
#case-text::placeholder { color: #6d727c; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.chip { font-family: var(--sans); font-size: 11.5px; color: var(--muted); border: 1px solid rgba(242, 239, 232, 0.14); background: transparent; padding: 7px 14px; cursor: pointer; }
.chip:hover { border-color: var(--gold); color: var(--gold); }
.panel-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 16px; }
.status { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: duPulse 1.6s infinite; }
.error { margin-top: 16px; font-size: 13px; color: #c98a61; border: 1px solid rgba(201, 138, 97, 0.3); padding: 12px 16px; }

.result-head { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.gauge { width: 96px; height: 96px; flex: none; }
#gauge-arc { transition: stroke-dashoffset 1.4s ease; }
#gauge-text { font: 600 22px var(--sans); }
.result-title { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--text); }
.result-badge { font-size: 12px; letter-spacing: 0.2em; color: var(--gold); margin-top: 6px; }
.result-summary { font-size: 14.5px; line-height: 1.75; color: var(--body); margin-top: 22px; border-top: 1px solid var(--border); padding-top: 22px; }
.factor { display: flex; gap: 12px; align-items: baseline; margin-top: 12px; }
.factor .diamond { color: var(--gold); font-size: 12px; }
.factor span:last-child { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.next-step { margin-top: 28px; background: var(--panel); border: 1px solid rgba(201, 169, 97, 0.3); padding: 22px 24px; }
.next-text { font-size: 14.5px; line-height: 1.65; color: var(--text); margin-top: 8px; }
.next-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.next-actions .btn-sm { font-size: 12px; padding: 12px 22px; }

/* ---- Testimonios ---- */
.testimonials { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; margin: 52px auto 0; max-width: 1160px; }
.testimonial { border: 1px solid var(--border); padding: 38px 34px; margin: 0; transition: border-color 0.3s ease; }
.testimonial:hover { border-color: rgba(201, 169, 97, 0.45); }
.quote-mark { font-family: var(--serif); font-size: 44px; line-height: 0; color: var(--gold); height: 20px; }
.testimonial p { font-family: var(--serif); font-size: 20px; font-style: italic; line-height: 1.5; color: #e6e2d8; margin: 0; }
.testimonial footer { margin-top: 24px; font-size: 12px; letter-spacing: 0.18em; color: var(--dim); }

/* ---- CTA + Footer ---- */
.cta { padding: 110px 64px 0; text-align: center; }
.cta-title { font-size: 52px; max-width: 700px; margin: 22px auto 0; }
.cta-actions { display: inline-flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; justify-content: center; }
.footer { display: flex; justify-content: space-between; align-items: center; margin-top: 90px; padding: 28px 0; border-top: 1px solid var(--border); }
.footer-brand { font-family: var(--serif); font-size: 16px; letter-spacing: 0.3em; color: var(--dim); }
.footer-brand span { color: var(--gold); }
.footer-legal { font-size: 11px; letter-spacing: 0.24em; color: var(--faint); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .tech, .diag { grid-template-columns: 1fr; gap: 48px; }
  .services, .moments, .testimonials { grid-template-columns: 1fr; }
  .hero h1 { font-size: 56px; }
}
@media (max-width: 720px) {
  .nav { padding: 16px 24px; flex-direction: column; gap: 14px; }
  .nav-links { gap: 18px; flex-wrap: wrap; justify-content: center; }
  .hero { padding: 80px 28px 72px; }
  .hero-frame { inset: 14px; }
  .hero h1 { font-size: 40px; }
  .hero-stats { flex-direction: column; gap: 28px; }
  .stat-sep { display: none; }
  .section { padding: 64px 24px; }
  .cta { padding: 80px 24px 0; }
  .footer { flex-direction: column; gap: 12px; text-align: center; }
  h2 { font-size: 34px; }
  .tech h2, .diag h2 { font-size: 34px; }
  .diag-panel { padding: 24px; }
  .panel-foot { flex-direction: column; align-items: stretch; text-align: center; }
}
