/* ==========================================================================
   Habitta — Base: tokens, reset, tipografía, utilidades
   ========================================================================== */

:root {
  /* Paleta institucional */
  --navy: #22344b;          /* Azul profundo — color principal (logo) */
  --navy-900: #17253a;
  --navy-700: #2f4663;
  --cream: #f1ebe3;         /* Blanco roto del logo */
  --paper: #f6f2ec;         /* Fondo predominante */
  --paper-2: #ede7de;       /* Superficie alternativa */
  --stone: #d8d1c5;         /* Gris piedra */
  --stone-400: #b9b1a4;
  --stone-600: #8a8378;
  --ink: #1a2330;           /* Texto principal */
  --ink-soft: #4b5361;      /* Texto secundario */
  --line: rgba(26, 35, 48, 0.14);
  --line-strong: rgba(26, 35, 48, 0.28);
  --line-light: rgba(241, 235, 227, 0.18);

  /* Tipografía */
  --sans: "Satoshi", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;

  --fs-display: clamp(2.75rem, 1.4rem + 5.6vw, 6.4rem);
  --fs-h2: clamp(2.1rem, 1.35rem + 3.1vw, 4rem);
  --fs-h3: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem);
  --fs-lead: clamp(1.075rem, 1rem + 0.35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-label: 0.75rem;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(88px, 11vw, 168px);
  --radius: 2px;
  --header-h: 76px;

  /* Movimiento */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.9s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

::selection { background: var(--navy); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
.on-dark :focus-visible { outline-color: var(--cream); }

/* Tipografía ------------------------------------------------------------- */
.display,
.h2 {
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.display { font-size: var(--fs-display); }
.h2 { font-size: var(--fs-h2); line-height: 1.06; }
.h3 {
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.display em,
.h2 em,
.h3 em,
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38em;
  text-wrap: pretty;
}
.muted { color: var(--ink-soft); }
p { text-wrap: pretty; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.on-dark .label { color: rgba(241, 235, 227, 0.72); }

/* Utilidades ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.on-dark { background: var(--navy); color: var(--cream); }
.on-dark .lead,
.on-dark .muted { color: rgba(241, 235, 227, 0.74); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--navy);
  color: var(--cream);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* Aparición progresiva --------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

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