/* =============================================================
   Juan Diego González — Portafolio
   Estética: editorial premium (crema cálido + tinta + acento óxido)
   ============================================================= */

/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  /* Paleta base (sobria: papel cálido + tinta + un acento) */
  --paper:     #f3efe6;   /* fondo crema cálido */
  --paper-2:   #ece6d9;   /* crema más profundo */
  --paper-3:   #e4ddcc;   /* tarjetas / bordes suaves */
  --ink:       #191510;   /* tinta casi negra, cálida */
  --ink-soft:  #3a352c;
  --ink-mute:  #7a7264;   /* metadatos */
  --accent:    #b5482b;   /* óxido / terracota profunda */
  --accent-2:  #2f4030;   /* verde bosque, secundario discreto */
  --line:      rgba(25, 21, 16, 0.14);
  --line-soft: rgba(25, 21, 16, 0.08);

  /* Tipografías */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --grotesk: "Space Grotesk", var(--sans);

  /* Easings */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.04; letter-spacing: -0.02em; font-weight: 400; }
::selection { background: var(--accent); color: var(--paper); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. UTILIDADES
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  z-index: 9999; border-radius: 8px; font-weight: 500;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(181, 72, 43, 0.5);
  animation: pulse 2.6s var(--ease-soft) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(181, 72, 43, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(181, 72, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(181, 72, 43, 0); }
}

.section-index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 0.4rem;
}
.display {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.display em { font-style: italic; color: var(--accent); }
.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* =============================================================
   4. CURSOR PERSONALIZADO + PROGRESO
   ============================================================= */
.cursor { position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0; transition: opacity .3s var(--ease-out); }
.cursor.is-ready { opacity: 1; }
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 50%;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--ink);
  mix-blend-mode: difference;
  transition: width .3s var(--ease-out), height .3s var(--ease-out),
              background .3s var(--ease-out), border-color .3s var(--ease-out);
}
.cursor.is-hover .cursor-ring {
  width: 56px; height: 56px;
  background: rgba(181, 72, 43, 0.14);
  border-color: var(--accent);
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 8500; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
  transform-origin: left;
}

/* =============================================================
   5. NAV
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem var(--gutter);
  transition: padding .4s var(--ease-out), background .4s var(--ease-out),
              box-shadow .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
}
.nav.is-scrolled {
  padding-block: 0.7rem;
  background: rgba(243, 239, 230, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav-brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav-mark {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.35rem; line-height: 1;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.nav-brand:hover .nav-mark { background: var(--ink); color: var(--paper); }
.nav-name {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.nav-links { display: none; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav-links a {
  font-size: 0.9rem; color: var(--ink-soft); position: relative;
  transition: color .25s var(--ease-out);
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  padding: 0.55rem 1.15rem; border: 1px solid var(--ink); border-radius: 100px;
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }
@media (min-width: 960px) { .nav-links { display: flex; } }

/* Selector de idioma ES / EN — mismo lenguaje mono, discreto y elegante */
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
}
.lang-btn {
  color: var(--ink-mute); padding: 0.2rem 0.15rem; line-height: 1;
  position: relative; transition: color .25s var(--ease-out);
}
.lang-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease-out);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--ink); }
.lang-btn.is-active::after { transform: scaleX(1); transform-origin: left; }
.lang-sep { color: var(--line); }

/* =============================================================
   6. BOTONES
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.6rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em;
  transition: transform .4s var(--ease-out), background .35s var(--ease-out),
              color .35s var(--ease-out), border-color .35s var(--ease-out),
              box-shadow .4s var(--ease-out);
  will-change: transform;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 14px 30px -12px rgba(181,72,43,0.5); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn-cta {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 3.4vw, 2.2rem);
  padding: 1.1rem 2.2rem; border-radius: 100px;
  background: var(--ink); color: var(--paper);
  margin-top: 2.4rem;
}
.btn-cta .btn-cta-arrow { transition: transform .4s var(--ease-out); font-style: normal; }
.btn-cta:hover { background: var(--accent); box-shadow: 0 20px 50px -18px rgba(181,72,43,0.6); }
.btn-cta:hover .btn-cta-arrow { transform: translateX(8px); }

/* =============================================================
   7. HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 6rem; padding-bottom: 5rem;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: clamp(60px, 8vw, 120px) clamp(60px, 8vw, 120px);
  mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 20%, transparent 78%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-top: 1.6rem;
  max-width: 20ch;
}
.hero-title span { display: block; }
.hero-title em { font-style: italic; color: var(--accent); }

/* Palabra que muta entre estilos tipográficos */
.morph {
  display: inline-block; position: relative;
  color: var(--accent);
  transition: font-family .05s, letter-spacing .5s var(--ease-out);
  min-width: 4ch;
}
.morph::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 2px;
  background: currentColor; opacity: 0.28;
}

.hero-sub {
  margin-top: 2rem; max-width: 46ch;
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin-top: 3rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em;
  color: var(--ink-mute); text-transform: uppercase;
}
.hero-foot-sep { width: 26px; height: 1px; background: var(--line); }
.hero-scroll {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-mute);
}
.hero-scroll-line {
  width: 1px; height: 44px; background: var(--line); position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--accent); animation: scrollDrop 2.2s var(--ease-soft) infinite;
}
@keyframes scrollDrop {
  0% { top: -100%; } 60%, 100% { top: 100%; }
}

/* =============================================================
   8. SECCIONES GENÉRICAS
   ============================================================= */
.section { padding-block: clamp(5rem, 12vw, 9rem); position: relative; }
.split { display: grid; gap: 2.5rem; }
.split-side { position: relative; }
.split-main > .display { margin-bottom: 2rem; max-width: 20ch; }
@media (min-width: 960px) {
  .split { grid-template-columns: 0.34fr 0.66fr; gap: 4rem; }
  .split-side { position: sticky; top: 120px; align-self: start; }
}

/* Filosofía */
.philosophy { border-top: 1px solid var(--line-soft); }

/* --- Foto de perfil (retrato) --- */
.portrait {
  margin-top: 2rem;
  max-width: 320px;
  /* Reveal: fade + leve desplazamiento hacia arriba */
  opacity: 0; transform: translateY(36px) scale(0.985);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.portrait.is-visible { opacity: 1; transform: none; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-3);
  box-shadow: 0 30px 60px -34px rgba(25, 21, 16, 0.4);
}
.portrait-frame::after {                 /* filo cálido sutil sobre la foto */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, transparent 60%, rgba(25, 21, 16, 0.12));
}
.portrait-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.portrait:hover .portrait-frame img { transform: scale(1.04); }

/* Placeholder mientras no haya foto real */
.portrait-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; text-align: center;
  background:
    repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 12px, var(--paper-3) 12px, var(--paper-3) 24px);
}
.portrait-placeholder-mark {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.7rem; line-height: 1;
  width: 66px; height: 66px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--paper); color: var(--ink);
}
.portrait-placeholder-text {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--ink-mute); line-height: 1.5;
}
.portrait-placeholder-text small { font-size: 0.68rem; opacity: 0.72; }

.portrait-cap {
  display: flex; align-items: flex-start; gap: 0.6rem;
  margin-top: 0.9rem; max-width: 300px;
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.55; letter-spacing: 0.02em;
  color: var(--ink-soft); text-wrap: pretty;
}
.portrait-cap-text { flex: 1; }
.portrait-cap-dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  margin-top: 0.5em;
}
.portrait-cap em {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.12em; letter-spacing: 0; color: var(--accent);
}

/* En móvil el retrato va primero y centrado */
@media (max-width: 959px) {
  .philosophy .split-side { display: flex; flex-direction: column; }
  .philosophy .portrait { order: -1; margin-top: 0; margin-bottom: 2.2rem; max-width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .portrait { transition: opacity .5s var(--ease-out); transform: none; }
  .portrait-frame img, .portrait:hover .portrait-frame img { transition: none; }
}

.philosophy-cols { display: grid; gap: 1.6rem; margin-bottom: 3rem; }
@media (min-width: 720px) { .philosophy-cols { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.philosophy-cols p { color: var(--ink-soft); }
.philosophy-cols .lead { max-width: none; }
.process { display: grid; gap: 0; border-top: 1px solid var(--line); }
.process-step {
  display: flex; align-items: baseline; gap: 1.2rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left .4s var(--ease-out), background .4s var(--ease-out);
}
.process-step:hover { padding-left: 1rem; }
.process-n { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }
.process-t { font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.4rem); }

/* =============================================================
   9. ★ SELECTOR DE ESTILOS EN VIVO
   ============================================================= */
.styles { background: var(--paper-2); border-top: 1px solid var(--line-soft); }
.styles-head {
  display: grid; gap: 1.4rem; margin-bottom: 3rem;
}
.styles-head .display { max-width: 16ch; }
.styles-intro { color: var(--ink-soft); max-width: 52ch; font-size: 1.05rem; }
@media (min-width: 960px) {
  .styles-head { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 3rem; }
}

.styles-stage { display: grid; gap: 1.6rem; }
@media (min-width: 960px) {
  .styles-stage { grid-template-columns: 260px 1fr; gap: 2.4rem; align-items: start; }
}

.styles-tabs { display: flex; flex-direction: column; gap: 0.6rem; }
.style-tab {
  text-align: left; padding: 1rem 1.1rem; border-radius: 14px;
  border: 1px solid var(--line); background: transparent;
  display: grid; gap: 0.2rem;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out),
              border-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
  will-change: transform;
}
.style-tab-label { font-weight: 500; font-size: 1.02rem; }
.style-tab-desc { font-size: 0.82rem; color: var(--ink-mute); }
.style-tab:hover { border-color: var(--ink); transform: translateX(4px); }
.style-tab.is-active {
  background: var(--ink); border-color: var(--ink);
  box-shadow: 0 16px 34px -18px rgba(25,21,16,0.55);
}
.style-tab.is-active .style-tab-label { color: var(--paper); }
.style-tab.is-active .style-tab-desc { color: rgba(243,239,230,0.6); }

/* --- Marco del navegador --- */
.browser {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 40px 80px -40px rgba(25,21,16,0.4);
  transition: box-shadow .5s var(--ease-out);
}
.browser-bar {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line-soft);
}
.browser-dots { display: inline-flex; gap: 6px; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(25,21,16,0.18); }
.browser-dots i:first-child { background: #e0654f; }
.browser-dots i:nth-child(2) { background: #e6b04e; }
.browser-dots i:nth-child(3) { background: #6fae6a; }
.browser-url {
  flex: 1; text-align: center;
  font-family: var(--mono); font-size: 0.76rem; color: var(--ink-mute);
  background: rgba(255,255,255,0.7); padding: 0.28rem 0.8rem; border-radius: 100px;
  max-width: 340px; margin-inline: auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-live {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 100px;
  padding: 0.14rem 0.5rem;
}

/* --- Viewport de la demo (aquí viven los temas) --- */
.browser-view {
  padding: clamp(1.6rem, 4vw, 3rem);
  min-height: 380px;
  display: flex; flex-direction: column;
  transition: background .6s var(--ease-out), color .6s var(--ease-out);
  /* variables por defecto (se sobrescriben por [data-style]) */
  --d-bg: #fff; --d-ink: #191510; --d-mute: #8a8378; --d-accent: #b5482b;
  --d-serif: var(--sans); --d-radius: 6px; --d-btn-radius: 8px;
  background: var(--d-bg); color: var(--d-ink);
}
.demo-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1.4rem; margin-bottom: auto;
  border-bottom: 1px solid color-mix(in srgb, var(--d-ink) 12%, transparent);
}
.demo-brand { font-family: var(--d-serif); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.demo-menu { display: none; gap: 1.2rem; }
.demo-menu b { font-weight: 400; font-size: 0.82rem; color: var(--d-mute); }
@media (min-width: 540px) { .demo-menu { display: inline-flex; } }
.demo-hero { padding-block: clamp(1.6rem, 5vw, 2.8rem); }
.demo-eyebrow {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--d-accent);
}
.demo-title {
  font-family: var(--d-serif);
  font-size: clamp(1.7rem, 5vw, 2.9rem); line-height: 1.02;
  margin-top: 0.8rem; max-width: 16ch;
  color: var(--d-ink);
}
.demo-body {
  margin-top: 1rem; max-width: 42ch; font-size: 0.98rem;
  color: color-mix(in srgb, var(--d-ink) 70%, transparent);
}
.demo-cta {
  display: inline-block; margin-top: 1.6rem;
  padding: 0.7rem 1.4rem; border-radius: var(--d-btn-radius);
  background: var(--d-accent); color: var(--d-btn-ink, #fff);
  font-size: 0.9rem; font-weight: 500;
}
.demo-cards { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: auto; padding-top: 1.6rem; }
.demo-cards span {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 0.4rem 0.9rem; border-radius: var(--d-radius);
  border: 1px solid color-mix(in srgb, var(--d-ink) 16%, transparent);
  color: color-mix(in srgb, var(--d-ink) 74%, transparent);
}

/* Animación de entrada al cambiar de estilo */
.browser-view.is-swapping .demo-nav,
.browser-view.is-swapping .demo-hero > *,
.browser-view.is-swapping .demo-cards { opacity: 0; }

/* ---- TEMA: Minimalista ---- */
.browser[data-style="minimal"] .browser-view {
  --d-bg: #ffffff; --d-ink: #111111; --d-mute: #9a9a9a; --d-accent: #111111;
  --d-btn-ink: #fff; --d-serif: "Inter", sans-serif; --d-radius: 2px; --d-btn-radius: 2px;
  letter-spacing: 0.01em;
}
.browser[data-style="minimal"] .demo-title { font-weight: 300; letter-spacing: -0.02em; }
.browser[data-style="minimal"] .demo-brand { font-weight: 500; letter-spacing: 0.28em; }

/* ---- TEMA: Editorial ---- */
.browser[data-style="editorial"] .browser-view {
  --d-bg: #f7f1e6; --d-ink: #23201a; --d-mute: #8a8072; --d-accent: #a8432a;
  --d-btn-ink: #f7f1e6; --d-serif: "Fraunces", serif; --d-radius: 100px; --d-btn-radius: 100px;
}
.browser[data-style="editorial"] .demo-title { font-style: italic; font-weight: 400; }
.browser[data-style="editorial"] .demo-eyebrow { font-style: normal; }

/* ---- TEMA: Corporativo ---- */
.browser[data-style="corporate"] .browser-view {
  --d-bg: #f5f7fb; --d-ink: #14213d; --d-mute: #6b7690; --d-accent: #2b57d6;
  --d-btn-ink: #fff; --d-serif: "Space Grotesk", sans-serif; --d-radius: 8px; --d-btn-radius: 8px;
}
.browser[data-style="corporate"] .demo-title { font-weight: 500; letter-spacing: -0.02em; }
.browser[data-style="corporate"] .demo-cta { box-shadow: 0 10px 22px -10px rgba(43,87,214,0.6); }

/* ---- TEMA: Audaz / Neón ---- */
.browser[data-style="bold"] .browser-view {
  --d-bg: #0c0c10; --d-ink: #f2f2f2; --d-mute: #7a7a85; --d-accent: #c6ff3d;
  --d-btn-ink: #0c0c10; --d-serif: "Space Grotesk", sans-serif; --d-radius: 4px; --d-btn-radius: 4px;
}
.browser[data-style="bold"] .demo-title {
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.96;
}
.browser[data-style="bold"] .demo-cta { box-shadow: 0 0 24px -4px rgba(198,255,61,0.5); }
.browser[data-style="bold"] .demo-brand { text-transform: uppercase; letter-spacing: 0.1em; }

/* ---- TEMA: Orgánico ---- */
.browser[data-style="organic"] .browser-view {
  --d-bg: #f0ece0; --d-ink: #33372c; --d-mute: #877f6c; --d-accent: #6b7a4a;
  --d-btn-ink: #f4f2ea; --d-serif: "Fraunces", serif; --d-radius: 100px; --d-btn-radius: 100px;
}
.browser[data-style="organic"] .demo-title { font-weight: 400; }
.browser[data-style="organic"] .browser-view { border-radius: 0; }
.browser[data-style="organic"] .demo-cta { border-radius: 100px; }

.styles-note {
  margin-top: 2.6rem; text-align: center;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--ink-soft);
}
.styles-note-mark { color: var(--accent); font-style: normal; margin-right: 0.4rem; }

/* =============================================================
   10. TRABAJOS
   ============================================================= */
.works-head { display: flex; align-items: baseline; gap: 1.4rem; margin-bottom: 3rem; flex-wrap: wrap; }
.works-grid { display: grid; gap: 1.4rem; }
@media (min-width: 720px) {
  .works-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  /* La primera tarjeta ocupa todo el ancho: 1 destacada + 4 en pares */
  .work-card--featured { grid-column: 1 / -1; }
  .work-card--featured .work-media { aspect-ratio: 21 / 9; }
}
.work-card {
  display: block;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--paper); will-change: transform;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s var(--ease-out);
}
.work-card:hover { border-color: var(--ink); box-shadow: 0 30px 60px -34px rgba(25,21,16,0.42); }
.work-media {
  aspect-ratio: 16 / 10; position: relative;
  background: var(--paper-3);
  display: grid; place-items: center; overflow: hidden;
}
.work-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transform: scale(1.001);
  transition: transform .8s var(--ease-out);
}
/* Zoom suave de la captura al pasar el cursor */
.work-card:hover .work-media img { transform: scale(1.055); }
/* Overlay: oscurecimiento + "Ver proyecto en vivo →" */
.work-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  background: rgba(25, 21, 16, 0);
  color: var(--paper);
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity .45s var(--ease-out), background .45s var(--ease-out);
}
.work-card:hover .work-overlay,
.work-card:focus-visible .work-overlay {
  opacity: 1; background: rgba(25, 21, 16, 0.55);
}
@media (hover: none) {
  /* En táctil no hay hover: la tarjeta entera ya es un enlace */
  .work-overlay { display: none; }
}
.work-body { padding: 1.5rem; display: grid; gap: 0.4rem; }
.work-n { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.work-title { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.work-meta { font-family: var(--mono); font-size: 0.76rem; color: var(--ink-mute); letter-spacing: 0.02em; }

/* =============================================================
   11. CONFIANZA
   ============================================================= */
.trust { background: var(--paper-2); border-top: 1px solid var(--line-soft); }
.trust-grid { display: grid; gap: 1.4rem; margin-top: 2.4rem; }
@media (min-width: 720px) { .trust-grid { grid-template-columns: 1fr 1fr; gap: 2rem 2.4rem; } }
.trust-item { padding-top: 1.4rem; border-top: 1px solid var(--line); }
.trust-n { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }
.trust-item h3 { font-family: var(--serif); font-size: 1.3rem; margin: 0.5rem 0 0.6rem; }
.trust-item p { color: var(--ink-soft); font-size: 0.98rem; }

/* =============================================================
   12. PRECIOS
   ============================================================= */
.pricing { border-top: 1px solid var(--line-soft); }
.pricing-inner { max-width: 760px; display: grid; gap: 1.6rem; }
.pricing-inner .display { max-width: 20ch; }
.pricing-inner .section-index { margin-bottom: -0.6rem; }
.pricing-inner p { color: var(--ink-soft); }
.pricing-inner .lead { max-width: none; }
.pricing-inner .btn { justify-self: start; margin-top: 1rem; }

/* =============================================================
   13. CONTACTO
   ============================================================= */
.contact { background: var(--ink); color: var(--paper); border-radius: 40px 40px 0 0; }
.contact ::selection { background: var(--paper); color: var(--ink); }
.contact-inner { text-align: center; display: grid; justify-items: center; gap: 0.4rem; }
.contact .section-index { color: var(--accent); }
.contact-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 6.5rem); line-height: 0.98;
  letter-spacing: -0.03em; margin-top: 0.6rem;
}
.contact-sub { max-width: 44ch; color: rgba(243,239,230,0.72); margin-top: 1.2rem; font-size: 1.08rem; }
.contact-details {
  margin-top: 3.4rem; display: grid; gap: 0.9rem; width: 100%; max-width: 520px;
  font-family: var(--mono); font-size: 0.86rem;
}
.contact-line {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid rgba(243,239,230,0.16);
}
.contact-key { color: rgba(243,239,230,0.5); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; }
.contact-val { color: var(--paper); position: relative; }
.contact-social { display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.contact-val a, a.contact-val { position: relative; }
.contact-val a::after, a.contact-val::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.contact-val a:hover::after, a.contact-val:hover::after { transform: scaleX(1); transform-origin: left; }

/* =============================================================
   14. FOOTER
   ============================================================= */
.footer { background: var(--ink); color: rgba(243,239,230,0.72); padding-block: 2.4rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: 0.8rem;
}
.footer-brand { color: var(--paper); }
.footer-mid { display: inline-flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-mid a { transition: color .25s var(--ease-out); }
.footer-mid a:hover { color: var(--paper); }
.footer-year { color: rgba(243,239,230,0.5); }

/* --- Firma / sello personal de autoría (assets/signature-kit/) ---
   Único valor ajustable por proyecto: --signature-color. El footer es
   oscuro, así que se usa un tono crema tenue (versión "sobre fondo
   oscuro" según el README del kit). */
.site-signature {
  --signature-color: rgba(242, 235, 218, 0.42);
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(243, 239, 230, 0.09);
  display: flex;
  justify-content: center;
}
.site-signature a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--signature-color);
  opacity: 0.85;
  transition: opacity 0.28s var(--ease-out), color 0.28s var(--ease-out);
}
.site-signature a:hover,
.site-signature a:focus-visible { opacity: 1; }
.site-signature__mark { width: 18px; height: 18px; display: block; flex: none; }
.site-signature__text {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

/* =============================================================
   Sección "Firma personal" (sello de autoría, debajo de Precios)
   ============================================================= */
.signature-feature { background: var(--paper-2); border-top: 1px solid var(--line-soft); }
.signature-feature__inner {
  max-width: 680px; margin-inline: auto; text-align: center;
}
.signature-feature .section-index { color: var(--accent); }
.signature-feature .display { margin: 0.8rem auto 0; max-width: 22ch; }
.signature-feature__lead { max-width: 46ch; margin: 1.4rem auto 0; }

/* La firma en grande: mismo monograma que el footer, aquí protagonista */
.signature-feature__mark {
  --signature-color: var(--accent);
  margin-top: clamp(2.4rem, 6vw, 3.6rem);
}
.signature-feature__link {
  display: inline-block; line-height: 0;
  transition: transform .5s var(--ease-out), opacity .3s var(--ease-out);
}
.signature-feature__link:hover { transform: translateY(-3px); opacity: 0.82; }
.signature-hero {
  height: clamp(112px, 17vw, 150px); width: auto; display: block;
  margin-inline: auto; overflow: visible;
}
/* Animación de entrada: el trazo se dibuja al hacer scroll.
   Gate con html.is-ready => si el JS no corre, la firma se ve completa. */
.signature-hero path { stroke-dasharray: 64; }
html.is-ready .signature-feature__mark:not(.is-visible) .signature-hero path {
  stroke-dashoffset: 64;
}
.signature-feature__mark.is-visible .signature-hero path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.15s var(--ease-out);
}
.signature-feature__mark.is-visible .signature-hero path:nth-child(2) { transition-delay: 0.16s; }
.signature-feature__mark.is-visible .signature-hero path:nth-child(3) { transition-delay: 0.32s; }

.signature-feature__note {
  margin-top: clamp(2.2rem, 5vw, 3.2rem);
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--ink-mute);
}
.signature-feature__note a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.signature-feature__note a:hover { color: var(--accent); border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .signature-hero path { stroke-dasharray: none; }
  html.is-ready .signature-feature__mark:not(.is-visible) .signature-hero path { stroke-dashoffset: 0; }
}

/* Enlace "Aviso legal" del footer (discreto, igual que los demás enlaces) */
.footer-legal-link {
  font-family: var(--mono); font-size: inherit; letter-spacing: inherit;
  color: inherit; cursor: pointer; padding: 0;
  transition: color .25s var(--ease-out);
}
.footer-legal-link:hover { color: var(--paper); }

/* --- Modal de aviso legal --- */
.legal-modal {
  width: min(620px, 92vw); max-height: 88vh;
  margin: auto; padding: 0;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(25, 21, 16, 0.55);
  overflow: hidden;
}
.legal-modal::backdrop {
  background: rgba(25, 21, 16, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.legal-modal[open] { animation: legalIn 0.4s var(--ease-out); }
@keyframes legalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.legal-modal__inner {
  position: relative; padding: clamp(1.7rem, 4vw, 2.9rem);
  max-height: 88vh; overflow-y: auto;
}
.legal-modal__close {
  position: absolute; top: 1rem; right: 1.1rem;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; color: var(--ink-mute);
  display: grid; place-items: center; border: 1px solid var(--line);
  transition: background .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.legal-modal__close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.legal-modal__kicker { margin-bottom: 0.9rem; }
.legal-modal__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.02em;
  margin-bottom: 1.7rem;
}
.legal-facts {
  display: grid; margin-bottom: 1.8rem; border-top: 1px solid var(--line);
}
.legal-facts > div {
  display: flex; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.legal-facts dt {
  flex: none; min-width: 92px; padding-top: 0.15rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-mute);
}
.legal-facts dd { font-size: 0.96rem; color: var(--ink-soft); }
.legal-body { display: grid; gap: 1rem; }
.legal-body p { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.65; }
.legal-modal a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
  transition: color .2s var(--ease-out);
}
.legal-modal a:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .legal-modal[open] { animation: none; } }

/* =============================================================
   15. EFECTOS — reveal on scroll / split text
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
/* Defensa: elementos con reveal + split nunca quedan invisibles */
.reveal[data-split] { opacity: 1; transform: none; }

.line-mask { display: block; overflow: hidden; }
.split-line {
  display: inline-block; will-change: transform;
  transform: translateY(110%); transition: transform .9s var(--ease-out);
}
[data-split].is-visible .split-line { transform: translateY(0); }
[data-split].is-visible .split-line:nth-child(2) { transition-delay: .08s; }
[data-split].is-visible .split-line:nth-child(3) { transition-delay: .16s; }
[data-split].is-visible .split-line:nth-child(4) { transition-delay: .24s; }

/* =============================================================
   16. RESPONSIVE fino
   ============================================================= */
@media (min-width: 720px) {
  .styles-note { margin-top: 3.4rem; }
}
@media (max-width: 539px) {
  .contact { border-radius: 26px 26px 0 0; }
  .hero-foot { gap: 0.6rem; }
}

/* =============================================================
   17. REDUCED MOTION (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .kicker-dot { animation: none; }
  .hero-scroll-line::after { animation: none; }
  .morph { transition: none; }
}
