:root {
  --ink: #0a0d13;
  --ink-2: #0f141d;
  --surface: #131a25;
  --line: rgba(236, 232, 223, 0.1);
  --line-strong: rgba(236, 232, 223, 0.2);
  --text: #ece8df;
  --muted: #a3abb8;
  --faint: #6f7886;
  --brass: #e6a83c;
  --brass-soft: #f3cf86;
  --brass-deep: #8f5d15;
  --horizon: #63d2df;
  --danger: #ff8a7a;
  --radius: 18px;
  --maxw: 1180px;
  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(99, 210, 223, 0.09), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(230, 168, 60, 0.07), transparent 60%);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Campo de estrellas sutil, fijo detrás de todo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 90px 170px, rgba(243, 207, 134, 0.45), transparent),
    radial-gradient(1px 1px at 210px 220px, rgba(255, 255, 255, 0.3), transparent);
  background-size: 260px 260px;
}

img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
em { font-style: italic; color: var(--brass-soft); }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--brass);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--horizon); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 38em; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 0.98rem/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: var(--brass-soft); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-soft); }
.btn-sm { padding: 0.65rem 1.1rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}
.site-header.is-scrolled {
  background: rgba(10, 13, 19, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 1.6rem;
  letter-spacing: 0.01em;
}
.brand-mark { width: 30px; height: 30px; color: var(--brass); }
.brand-core { fill: var(--horizon); opacity: 0.55; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-copy { display: grid; gap: 1.5rem; }
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.9rem, 7vw, 5.8rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.5rem; }

.hero-visual { display: grid; place-items: center; }
.gate {
  width: min(84vw, 470px);
  height: auto;
  filter: drop-shadow(0 30px 80px rgba(99, 210, 223, 0.18));
  animation: gate-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.gate-horizon { transform-box: fill-box; transform-origin: center; animation: horizon 7s ease-in-out infinite; }
.gate-glyphs { transform-box: fill-box; transform-origin: center; animation: spin 80s linear infinite; }
.gate-lamps use { opacity: 0.25; animation: lamp 9s ease-in-out infinite; }
.gate-lamps use:nth-child(1) { animation-delay: 0s; }
.gate-lamps use:nth-child(2) { animation-delay: 0.45s; }
.gate-lamps use:nth-child(3) { animation-delay: 0.9s; }
.gate-lamps use:nth-child(4) { animation-delay: 1.35s; }
.gate-lamps use:nth-child(5) { animation-delay: 1.8s; }
.gate-lamps use:nth-child(6) { animation-delay: 2.25s; }
.gate-lamps use:nth-child(7) { animation-delay: 2.7s; }
.gate-lamps use:nth-child(8) { animation-delay: 3.15s; }
.gate-lamps use:nth-child(9) { animation-delay: 3.6s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes horizon {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes lamp {
  0%, 10% { opacity: 0.25; }
  18%, 70% { opacity: 1; }
  85%, 100% { opacity: 0.25; }
}
@keyframes gate-in {
  from { opacity: 0; transform: scale(0.94) rotate(-8deg); }
  to { opacity: 1; transform: none; }
}

.hero-in { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-in.d1 { animation-delay: 0.12s; }
.hero-in.d2 { animation-delay: 0.24s; }
.hero-in.d3 { animation-delay: 0.36s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.proof {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
}
.proof li { display: flex; align-items: baseline; gap: 0.9rem; }
.proof strong {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--brass-soft);
  min-width: 3.2ch;
}
.proof span { color: var(--muted); font-size: 0.97rem; }

/* Secciones */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.035));
  border-block: 1px solid var(--line);
}
.section-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section h2 {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.06;
}

/* Tarjetas de servicio */
.cards { display: grid; gap: 1.25rem; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: rgba(230, 168, 60, 0.45); transform: translateY(-3px); }
.card-num { font-family: var(--f-mono); font-size: 0.8rem; color: var(--brass); letter-spacing: 0.1em; }
.card h3 { font-family: var(--f-display); font-size: clamp(1.8rem, 2.6vw, 2.1rem); line-height: 1.1; }
.card-desc { color: var(--text); font-weight: 500; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; color: var(--muted); font-size: 0.97rem; }
.ticks li { position: relative; padding-left: 1.4rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--brass);
  transform: rotate(45deg);
}
.card-fit {
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
/* Tarjeta ancha (especialidad): ocupa toda la fila */
.card-wide {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.5rem 3rem;
  align-items: start;
  border-color: rgba(230, 168, 60, 0.35);
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(230, 168, 60, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}
.card-wide-head { display: grid; gap: 1rem; }
.card-wide .card-fit { margin-top: 0.5rem; }
.card-fit span {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--horizon);
}

/* Proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; counter-reset: none; }
.step { position: relative; display: grid; gap: 0.6rem; }
.step-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brass);
  color: var(--brass-soft);
  font-family: var(--f-mono);
  font-size: 0.95rem;
  background: var(--ink);
  box-shadow: 0 0 0 6px rgba(230, 168, 60, 0.08);
}
.step h3 { font-family: var(--f-display); font-size: 1.7rem; }
.step p { color: var(--muted); font-size: 0.97rem; }

.tools { margin-top: clamp(3rem, 6vw, 4.5rem); display: grid; gap: 1rem; }
.tools-label { color: var(--faint); font-size: 0.9rem; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pills li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

/* Fundadora */
.about { display: grid; gap: 2.5rem; align-items: center; }
.about-mark { display: grid; place-items: center; }
.monogram {
  position: relative;
  display: grid;
  place-items: center;
  width: min(62vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 14px solid var(--brass);
  background: radial-gradient(circle, rgba(99, 210, 223, 0.35), rgba(27, 83, 102, 0.15) 55%, transparent 72%);
  box-shadow: 0 0 0 1px rgba(243, 207, 134, 0.35), 0 30px 80px rgba(99, 210, 223, 0.12);
}
.monogram::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 6px dashed rgba(230, 168, 60, 0.55);
}
.monogram span { font-family: var(--f-display); font-size: clamp(4rem, 12vw, 6rem); color: var(--text); }
.about-copy { display: grid; gap: 1.1rem; }
.about-copy p { color: var(--muted); max-width: 38em; }
.about-copy .about-role { color: var(--brass-soft); font-weight: 600; margin-top: -0.4rem; }
.facts { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.facts li { position: relative; padding-left: 1rem; color: var(--text); font-size: 0.95rem; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--horizon);
}

/* Preguntas */
.faq-wrap { display: grid; gap: 0; }
.faq { display: grid; border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.12rem;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--f-mono);
  font-size: 1.4rem;
  color: var(--brass);
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.4rem; color: var(--muted); max-width: 44em; }

/* Contacto */
.contact { display: grid; gap: 3rem; align-items: start; }
.contact-copy { display: grid; gap: 1.25rem; }
.next { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.next li { display: flex; align-items: center; gap: 0.9rem; color: var(--text); }
.next span {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  color: var(--brass-soft);
  font-family: var(--f-mono);
  font-size: 0.8rem;
}

.form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, rgba(19, 26, 37, 0.95), rgba(15, 20, 29, 0.95));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
}
.field { display: grid; gap: 0.45rem; }
.field-row { display: grid; gap: 1.1rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field label span { color: var(--brass); }
.field small { color: var(--faint); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--ink-2);
  color: var(--text);
  font: 500 1rem/1.4 var(--f-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field ::placeholder { color: var(--faint); }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e6a83c' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(230, 168, 60, 0.18);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: var(--danger); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--faint); font-size: 0.85rem; text-align: center; }
.form-status { min-height: 1.5em; font-weight: 600; text-align: center; }
.form-status.is-success { color: var(--horizon); }
.form-status.is-error { color: var(--danger); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--faint); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }

/* Aparición al hacer scroll (main.js solo oculta lo que está debajo del viewport) */
[data-reveal] { transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
[data-reveal].is-pending { opacity: 0; transform: translateY(24px); }

/* Responsive */
@media (max-width: 759px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .hero-visual { order: -1; }
  .gate { width: min(68vw, 300px); }
}

@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .proof { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .proof li { flex-direction: column; gap: 0.5rem; }
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ticks-2col { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .proof { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1080px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card-wide { grid-template-columns: 0.9fr 1.6fr; }
}

@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 22px;
    left: 56px;
    right: -1rem;
    height: 1px;
    background: linear-gradient(90deg, var(--brass), transparent);
    opacity: 0.5;
  }
  .about { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; }
  .faq-wrap { grid-template-columns: 0.8fr 1.2fr; gap: 3rem; align-items: start; }
  .faq-wrap .section-head { margin-bottom: 0; }
  .contact { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .gate-lamps use { opacity: 1; }
  [data-reveal].is-pending { opacity: 1; transform: none; }
}
