/* Variables, reset, tipografía y utilidades generales. */

:root {
  --ink: #0c2630;
  --ink-raised: #143642;
  --ink-deep: #071a21;
  --mist: #edf2ee;
  --paper: #fbfcfa;
  --amber: #ffb52e;
  --amber-strong: #ffc65c;
  --amber-text: #805000;
  --aqua: #7fdccb;

  --on-dark: #e8f0ed;
  --on-dark-muted: #a9bfbd;
  --on-light: #12303a;
  --on-light-muted: #4a6068;
  --line-dark: #2a4d59;
  --line-light: #c9d6d0;
  --line-control: #7a8d87; /* Bordes de controles: contraste mínimo de 3:1. */

  --error-dark: #ffb4a9;
  --error-light: #b3261e;
  --success: #1c7c5c;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-code: "JetBrains Mono", Consolas, monospace;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-height: 4.25rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
}

h2 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.18; letter-spacing: -.01em; }

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

.section--light :focus-visible,
.contact-form :focus-visible,
.modal :focus-visible { outline-color: #0b6e80; }

.container {
  width: min(100%, 78rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section--dark { background: var(--ink); color: var(--on-dark); }
.section--light { background: var(--mist); color: var(--on-light); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head p { margin-top: 1rem; font-size: 1.15rem; }
.section--dark .section-head p { color: var(--on-dark-muted); }
.section--light .section-head p { color: var(--on-light-muted); }

.prose p + p { margin-top: 1.1em; }

.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: .6rem 1rem;
  border-radius: 6px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { top: .75rem; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3rem;
  padding: .7rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--small { min-height: 2.6rem; padding: .5rem 1.1rem; font-size: .975rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--amber); color: var(--ink-deep); }
.btn--primary:hover { background: var(--amber-strong); }

.btn--outline-light { border-color: var(--on-dark-muted); color: var(--on-dark); }
.btn--outline-light:hover { border-color: var(--amber); color: var(--amber); }

.btn--outline-dark { border-color: var(--on-light); color: var(--on-light); }
.btn--outline-dark:hover { background: var(--on-light); color: var(--paper); }

/* Entrada al hacer scroll. Sin JavaScript, el contenido se ve igual. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
