/* ============================================================
   NICOL MILLÁN · THE STORY ATELIER
   Sistema de identidad — Brand Book Edición I · MMXXVI
   "Lo extraordinario está en tu historia."
   ------------------------------------------------------------
   Este archivo es la LEY visual del sitio. Cada valor deriva
   del Brand Book. No se añade nada que el documento no permita.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500&display=swap');

/* ---------- 12 · COLOR (paleta exacta del Brand Book) ---------- */
:root {
  --ink:      #151513;   /* La dirección creativa */
  --bone:     #F2F0EB;   /* El lienzo (fondo por defecto) */
  --lavender: #E1E5F1;   /* La imaginación */
  --lilac:    #D9CFE2;   /* La narrativa */
  --plum:     #A295AE;   /* La profundidad */
  --sage:     #D1DBB8;   /* La naturaleza */
  --olive:    #ABBA7C;   /* La estrategia */
  --butter:   #E6DA83;   /* La creatividad y la luz (dosis mínimas) */

  /* Luz del resplandor del wordmark — opalescente lila-platino (fina, elegante) */
  --glow-fill: #F1ECF6;              /* nácar con matiz lila — las letras "encendidas" */
  --glow-a:    rgba(214,203,228,.92);/* lila cercano */
  --glow-b:    rgba(199,201,231,.60);/* lavanda intermedio */
  --glow-c:    rgba(162,149,174,.38);/* plum — profundidad del halo */
  --glow-soft: rgba(214,203,228,.30);/* calidez base sutil */

  --ink-soft: #3a3934;
  --bone-2:   #EAE7DF;
  --line:     rgba(21,21,19,.16);

  /* ---------- 05 · TIPOGRAFÍA ---------- */
  /* Display/Títulos: Canela → sustituta gratuita Cormorant Garamond */
  --ff-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  /* Cuerpo/Labels: Söhne → sustituta gratuita Inter */
  --ff-sans:    'Inter', system-ui, -apple-system, sans-serif;

  /* ---------- Retícula editorial · aire ---------- */
  --maxw: 1240px;                 /* 12 columnas */
  --gutter: clamp(1.4rem, 4vw, 3.2rem);
  --section-y: clamp(5rem, 12vh, 11rem);

  /* ---------- Interacción (cap. 19): 600–900ms ---------- */
  --t-slow: 820ms cubic-bezier(.19,1,.22,1);
  --t-med:  600ms cubic-bezier(.19,1,.22,1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);          /* Bone 60% — fondo por defecto */
  color: var(--ink);
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(1rem, .55rem + .55vw, 1.125rem);
  line-height: 1.75;
  letter-spacing: .003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html { overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--lilac); color: var(--ink); }

/* ---------- Cursor con Punto de Origen (cap. 19) ---------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 9999;
    border-radius: 50%; pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
  }
  .cursor-dot  { width: 6px; height: 6px; background: var(--bone); }
  .cursor-ring {
    width: 30px; height: 30px; border: 1px solid var(--bone);
    transition: width .3s ease, height .3s ease, opacity .3s ease;
    opacity: .55;
  }
  .cursor-ring.grow { width: 54px; height: 54px; opacity: .9; }
  a, button, .p-item, input, textarea, select { cursor: none; }
}

/* ============================================================
   05 · SISTEMA TIPOGRÁFICO
   Serif display de alto contraste · nunca bold
   ============================================================ */
.display, h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 500;                 /* nunca bold */
  line-height: 1.06;
  letter-spacing: .01em;            /* tracking +1% */
  margin: 0;
  color: var(--ink);
}
h1, .h1 { font-size: clamp(2.6rem, 1.4rem + 5vw, 6rem); line-height: 1.02; }
h2, .h2 { font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem); }
h3, .h3 { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.4rem); }

.italic, em, .quote {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
}

/* Cursivas / citas / filosofía / énfasis emocional */
.quote {
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.6rem);
  line-height: 1.28;
  color: var(--ink);
}

p { margin: 0 0 1.2em; max-width: 62ch; }
.lead { font-size: clamp(1.05rem, .9rem + .6vw, 1.3rem); line-height: 1.7; }

/* Labels: caps, 10–12px, tracking +30 a +42% */
.label {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .36em;
  color: var(--ink-soft);
}
.label--butter { color: #8a7d1f; }

/* ============================================================
   10 · SISTEMA GRÁFICO
   ============================================================ */

/* El campo — un solo color de fondo a sangre completa */
.field           { background: var(--bone); }
.field--ink      { background: var(--ink);      color: var(--bone); }
.field--lavender { background: var(--lavender); }
.field--lilac    { background: var(--lilac); }
.field--sage     { background: var(--sage); }
.field--plum     { background: var(--plum);     color: var(--bone); }
.field--ink h1, .field--ink h2, .field--ink h3,
.field--plum h1, .field--plum h2, .field--plum h3 { color: var(--bone); }
.field--ink .label, .field--plum .label { color: rgba(242,240,235,.7); }

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

/* El vacío es el lujo — ≥50% de aire */
.measure { max-width: 46rem; }
.measure-sm { max-width: 34rem; }

/* La Línea de Historia — separador propietario con Punto de Origen */
.story-line {
  display: flex; align-items: center; gap: 0;
  border: 0; height: 1px; background: none; margin: 0;
}
.story-line::before,
.story-line::after {
  content: ""; height: 1px; background: var(--line); flex: 1;
}
.story-line::after { }
.story-line i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink); flex: 0 0 auto; margin: 0 2px;
}
.field--ink .story-line::before, .field--ink .story-line::after,
.field--plum .story-line::before, .field--plum .story-line::after { background: rgba(242,240,235,.3); }
.field--ink .story-line i, .field--plum .story-line i { background: var(--bone); }

/* La esquina firmada — monograma / huella en esquina inferior */
.signed-corner {
  position: absolute; right: var(--gutter); bottom: 1.6rem;
  width: 34px; height: 34px; opacity: .6;
}

/* ============================================================
   09 · LA HUELLA (espiral) — utilidades de dibujo con scroll
   ============================================================ */
.huella path { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.huella .origin { fill: var(--butter); stroke: none; }   /* Punto de Origen = la luz */

/* Dibujado trazo a trazo (Home) */
.huella--draw path {
  stroke-dasharray: var(--len, 900);
  stroke-dashoffset: var(--len, 900);
  transition: stroke-dashoffset 1.6s cubic-bezier(.33,1,.68,1);
}
.huella--draw.drawn path { stroke-dashoffset: 0; }

/* ============================================================
   06 · WORDMARK — "La O de NICOL es La Huella"
   Serif display de alto contraste; la O es la espiral.
   Se compone con tipografía + trazo, nunca se re-teclea a la ligera.
   ============================================================ */
.wordmark {
  font-family: var(--ff-display); font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
  display: inline-flex; align-items: center; line-height: 1;
  white-space: nowrap; color: currentColor;
}
.brandmark { width: 1.35em; height: 1.15em; margin-right: .5em; flex-shrink: 0; }
.wordmark .oh {                 /* la O convertida en espiral */
  display: inline-block; width: .84em; height: .84em;
  margin: 0 .02em; position: relative; top: .01em;
}
.wordmark .oh svg { width: 100%; height: 100%; }
.wordmark .oh path { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; }
.wordmark .oh .origin { fill: var(--butter); stroke: none; }
.wordmark .wm-gap { width: .5ch; display: inline-block; }
.wordmark .destello {           /* El Destello — acento de firma */
  width: .34em; height: .34em; margin-left: .12em; align-self: flex-start;
  position: relative; top: -.1em; color: var(--ink);
}
.field--ink .wordmark .destello, .nav--ink .wordmark .destello, .footer .wordmark .destello { color: var(--butter); }
.wordmark .destello svg { width: 100%; height: 100%; fill: currentColor; }

/* Wordmark grande (hero / footer) */
.wordmark--xl { letter-spacing: .06em; }
.wordmark--stack { flex-direction: column; align-items: center; line-height: .92; }

/* Wordmark oficial (SVG bespoke inyectado) — hereda currentColor */
.wordmark--svg { letter-spacing: 0; position: relative; }
.wordmark--svg svg {
  height: clamp(2rem, 1.4rem + 1.1vw, 2.6rem);   /* logo protagonista, trazos nítidos */
  width: auto; display: block;
  shape-rendering: geometricPrecision;
}
.wordmark--svg.wordmark--xl svg { height: clamp(3rem, 7vw, 5.2rem); }
.footer .wordmark--svg svg { color: var(--bone); }
/* En pantallas pequeñas, ligeramente más compacto para no chocar con el menú */
@media (max-width: 520px) {
  .wordmark--svg svg { height: 1.7rem; }
}

/* ---------- Resplandor que VIAJA con el cursor ----------
   Butter = "la luz que entra por la grieta" (Brand Book, cap. 12).
   Sobre el wordmark se superpone una segunda capa idéntica en luz
   Butter (.wm-shine); una máscara circular la revela solo bajo el
   cursor, así la luz recorre las letras a medida que pasas el mouse. */
.wordmark--svg { --r: 2.6em; transition: transform .85s cubic-bezier(.19,1,.22,1); }
.wordmark--svg.wordmark--xl { --r: 3.4em; }
.wordmark--svg .wm-base, .wordmark--svg .wm-shine { display: block; }
.wordmark--svg .wm-base svg { transition: filter .85s cubic-bezier(.19,1,.22,1); }

/* Elevación sutil de todo el logo + calidez base */
.wordmark--svg:hover, .wordmark--svg:focus-within { transform: translateY(-1px) scale(1.015); }
.wordmark--svg:hover .wm-base svg,
.wordmark--svg:focus-within .wm-base svg { filter: drop-shadow(0 0 5px var(--glow-soft)); }

/* Capa de luz revelada bajo el cursor */
.wordmark--svg .wm-shine {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .55s cubic-bezier(.19,1,.22,1);
  -webkit-mask: radial-gradient(circle var(--r) at var(--gx, 50%) var(--gy, 50%),
                #000 0%, rgba(0,0,0,.5) 46%, transparent 72%);
          mask: radial-gradient(circle var(--r) at var(--gx, 50%) var(--gy, 50%),
                #000 0%, rgba(0,0,0,.5) 46%, transparent 72%);
}
.wordmark--svg .wm-shine svg {
  fill: var(--glow-fill);
  filter: drop-shadow(0 0 7px var(--glow-a))
          drop-shadow(0 0 18px var(--glow-b))
          drop-shadow(0 0 34px var(--glow-c));
}
.wordmark--svg:hover .wm-shine, .wordmark--svg:focus-within .wm-shine { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .wordmark--svg:hover, .wordmark--svg:focus-within { transform: none; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--gutter);
  transition: background var(--t-med), padding var(--t-med), border-color var(--t-med);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(242,240,235,.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding-block: .95rem;
  border-bottom: 1px solid var(--line);
}
.nav--ink .nav-word, .nav--ink .nav-links a, .nav--ink .wordmark { color: var(--bone); }
.nav:not(.nav--ink) .wordmark { color: var(--ink); }
.nav--ink.scrolled { background: rgba(21,21,19,.8); }

.nav-word {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 1.15rem; letter-spacing: .16em; text-transform: uppercase;
  display: flex; align-items: center; gap: .5ch;
}
.nav-links { display: flex; align-items: center; gap: clamp(1.4rem, 2.4vw, 2.8rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--ff-sans); font-size: .74rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .22em; position: relative;
  padding-block: .3rem; transition: opacity var(--t-med);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: currentColor; transition: width var(--t-med);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:not(:hover):not(.active) { opacity: .7; }

/* Hamburguesa */
.burger { display: none; background: none; border: 0; width: 30px; height: 22px; position: relative; }
.burger span { position: absolute; left: 0; height: 2px; width: 100%; background: var(--olive); border-radius: 2px; transition: var(--t-med); }
.burger span:nth-child(1){ top: 2px; } .burger span:nth-child(2){ top: 10px; } .burger span:nth-child(3){ top: 18px; }
.burger.open span:nth-child(1){ top: 10px; transform: rotate(45deg); }
.burger.open span:nth-child(2){ opacity: 0; }
.burger.open span:nth-child(3){ top: 10px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bone);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.6rem;
  opacity: 0; pointer-events: none; transition: opacity var(--t-med);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a { font-family: var(--ff-display); font-size: 2rem; font-weight: 500; }

/* ============================================================
   BOTONES / ENLACES DE ACCIÓN
   La marca atrae, no persigue. Sin "¡Cotiza ya!".
   ============================================================ */
.link-underline {
  font-family: var(--ff-sans); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .2em; display: inline-flex; align-items: center; gap: .8ch;
  padding-bottom: .35rem; border-bottom: 1px solid currentColor;
  transition: gap var(--t-med), opacity var(--t-med);
}
.link-underline:hover { gap: 1.5ch; }
.btn {
  display: inline-block; font-family: var(--ff-sans); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .2em; font-weight: 400;
  padding: 1.05rem 2.4rem; border: 1px solid var(--ink); color: var(--ink);
  background: transparent; transition: background var(--t-slow), color var(--t-slow);
}
.btn:hover { background: var(--ink); color: var(--bone); }
.field--ink .btn, .field--plum .btn { border-color: var(--bone); color: var(--bone); }
.field--ink .btn:hover, .field--plum .btn:hover { background: var(--bone); color: var(--ink); }

/* ============================================================
   REVEAL — tipografía que aparece línea a línea
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--t-slow), transform var(--t-slow); }
.reveal.vis { opacity: 1; transform: none; }
.reveal-1 { transition-delay: .08s; } .reveal-2 { transition-delay: .18s; }
.reveal-3 { transition-delay: .28s; } .reveal-4 { transition-delay: .38s; }
.reveal-5 { transition-delay: .48s; } .reveal-6 { transition-delay: .58s; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .huella--draw path { stroke-dashoffset: 0; }
}

/* ============================================================
   WHATSAPP FLOTANTE — inyectado por site-social.js cuando hay
   número configurado en /admin.
   ============================================================ */
.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 6.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--olive);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(21,21,19,.32);
  z-index: 500;
  transition: transform var(--t-fast, .2s), background var(--t-fast, .2s);
}
.whatsapp-float:hover { background: var(--ink); }
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--bone); padding-block: clamp(4rem, 8vh, 7rem); }
.footer a { opacity: .75; transition: opacity var(--t-med); }
.footer a:hover { opacity: 1; }
.footer .label { color: rgba(242,240,235,.5); }
.footer-word { font-family: var(--ff-display); font-size: clamp(2.4rem,6vw,4.4rem); font-weight: 500; letter-spacing: .04em; }

/* ============================================================
   COMPONENTES EDITORIALES REUTILIZABLES
   ============================================================ */
.grid { display: grid; gap: clamp(2rem, 4vw, 4rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.eyebrow { margin-bottom: 1.4rem; }

/* Tarjeta de método / valor (sin marcos decorativos) */
.card { }
.card h3 { margin-bottom: .8rem; }
.card .num { font-family: var(--ff-display); font-style: italic; color: var(--plum); font-size: 1.2rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
