/* DSInteg / Xaman — Design tokens */
:root {
  /* Cielo nocturno */
  --night: #0A0F1C;
  --night-deep: #070B16;
  --night-rise: #101728;
  --indigo-deep: #1F2A6E;
  --indigo: #3B4EAA;
  --indigo-soft: rgba(59, 78, 170, 0.22);

  /* Luz */
  --bone: #F5F1E8;
  --bone-dim: #D8D3C5;
  --cream: #FAF6EC;
  --cream-edge: #EFEADC;

  /* Tinta */
  --ink: #1C1C1C;
  --ink-soft: #3A3A3A;
  --gray-600: #5A5A5A;
  --gray-300: #B6B2A6;
  --gray-200: #E0DDD3;

  /* Estrella polar */
  --gold: #C9A961;
  --gold-soft: rgba(201, 169, 97, 0.32);
  --gold-faint: rgba(201, 169, 97, 0.12);

  /* Tipografía */
  --serif: "Instrument Serif", "Source Serif Pro", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing */
  --container: 1240px;
  --pad: 80px;
  --pad-mobile: 24px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--gold); color: var(--night); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}
@media (max-width: 900px) {
  .container { padding: 0 var(--pad-mobile); }
}

/* Tipografía base */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.sans { font-family: var(--sans); }
.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-600);
}
.eyebrow.on-night { color: var(--gold); }
.eyebrow .dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 10px 2px 0;
  vertical-align: middle;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: transform 240ms var(--ease), background 240ms var(--ease), border 240ms var(--ease), color 240ms var(--ease), box-shadow 240ms var(--ease);
}
.btn--gold {
  background: var(--gold);
  color: var(--night);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: #D4B872;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px var(--gold-faint);
}
.btn--ghost-light {
  background: transparent;
  color: var(--bone);
  border-color: rgba(245, 241, 232, 0.22);
}
.btn--ghost-light:hover {
  border-color: var(--bone);
}
.btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border-color: rgba(28, 28, 28, 0.22);
}
.btn--ghost-dark:hover {
  border-color: var(--ink);
}
.btn .star {
  width: 11px; height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
}

/* Link sutil */
.link-subtle {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: opacity 200ms var(--ease);
}
.link-subtle:hover { opacity: 0.7; }

/* Separador entre secciones */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200) 20%, var(--gray-200) 80%, transparent);
  position: relative;
}
.section-divider::after {
  content: "";
  position: absolute;
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--cream);
}
.section-divider.on-night {
  background: linear-gradient(90deg, transparent, rgba(245,241,232,0.12) 20%, rgba(245,241,232,0.12) 80%, transparent);
}
.section-divider.on-night::after { box-shadow: 0 0 0 4px var(--night); }

/* Section padding */
section { padding: 140px 0; }
@media (max-width: 900px) { section { padding: 88px 0; } }

/* Headings */
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(40px, 6.5vw, 84px); line-height: 1.08; }
h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.06; }
h3 { font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.3; letter-spacing: -0.005em; }
p  { margin: 0; }

/* Backgrounds */
.bg-night { background: var(--night); color: var(--bone); }
.bg-night-grad {
  background: linear-gradient(180deg, var(--night) 0%, var(--night) 60%, var(--indigo-deep) 100%);
  color: var(--bone);
}
.bg-cream { background: var(--cream); color: var(--ink); }

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-300);
}
.field input,
.field select,
.field textarea {
  background: transparent;
  color: var(--bone);
  border: none;
  border-bottom: 1px solid rgba(245, 241, 232, 0.22);
  padding: 10px 0;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 200ms var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 60px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C9A961' stroke-width='1.4'%3E%3Cpath d='M3 6 L8 11 L13 6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; background-size: 14px; padding-right: 24px; }
.field select option { color: var(--ink); background: var(--bone); }
.field .error-msg {
  font-size: 12px;
  color: #E37A6A;
  min-height: 14px;
  letter-spacing: 0.04em;
}

/* Star bullet */
.star-bullet {
  display: inline-block;
  margin-right: 12px;
  color: var(--gold);
  font-size: 12px;
  vertical-align: 1px;
}

/* Scroll behavior */
html { scroll-behavior: smooth; }

/* Focus visible — keyboard navigation feedback */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.btn:focus-visible {
  outline-offset: 4px;
  box-shadow: 0 0 0 4px var(--gold-faint);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--gold);
  color: var(--night);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 4px;
  transition: top 200ms var(--ease);
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}

/* Reveal on viewport */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
