/* =============================================================
   KYRON — styles.css  (Archetype 05 · Mouse-Reactive Gradient,
   adaptado a blanco y gris minimalista, tipografía Arial)
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */
:root {
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --ink: #16191d;
  --ink-2: #3a4048;
  --mute: #5f6670;
  --line: #e3e6ea;
  --accent: #16191d;
  --gradient-1: #dde1e6;
  --gradient-2: #eceff2;
  --gradient-3: #c9cfd6;

  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Reset & base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* 3. Utilities ------------------------------------------------- */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg); border-radius: 8px;
}
.skip-link:focus { top: 1rem; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 920px; }
.mono { font-family: var(--sans); }
.eyebrow {
  font-size: 14px; color: var(--mute); margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--mute); }

/* 4. Typography ------------------------------------------------ */
.big-title { font-size: clamp(2.2rem, 5vw, 4.4rem); max-width: 18ch; }
.mid-title { font-size: clamp(1.9rem, 3.6vw, 3.1rem); }
.section-head { margin-bottom: clamp(48px, 7vw, 88px); }
.section-sub { color: var(--mute); font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 62ch; margin-top: 28px; }

/* 5. Components ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; font-size: 16px; font-weight: 700;
  border-radius: 999px;
  transition: background .4s var(--ease-out), color .4s var(--ease-out), border-color .4s var(--ease-out);
}
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--ink-2); }
.btn-line { border: 1px solid #c9cfd6; color: var(--ink); background: rgba(255, 255, 255, .6); }
.btn-line:hover { border-color: var(--ink); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .5s var(--ease-out), border-color .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(255, 255, 255, .94); border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(12px)) {
  .nav.is-scrolled { background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; }
.brand-word { font-weight: 700; letter-spacing: .3em; font-size: 15px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.nav-cta) { display: none; }
.nav-links a { position: relative; padding: 10px 14px; font-size: 15px; color: var(--ink-2); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s 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 {
  background: var(--ink); color: var(--bg) !important; border-radius: 999px;
  min-height: 44px; display: inline-flex; align-items: center; margin-left: 8px; font-weight: 700;
  transition: background .4s var(--ease-out);
}
.nav-cta:hover { background: var(--ink-2); }

/* Rows (expandable list) */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px 24px;
  padding: clamp(22px, 3vw, 32px) 0;
  transition: color .4s var(--ease-out);
}
.row summary::-webkit-details-marker { display: none; }
.row-num { color: var(--mute); font-size: 14px; }
.row-name { font-size: clamp(1.4rem, 2.8vw, 2.3rem); line-height: 1.15; letter-spacing: -0.02em; }
.faq .row summary { grid-template-columns: 1fr auto; }
.faq .row-name { font-size: clamp(1.2rem, 2.1vw, 1.6rem); }
.row-tag { display: none; color: var(--mute); font-size: 13px; }
.row-icon { position: relative; width: 20px; height: 20px; flex: none; }
.row-icon::before, .row-icon::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink);
  transition: transform .5s var(--ease-out);
}
.row-icon::after { transform: rotate(90deg); }
.row[open] .row-icon::after { transform: rotate(0deg); }
.row summary:hover { color: var(--mute); }
.row-body { padding: 0 0 clamp(24px, 3vw, 34px); }
.row-body p { color: var(--mute); font-size: clamp(1rem, 1.3vw, 1.12rem); max-width: 64ch; }

/* 6. Sections -------------------------------------------------- */

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 140px 0 clamp(56px, 9vh, 110px);
  background: var(--bg);
}
.hero-gradient {
  position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(circle 40vmax at var(--mx, 70%) var(--my, 35%), var(--gradient-3) 0%, transparent 60%),
    radial-gradient(circle 30vmax at calc(var(--mx, 70%) - 18%) calc(var(--my, 35%) + 22%), var(--gradient-1) 0%, transparent 60%),
    radial-gradient(circle 24vmax at calc(var(--mx, 70%) + 14%) calc(var(--my, 35%) - 12%), var(--gradient-2) 0%, transparent 60%),
    var(--bg);
  filter: blur(60px);
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .4) 60%, var(--bg) 100%);
}
.hero-inner { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.hero-title {
  font-size: clamp(3rem, 10.5vw, 9.5rem);
  font-weight: 700; line-height: .95; letter-spacing: -0.055em;
}
.hero-title .line { display: block; }
.hero-title .line:nth-child(2) { color: #8a929c; }
.hero-foot { display: flex; flex-direction: column; gap: 28px; }
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-scroll { position: absolute; right: var(--gutter); bottom: 28px; font-size: 13px; color: var(--mute); display: none; }

/* Manifesto */
.manifesto { padding: clamp(110px, 16vw, 200px) 0; text-align: center; background: var(--bg-2); }
.manifesto .eyebrow { margin-bottom: 36px; }
.manifesto-text {
  font-size: clamp(1.5rem, 2.8vw, 2.4rem); line-height: 1.35; letter-spacing: -0.02em;
  max-width: 32ch; margin-inline: auto; color: var(--mute);
}
.manifesto-text .hl { color: var(--ink); }

/* Services */
.services { padding: clamp(110px, 14vw, 180px) 0; }

/* Hover invert on big titles */
.invert { transition: color .5s var(--ease-out); cursor: default; }
.invert:hover { color: #8a929c; }

/* Stats */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: clamp(36px, 5vw, 64px) clamp(8px, 2vw, 28px); border-right: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stat-num { font-size: clamp(3.4rem, 7vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -0.05em; }
.stat-label { margin-top: 14px; color: var(--mute); font-size: 15px; max-width: 24ch; }

/* Method */
.method { padding: clamp(110px, 14vw, 180px) 0; background: var(--bg-2); }
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.step {
  background: var(--bg); padding: clamp(28px, 3vw, 40px); border-radius: 20px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.step:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(22, 25, 29, .18); }
.step-k { font-size: clamp(3rem, 4.6vw, 4.2rem); font-weight: 700; line-height: 1; color: #c9cfd6; transition: color .5s var(--ease-out); }
.step:hover .step-k { color: var(--ink); }
.step h3 { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; margin-top: 10px; }
.step p { color: var(--mute); }

/* About */
.about { padding: clamp(110px, 14vw, 180px) 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.about-text { display: flex; flex-direction: column; gap: 22px; color: var(--ink-2); font-size: clamp(1.05rem, 1.3vw, 1.15rem); }
.values { margin-top: 18px; border-top: 1px solid var(--line); }
.values li { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--mute); }
.values strong { color: var(--ink); }

/* FAQ */
.faq { padding: clamp(110px, 14vw, 180px) 0; background: var(--bg-2); }
.faq .mid-title { margin-bottom: clamp(40px, 5vw, 64px); }

/* Contact */
.contact { position: relative; isolation: isolate; overflow: hidden; padding: clamp(120px, 16vw, 200px) 0; }
.contact-gradient {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 55% 70% at 90% 110%, #dde1e6 0%, transparent 70%),
    var(--bg);
}
.contact-q { font-size: clamp(2rem, 4.4vw, 3.8rem); max-width: 20ch; margin-bottom: clamp(40px, 6vw, 64px); }
.contact-mail {
  position: relative; display: inline-block;
  font-size: clamp(2.6rem, 8vw, 7rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em;
  color: var(--ink); white-space: nowrap;
}
.contact-mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px;
  background: var(--ink); transform: scaleX(.15); transform-origin: left;
  transition: transform .7s var(--ease-out);
}
.contact-mail:hover::after, .contact-mail:focus-visible::after { transform: scaleX(1); }
.contact-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 48px; font-size: 15px; color: var(--ink-2); }
.contact-meta a { border-bottom: 1px solid #c9cfd6; padding-bottom: 2px; transition: border-color .3s; }
.contact-meta a:hover { border-color: var(--ink); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13px; color: var(--mute); }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }

/* 7. Effects --------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.js .reveal.is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

.hero-title .line { animation: lineUp 1.3s var(--ease-out) both; }
.hero-title .line:nth-child(2) { animation-delay: .12s; }
@keyframes lineUp { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }

.hero-gradient { animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }

/* 8. Responsive ------------------------------------------------ */
@media (min-width: 720px) {
  .nav-links a:not(.nav-cta) { display: inline-block; }
  .row summary { grid-template-columns: 64px 1fr auto auto; }
  .faq .row summary { grid-template-columns: 1fr auto; }
  .row-tag { display: inline; }
  .services .row-body { padding-left: 88px; }
  .hero-foot { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
  .hero-scroll { display: block; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 960px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { border-bottom: 0 !important; border-right: 1px solid var(--line) !important; }
  .stat:last-child { border-right: 0 !important; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; }
}

/* 9. Reduced motion — only intrusive effects ------------------ */
@media (prefers-reduced-motion: reduce) {
  .hero-gradient { animation: none; }
}

/* =============================================================
   10. Profundidad: vidrio esmerilado y sombras suaves
   ============================================================= */
:root {
  --glass: rgba(255, 255, 255, .58);
  --glass-solid: rgba(255, 255, 255, .92);
  --glass-edge: rgba(255, 255, 255, .85);
  --shadow-sm: 0 1px 2px rgba(22, 25, 29, .05), 0 8px 24px -10px rgba(22, 25, 29, .14);
  --shadow-lg: 0 1px 1px rgba(22, 25, 29, .04), 0 18px 40px -12px rgba(22, 25, 29, .16), 0 60px 120px -40px rgba(22, 25, 29, .22);
  --radius: 22px;
}

/* Fondo con manchas grises suaves para que el vidrio tenga algo que difuminar */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -10; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 8% 20%, #eef0f3 0%, transparent 60%),
    radial-gradient(36vmax 36vmax at 92% 55%, #e6e9ed 0%, transparent 60%),
    radial-gradient(30vmax 30vmax at 30% 95%, #eff1f4 0%, transparent 60%),
    #fafbfc;
}
body { background: transparent; }
.manifesto, .method, .faq { background: rgba(244, 245, 247, .55); }

.glass {
  background: var(--glass-solid);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .9);
  border-radius: var(--radius);
}
@supports (backdrop-filter: blur(20px)) {
  .glass { background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
}

/* Nav flotante tipo cápsula */
.nav {
  top: 14px; left: 50%; right: auto; transform: translateX(-50%);
  width: min(calc(100% - 28px), 1120px);
  padding: 10px 10px 10px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-sm);
}
@supports (backdrop-filter: blur(12px)) {
  .nav, .nav.is-scrolled { background: rgba(255, 255, 255, .55); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); }
}
.nav.is-scrolled { border-bottom-color: var(--glass-edge); box-shadow: var(--shadow-lg); }

/* Botones con sombra suave */
.btn-solid, .nav-cta { box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 10px 24px -10px rgba(22, 25, 29, .5); }
.btn-line { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); }
.btn:hover { transform: translateY(-1px); }

/* Ventana del sistema */
.showcase { position: relative; margin-top: clamp(-70px, -6vw, -30px); padding-bottom: clamp(80px, 10vw, 140px); perspective: 1600px; }
.window { overflow: hidden; transform-origin: 50% 0; will-change: transform; }
.window-bar {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  border-bottom: 1px solid rgba(22, 25, 29, .07); background: rgba(255, 255, 255, .45);
}
.dots { display: inline-flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #d3d8de; box-shadow: inset 0 0 0 1px rgba(22, 25, 29, .08); }
.dots i:first-child { background: #b9c0c8; }
.window-title { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-body { display: grid; grid-template-columns: minmax(0, 1fr); }
.window-side { display: none; }
.window-main { padding: 8px 12px 14px; }
.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 10px; border-bottom: 1px solid rgba(22, 25, 29, .06); font-size: 14px; color: var(--ink-2);
}
.doc:last-child { border-bottom: 0; }
.doc-head { font-size: 12px; color: var(--mute); padding-block: 10px; }
.doc-code, .doc-rev, .doc-head span:nth-child(1), .doc-head span:nth-child(3) { display: none; }
.doc-head span:nth-child(4) { text-align: right; }
.chip { justify-self: end; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.chip-ok { background: #16191d; color: #fff; }
.chip-rev { background: #eef0f3; color: var(--ink-2); border-color: #dde1e6; }
.chip-pend { background: transparent; color: var(--ink-2); border-color: #c9cfd6; }
.showcase-note { margin-top: 16px; font-size: 13px; color: var(--mute); text-align: center; }

/* Paneles de vidrio */
.panel { padding: 4px clamp(18px, 3vw, 36px); border-top: 1px solid var(--glass-edge); }
.panel .row:last-child { border-bottom: 0; }
.stats { border: 0; padding: clamp(40px, 6vw, 80px) 0; }
.stats-grid { overflow: hidden; }
.step { border-radius: var(--radius); border: 1px solid var(--glass-edge); }
.step:hover { transform: translateY(-6px); box-shadow: 0 2px 2px rgba(22, 25, 29, .04), 0 30px 60px -20px rgba(22, 25, 29, .28); }
.contact-card { display: inline-block; max-width: 100%; padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 64px); }
.contact-meta { margin-top: 36px; }

@media (min-width: 720px) {
  .window-body { grid-template-columns: 200px minmax(0, 1fr); }
  .window-side {
    display: flex; flex-direction: column; gap: 4px; padding: 16px 12px;
    border-right: 1px solid rgba(22, 25, 29, .06); background: rgba(244, 245, 247, .5);
  }
  .side-item { font-size: 13px; color: var(--mute); padding: 8px 12px; border-radius: 10px; }
  .side-item.is-active { background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: var(--shadow-sm); }
  .window-main { padding: 12px 20px 18px; }
  .doc { grid-template-columns: 110px minmax(0, 1fr) 50px 120px; }
  .doc-code, .doc-rev, .doc-head span:nth-child(1), .doc-head span:nth-child(3) { display: inline; }
  .doc-code { color: var(--mute); }
}
