/* Normaster® — normasteruio.com · v0.2
   Sistema visual: monocromo del Manual de Usos 2021 (#000 / #575756 / #FFF), Manrope (D-010).
   Proporción áurea (φ = 1,618):
   · Escala tipográfica en pasos de √φ (1,272): 12,6 · 16 · 20,4 · 25,9 · 32,9 · 41,9 px
   · Interlineado del texto: φ (1,618)
   · Espaciado de la serie de Fibonacci: 8 · 13 · 21 · 34 · 55 · 89 · 144 px
   · Retículas a dos columnas en relación 1,618 : 1
   · Medida de lectura contenida (≈ 34 em): el texto no ocupa todo el ancho
   Fondo blanco continuo; solo la portada y el pie son negros, con fundidos graduales. */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color */
  --black: #000000;
  --grey: #575756;          /* gris oficial — texto secundario (7,3:1 sobre blanco) */
  --white: #ffffff;
  --mist: #a9a9a7;          /* texto secundario sobre negro (8,6:1) */
  --line: #e2e2e0;          /* líneas sobre blanco */
  --line-dark: #2a2a29;     /* líneas sobre negro */

  /* Tipografía — pasos de √φ */
  --font: "Manrope", "Helvetica Neue", Arial, system-ui, sans-serif;
  --fs-0: 0.786rem;   /* 12,6 */
  --fs-1: 1rem;       /* 16   */
  --fs-2: 1.272rem;   /* 20,4 */
  --fs-3: 1.618rem;   /* 25,9 */
  --fs-4: 2.058rem;   /* 32,9 */
  --fs-5: 2.618rem;   /* 41,9 */
  --lh: 1.618;
  --lh-tight: 1.236;

  /* Espaciado — Fibonacci */
  --s-1: 0.5rem;      /* 8   */
  --s-2: 0.8125rem;   /* 13  */
  --s-3: 1.3125rem;   /* 21  */
  --s-4: 2.125rem;    /* 34  */
  --s-5: 3.4375rem;   /* 55  */
  --s-6: 5.5625rem;   /* 89  */
  --s-7: 9rem;        /* 144 */

  --max: 67.5rem;     /* 1080 */
  --measure: 34em;
  --gutter: clamp(1.3125rem, 4vw, 3.4375rem);
  --header-h: 3.4375rem; /* 55 */
  --radius: 0.5rem;   /* 8 */
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-1);
  font-weight: 400;
  line-height: var(--lh);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: light;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-1); letter-spacing: 0; }
@media (min-width: 900px) {
  h1 { font-size: var(--fs-5); }
  h2 { font-size: var(--fs-4); }
}

p { margin: 0; }
p + p { margin-top: var(--s-2); }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

sup.r { font-size: 0.5em; vertical-align: super; line-height: 0; margin-left: 0.05em; font-weight: 400; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  padding: var(--s-1) var(--s-2); background: var(--white); color: var(--black); font-weight: 600;
}
.skip-link:focus { top: var(--s-2); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Cabecera: negra, letras blancas ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--black); color: var(--white);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 7.5rem; height: auto; }   /* 120 px */

.site-nav ul {
  display: flex; align-items: center; gap: var(--s-4);
  margin: 0; padding: 0; list-style: none;
}
.site-nav a {
  font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.02em;
  color: var(--white); text-decoration: none; opacity: 0.78;
  transition: opacity 0.2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a.nav-cta {
  opacity: 1;
  padding: 0.375rem var(--s-2);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
}
.site-nav a.nav-cta:hover { background: var(--white); color: var(--black); }

.nav-toggle {
  display: none; align-items: center; gap: var(--s-1);
  padding: var(--s-1) 0; border: 0; background: none; color: var(--white);
  font: inherit; font-size: var(--fs-0); font-weight: 600; cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 1.125rem; height: 0.625rem; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: calc(100% - 1.5px); }
.nav-open .nav-toggle-bars::before { top: calc(50% - 0.75px); transform: rotate(45deg); }
.nav-open .nav-toggle-bars::after { top: calc(50% - 0.75px); transform: rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.625rem; padding: 0.5rem var(--s-3);
  border: 1px solid var(--black); border-radius: var(--radius);
  background: var(--black); color: var(--white);
  font: inherit; font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--white); color: var(--black); }
.btn--line { background: transparent; color: var(--black); }
.btn--line:hover { background: var(--black); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.dark .btn { background: var(--white); color: var(--black); border-color: var(--white); }
.dark .btn:hover { background: transparent; color: var(--white); }
.dark .btn--line { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.dark .btn--line:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.link {
  font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.02em;
  text-decoration: underline; text-underline-offset: 0.35em;
}
.link:hover { text-decoration-thickness: 2px; }

/* ---------- Portada: negro que se funde en blanco ---------- */
.hero {
  color: var(--white);
  padding-block: var(--s-6) var(--s-7);
  background: linear-gradient(180deg,
    #000 0%, #000 64%,
    #0b0b0b 69%, #1f1f1f 74%, #3d3d3c 79%, #575756 83%,
    #858584 87%, #b3b3b2 91%, #dcdcdb 95%, #f6f6f5 98%, #fff 100%);
}
@media (min-width: 900px) { .hero { padding-block: var(--s-7) calc(var(--s-7) * 1.618); } }
.hero .eyebrow { color: var(--mist); }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-top: var(--s-3); max-width: var(--measure); color: var(--mist); }
.hero .btn-row { margin-top: var(--s-4); }

.page-hero .crumbs ol {
  display: flex; flex-wrap: wrap; gap: var(--s-1); margin: 0 0 var(--s-5); padding: 0;
  list-style: none; font-size: var(--fs-0); color: var(--mist);
}
.page-hero .crumbs li + li::before { content: "›"; margin-right: var(--s-1); }
.page-hero .crumbs a { text-decoration: none; }
.page-hero .crumbs a:hover { text-decoration: underline; }

/* ---------- Secciones (todas sobre blanco) ---------- */
.section { padding-block: var(--s-6); }
.section + .section { border-top: 1px solid var(--line); }
.section-tight { padding-top: 0; }

.eyebrow {
  margin: 0 0 var(--s-3);
  font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grey);
}
.eyebrow .num { color: var(--black); margin-right: var(--s-1); font-variant-numeric: tabular-nums; }

.lead { font-size: var(--fs-2); line-height: 1.5; }
.muted { color: var(--grey); }

/* Retícula áurea: 1,618 : 1 */
.golden { display: grid; gap: var(--s-4); }
@media (min-width: 900px) {
  .golden { grid-template-columns: 1fr 1.618fr; gap: var(--s-6); align-items: start; }
  .golden--rev { grid-template-columns: 1.618fr 1fr; }
}
.golden > :first-child h2 { max-width: 14ch; }
.golden .body { max-width: var(--measure); }
.golden .body .lead + p { margin-top: var(--s-3); }

/* Listas con línea */
.ruled { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--black); }
.ruled > li { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.ruled h3 { margin-bottom: 0.25rem; }
.ruled p, .ruled span { color: var(--grey); }
.ruled .n {
  display: inline-block; min-width: var(--s-4);
  font-size: var(--fs-0); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--grey);
}
.ruled--num > li { display: grid; grid-template-columns: var(--s-4) 1fr; }
.ruled--num > li > div { min-width: 0; }

.pair { display: grid; gap: 0.25rem; }
@media (min-width: 700px) { .pair { grid-template-columns: 1fr 1.618fr; gap: var(--s-3); align-items: baseline; } }
.pair strong { font-weight: 600; }

/* ---------- Servicios ---------- */
.services { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
@media (min-width: 900px) { .services { grid-template-columns: 1fr 1fr; gap: var(--s-4); } }
.service {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius);
}
.service .moment {
  font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey);
}
.service h3 { font-size: var(--fs-3); letter-spacing: -0.015em; }
.service .promise { font-weight: 500; }
.service .desc { color: var(--grey); }
.ticks { margin: var(--s-1) 0 0; padding: var(--s-2) 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: var(--s-1); font-size: 0.9375rem; }
.ticks li { display: grid; grid-template-columns: var(--s-3) 1fr; }
.ticks li::before { content: ""; width: var(--s-1); height: 1px; background: var(--black); margin-top: 0.8em; }
.service .link { margin-top: auto; padding-top: var(--s-2); align-self: flex-start; }

/* ---------- Por qué Normaster ---------- */
.features { display: grid; gap: var(--s-4) var(--s-5); margin: var(--s-5) 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li { border-top: 1px solid var(--black); padding-top: var(--s-2); }
.features h3 { margin-bottom: 0.25rem; }
.features p { color: var(--grey); font-size: 0.9375rem; }

.subhead {
  margin: var(--s-6) 0 var(--s-3);
  font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey);
}

/* ---------- Nosotros ---------- */
.about { display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.618fr; gap: var(--s-6); align-items: start; } }
.portrait { margin: 0; }
.portrait img {
  width: 100%; aspect-ratio: 1 / 1.272; object-fit: cover; object-position: 50% 18%;
  border-radius: var(--radius); background: #1d1d1d;
}
.portrait figcaption { margin-top: var(--s-2); font-size: var(--fs-0); color: var(--grey); }
.about .role { margin-top: var(--s-1); font-weight: 500; }
.about .role-sub { font-size: var(--fs-0); color: var(--grey); }
.about .body { margin-top: var(--s-4); max-width: var(--measure); color: var(--grey); }
.about .body strong { color: var(--black); font-weight: 600; }
.firm { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); max-width: var(--measure); }
.firm .stat { display: flex; align-items: baseline; gap: var(--s-2); margin: var(--s-2) 0 var(--s-3); }
.firm .stat b { font-size: var(--fs-5); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.firm .stat span { color: var(--grey); font-size: 0.9375rem; line-height: 1.4; }
.firm p { color: var(--grey); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.tags li { padding: 0.25rem var(--s-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-0); color: var(--grey); }

/* ---------- Contacto ---------- */
.channels { display: grid; gap: var(--s-3); margin-top: var(--s-5); }
@media (min-width: 900px) { .channels { grid-template-columns: repeat(3, 1fr); } }
.channel { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4) var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); }
.channel .k { font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); }
.channel .v { font-size: var(--fs-1); font-weight: 600; overflow-wrap: anywhere; }
.channel p { color: var(--grey); font-size: 0.9375rem; }
.channel .btn { margin-top: auto; align-self: flex-start; }
.channel-gap { flex: 1; min-height: var(--s-2); }
.channel--pending { border-style: dashed; }
.channel--pending .btn { background: transparent; color: var(--grey); border: 1px dashed var(--grey); cursor: not-allowed; }
.note { margin-top: var(--s-3); font-size: var(--fs-0); color: var(--grey); max-width: var(--measure); }

/* ---------- Página de permisos ---------- */
.callout { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--black); border-radius: var(--radius); }
@media (min-width: 900px) { .callout { grid-template-columns: 1.618fr 1fr; align-items: end; gap: var(--s-5); } }
.callout h3 { font-size: var(--fs-2); }
.callout p { color: var(--grey); margin-top: var(--s-1); }
.callout strong { color: var(--black); font-weight: 600; }
.callout .link { justify-self: start; }

.faq { border-top: 1px solid var(--black); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0; cursor: pointer; list-style: none; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-weight: 400; font-size: var(--fs-2); line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 var(--s-3); color: var(--grey); max-width: var(--measure); }

.fine { margin-top: var(--s-4); font-size: var(--fs-0); color: var(--grey); max-width: var(--measure); }
.closing h2 { max-width: 18ch; }
.closing p.muted { margin-top: var(--s-2); max-width: var(--measure); }
.closing .btn-row { margin-top: var(--s-4); }

/* ---------- Pie: blanco que se funde en negro ---------- */
.site-footer {
  color: var(--mist); font-size: 0.9375rem;
  padding: var(--s-7) 0 var(--s-4);
  background: linear-gradient(180deg,
    #fff 0%, #f6f6f5 4%, #dcdcdb 9%, #b3b3b2 14%, #858584 19%,
    #575756 24%, #3d3d3c 29%, #1f1f1f 34%, #0b0b0b 39%, #000 44%, #000 100%);
}
.footer-grid { display: grid; gap: var(--s-4); padding-top: var(--s-6); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.618fr 1fr 1fr; gap: var(--s-5); } }
.footer-brand img { width: 7.5rem; }
.footer-brand p { margin-top: var(--s-3); max-width: 24rem; line-height: 1.5; font-size: var(--fs-0); }
.site-footer h2 { font-size: var(--fs-0); letter-spacing: 0.14em; text-transform: uppercase; color: var(--white); font-weight: 600; margin-bottom: var(--s-2); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-1); font-size: var(--fs-0); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2);
  margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--line-dark); font-size: var(--fs-0);
}

/* ---------- WhatsApp flotante (móvil) ---------- */
.wa-float {
  position: fixed; right: var(--s-2); bottom: var(--s-2); z-index: 40;
  display: none; align-items: center; gap: var(--s-1);
  padding: var(--s-1) var(--s-2); border-radius: var(--radius);
  background: var(--black); color: var(--white); border: 1px solid rgba(255,255,255,0.3);
  font-size: var(--fs-0); font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 21px rgba(0,0,0,0.18);
}
.wa-float svg { width: 1rem; height: 1rem; }

/* ---------- Navegación móvil ---------- */
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; background: var(--black); border-top: 1px solid var(--line-dark); }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--s-1) var(--gutter) var(--s-4); }
  .site-nav li a:not(.nav-cta) { display: block; padding: var(--s-2) 0; border-bottom: 1px solid var(--line-dark); font-size: var(--fs-1); opacity: 1; }
  .site-nav li:last-child { padding-top: var(--s-3); }
  .site-nav a.nav-cta { display: block; text-align: center; padding: var(--s-2); font-size: var(--fs-1); }
  .wa-float { display: inline-flex; }
}

/* ---------- Error 404 ---------- */
.error-page { min-height: 100vh; }
.error-page .brand { margin-bottom: var(--s-6); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .site-header, .wa-float { display: none; }
  .hero, .site-footer { background: #fff; color: #000; }
}
.mt-4 { margin-top: var(--s-4); }
