/* Adhemax — sistema de diseño
   Porcelana (fondo) · Grafito (tinta) · Fuego (el naranja del logo, usado con cuentagotas)
   La "junta" (línea fina entre piezas) es el motivo gráfico de todo el sitio. */

:root {
  --porcelana: #f3eee7;
  --marfil: #fbf8f3;
  --arena: #e6dfd4;
  --grafito: #151311;
  --carbon: #0d0c0b;
  --humo: #6f675f;
  --niebla: #a39a90;
  --fuego: #ff4d12;
  --fuego-hondo: #d63a07;
  --brasa: #ff7a45;
  --junta: rgba(21, 19, 17, 0.12);
  --junta-clara: rgba(243, 238, 231, 0.14);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radio: 2px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--porcelana);
  color: var(--grafito);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--fuego); color: var(--marfil); }

/* grano sutil de papel/esmalte sobre todo el sitio */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grano 1.2s steps(6) infinite;
}
@keyframes grano {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* ——— tipografía ——— */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}
.display em { font-style: italic; color: var(--fuego); }
.h-xxl { font-size: clamp(56px, 11vw, 188px); }
.h-xl { font-size: clamp(46px, 7.4vw, 128px); }
.h-l { font-size: clamp(38px, 5vw, 84px); }
.h-m { font-size: clamp(30px, 3.2vw, 52px); }
.lead { font-size: clamp(17px, 1.35vw, 21px); line-height: 1.5; color: var(--humo); max-width: 44ch; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }

/* ——— layout ——— */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.seccion { position: relative; padding: clamp(96px, 14vw, 200px) 0; }
.oscura { background: var(--carbon); color: var(--porcelana); }
.oscura .lead { color: var(--niebla); }

/* ——— botones ——— */
.btn {
  --bg: var(--grafito);
  --fg: var(--porcelana);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fuego);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--marfil); }
.btn:active { transform: scale(0.97); }
.btn .flecha { transition: transform 0.5s var(--ease); }
.btn:hover .flecha { transform: translateX(4px); }
.btn--fuego { --bg: var(--fuego); --fg: var(--marfil); }
.btn--fuego::before { background: var(--grafito); }
.btn--claro { --bg: var(--porcelana); --fg: var(--grafito); }
.btn--linea { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.btn--chico { height: 44px; padding: 0 20px; font-size: 14px; }

/* ——— navegación ——— */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  color: var(--porcelana);
  transition: background 0.5s var(--ease), color 0.5s var(--ease), transform 0.6s var(--ease), padding 0.5s var(--ease);
}
.nav__logo { width: 132px; position: relative; }
.nav__logo img { width: 100%; transition: opacity 0.4s; }
.nav__logo .l-oscuro { position: absolute; inset: 0; opacity: 0; }
.nav__links { display: flex; gap: 34px; font-size: 14px; font-weight: 500; }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__acciones { display: flex; align-items: center; gap: 12px; }
.nav.solida {
  background: rgba(243, 238, 231, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  color: var(--grafito);
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 1px 0 var(--junta);
}
.nav.solida .l-claro { opacity: 0; }
.nav.solida .l-oscuro { opacity: 1; }
.nav.oculta { transform: translateY(-110%); }
.nav .btn { height: 44px; padding: 0 20px; font-size: 14px; }
.nav__cuenta { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--fuego); color: var(--marfil); font-family: var(--mono); font-size: 11px; margin-left: -4px; }
.nav__cuenta[hidden] { display: none; }

/* aviso flotante corto ("Sumado a tu presupuesto") */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 20px; border-radius: 999px; background: var(--grafito); color: var(--porcelana); box-shadow: 0 18px 40px rgba(0,0,0,.28); font-size: 14px; transition: transform .6s var(--ease); max-width: calc(100vw - 32px); }
.toast.visible { transform: translate(-50%, 0); }
.toast a { color: var(--grafito); background: var(--porcelana); border-radius: 999px; padding: 8px 14px; font-weight: 700; white-space: nowrap; }
.nav__burger { display: none; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px currentColor; }
.nav__burger span { display: block; width: 16px; height: 1.5px; background: currentColor; margin: 4px auto; transition: transform 0.4s var(--ease); }

.menu-movil {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--carbon);
  color: var(--porcelana);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--gutter) 48px;
  gap: 8px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease-io);
}
.menu-movil.abierto { clip-path: inset(0 0 0 0); }
.menu-movil a.grande { font-family: var(--serif); font-size: 56px; line-height: 1.05; }
.menu-movil .mono { color: var(--niebla); margin-top: 32px; }
body.menu-abierto .nav { color: var(--porcelana); background: transparent; box-shadow: none; backdrop-filter: none; }
body.menu-abierto .nav .l-claro { opacity: 1; }
body.menu-abierto .nav .l-oscuro { opacity: 0; }
body.menu-abierto .nav__burger span:first-child { transform: translateY(2.75px) rotate(45deg); }
body.menu-abierto .nav__burger span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__links, .nav__acciones .btn--linea { display: none; }
  .nav__burger { display: block; }
  .nav__logo { width: 112px; }
}

/* ——— revelados al hacer scroll ——— */
.linea-mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.linea-mask > span { display: inline-block; will-change: transform; }
[data-revela] { opacity: 0; transform: translateY(36px); }
.sin-js [data-revela] { opacity: 1; transform: none; }

/* ——— cursor personalizado (solo con mouse) ——— */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--fuego);
  pointer-events: none;
  mix-blend-mode: normal;
  transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background 0.3s;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--marfil);
  text-transform: uppercase;
}
.cursor.grande { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ——— pie ——— */
.pie { background: var(--carbon); color: var(--porcelana); padding: 120px 0 32px; overflow: hidden; position: relative; }
.pie__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.pie h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--niebla); margin: 0 0 20px; }
.pie p, .pie li { margin: 0; color: var(--arena); font-size: 15px; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pie a:hover { color: var(--fuego); }
.pie__marca {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(80px, 21vw, 360px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  margin: 120px 0 40px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 238, 231, 0.22);
  white-space: nowrap;
  user-select: none;
}
.pie__marca span { color: var(--fuego); -webkit-text-stroke: 0; }
.pie__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--junta-clara); padding-top: 24px; color: var(--niebla); }
@media (max-width: 900px) { .pie__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pie__grid { grid-template-columns: 1fr; } }

/* ——— botón flotante de WhatsApp ——— */
.wa-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1fae55;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.5s var(--ease);
}
.wa-flotante:hover { transform: scale(1.08) rotate(-6deg); }
body.sin-wa .wa-flotante { transform: scale(0); }
.wa-flotante svg { width: 28px; height: 28px; }

/* ——— etiquetas/chips ——— */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--junta);
  white-space: nowrap;
}
.chip--fuego { background: var(--fuego); color: var(--marfil); box-shadow: none; }
.oscura .chip { box-shadow: inset 0 0 0 1px var(--junta-clara); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-revela] { opacity: 1; transform: none; }
}
