/* KINZE School & Shop — demo conceptual Ingresify */

:root {
  --hueso: #F3EFE7;
  --dim-on-light: rgba(28, 26, 23, 0.62);
  --grafito: #1C1A17;
  --dim-on-dark: rgba(243, 239, 231, 0.66);
  --oxido: #B5462D;
  --oxido-on-dark: #D9714F;
  --oxido-soft: rgba(181, 70, 45, 0.14);
  --line-light: rgba(28, 26, 23, 0.16);
  --line-dark: rgba(243, 239, 231, 0.18);
  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --rail-width: 92px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hueso);
  color: var(--grafito);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -60px;
  background: var(--grafito); color: var(--hueso);
  padding: 0.7rem 1.1rem; z-index: 200; transition: top 0.2s ease;
  font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--oxido); outline-offset: 3px; }

.mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--hueso);
  border-bottom: 1px solid var(--line-light);
}
.header-inner {
  height: var(--header-h);
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex; flex-direction: column; line-height: 1;
}
.logo span {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  color: var(--dim-on-light);
  margin-top: 3px;
}
.site-nav { display: none; }
.btn.header-call { display: none; }

.menu-toggle {
  width: 44px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span {
  width: 22px; height: 2px; background: var(--grafito); transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--hueso);
  z-index: 99;
  padding: 2rem 1.25rem;
  overflow-y: auto;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 0; margin-bottom: 2rem; }
.mobile-menu > .btn { width: 100%; }
.mobile-menu ul a {
  display: block; padding: 1rem 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; text-transform: uppercase;
  border-bottom: 1px solid var(--line-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.4rem;
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 3px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn .icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn--accent { background: var(--oxido); border-color: var(--oxido); color: var(--hueso); }
.btn--accent:hover, .btn--accent:focus-visible { background: transparent; color: var(--oxido); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: currentColor; color: var(--hueso); }
.btn--outline { border-color: var(--grafito); color: var(--grafito); }
.btn--outline:hover, .btn--outline:focus-visible { background: var(--grafito); color: var(--hueso); }
.btn--large { min-height: 56px; padding: 0 2rem; font-size: 0.95rem; }

/* ---------- Stage index rail (desktop only) ---------- */
.stage-index { display: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem 1.25rem 4rem;
  position: relative;
}
.hero-inner { max-width: 720px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em;
  color: var(--oxido); margin-bottom: 1.25rem; text-transform: uppercase;
}
.hero h1 {
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.3rem, 9.5vw, 3.4rem);
  line-height: 1.03; letter-spacing: -0.01em;
}
.hero-lead {
  margin-top: 1.5rem; font-size: 1.05rem; max-width: 32ch; color: var(--grafito);
  line-height: 1.5;
}
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.scroll-cue {
  position: absolute; left: 1.25rem; bottom: 1.25rem;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  color: var(--grafito); animation: cue 1.8s ease-in-out infinite;
}
.scroll-cue svg { width: 20px; height: 20px; }
@keyframes cue { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Stage sections ---------- */
.stage { padding: 4.5rem 1.25rem; transition: background-color 0.4s ease; }
.stage--dark { background: var(--grafito); color: var(--hueso); }
.stage--light { background: var(--hueso); color: var(--grafito); }
.stage-inner { max-width: 760px; margin: 0 auto; }

.stage-marker {
  display: inline-block; font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--oxido);
  margin-bottom: 1rem;
}
.stage--dark .stage-marker { color: var(--oxido-on-dark); }
.stage-word {
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.8rem, 15vw, 4rem);
  line-height: 0.96; letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
  overflow-wrap: break-word; word-break: break-word;
}
.stage-body { display: flex; flex-direction: column; gap: 1rem; max-width: 52ch; }
.stage-body p { font-size: 1.05rem; line-height: 1.55; }
.stage--dark .stage-body p:last-child { color: var(--dim-on-dark); }
.stage--light .stage-body p:last-child { color: var(--dim-on-light); }

.stage-graphic {
  width: 140px; height: auto; margin-top: 2.5rem; color: var(--oxido); opacity: 0.85;
}

.stage-actions { margin-top: 2rem; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid; gap: 1.5rem; margin-top: 0.5rem; margin-bottom: 2.25rem;
}
.contact-block h3 {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--oxido-on-dark); margin-bottom: 0.5rem; font-weight: 400;
}
.contact-block p { font-size: 1.1rem; line-height: 1.5; }
.contact-block a { border-bottom: 1px solid var(--line-dark); }
.contact-block a:hover, .contact-block a:focus-visible { border-color: var(--oxido-on-dark); color: var(--oxido-on-dark); }

.map-wrap {
  margin-top: 2.5rem; border: 1px solid var(--line-dark);
  aspect-ratio: 4 / 3; overflow: hidden;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.35) contrast(1.05); }

/* ---------- Footer ---------- */
.site-footer { background: var(--hueso); border-top: 1px solid var(--line-light); padding: 3rem 1.25rem 6rem; }
.footer-inner { max-width: 760px; margin: 0 auto; }
.footer-brand { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.14em; margin-bottom: 0.9rem; }
.footer-note { font-size: 0.82rem; color: var(--dim-on-light); max-width: 52ch; line-height: 1.6; }
.footer-top { display: inline-block; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Mobile call bar ---------- */
.mobile-callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--oxido); color: var(--hueso);
  transform: translateY(100%); transition: transform 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-callbar.is-visible { transform: translateY(0); }
.mobile-callbar a {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em;
}
.mobile-callbar .icon { width: 18px; height: 18px; }

/* ---------- Reveal motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

  @media (max-width: 1023.98px) {
    [data-reveal] { transform: translateY(10px); transition-duration: 0.45s; }
  }
  .stage-graphic path, .stage-graphic circle, .stage-graphic rect {
    stroke-dasharray: 300; stroke-dashoffset: 300;
    transition: stroke-dashoffset 1s ease 0.15s;
  }
  .stage-graphic.is-visible path,
  .stage-graphic.is-visible circle,
  .stage-graphic.is-visible rect { stroke-dashoffset: 0; }

  /* Mobile: el trazo se pinta completo, sin animación de dibujado (motion-direction.md) */
  @media (max-width: 1023.98px) {
    .stage-graphic path, .stage-graphic circle, .stage-graphic rect {
      stroke-dasharray: none; stroke-dashoffset: 0; transition: none;
    }
  }
}

/* =========================================================
   768px — tablet
   ========================================================= */
@media (min-width: 768px) {
  .header-inner { padding: 0 2rem; }
  .hero { padding: 3rem 2rem 5rem; }
  .stage { padding: 6rem 2rem; }
  .stage-body p { font-size: 1.15rem; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner, .stage-inner, .hero-inner { max-width: 640px; }
}

/* =========================================================
   1024px — desktop: rail index appears, nav appears
   ========================================================= */
@media (min-width: 1024px) {
  :root { --header-h: 76px; }

  .site-nav { display: block; }
  .site-nav ul { display: flex; gap: 2rem; }
  .site-nav a {
    font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 0.4rem 0; border-bottom: 1px solid transparent;
  }
  .site-nav a:hover, .site-nav a:focus-visible { border-color: var(--oxido); color: var(--oxido); }
  .btn.header-call { display: inline-flex; }
  .menu-toggle { display: none; }

  .stage-index {
    display: flex; flex-direction: column; justify-content: center; gap: 2.2rem;
    position: fixed; left: 0; top: var(--header-h); bottom: 0; width: var(--rail-width);
    padding-left: 1.75rem; background: var(--hueso); border-right: 1px solid var(--line-light);
    z-index: 40;
  }
  .stage-index a { display: flex; flex-direction: column; gap: 0.2rem; opacity: 0.45; transition: opacity 0.25s ease, color 0.25s ease; }
  .stage-index a:hover, .stage-index a:focus-visible { opacity: 1; }
  .stage-index a.is-active { opacity: 1; color: var(--oxido); }
  .stage-index .num { font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; }
  .stage-index .label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }

  .stage-marker { display: none; }

  main, .site-footer { margin-left: var(--rail-width); }

  .hero { padding-left: 4rem; }
  .hero-inner { max-width: 780px; }
  .hero h1 { font-size: clamp(3.2rem, 5.5vw, 4.6rem); }
  .hero-lead { font-size: 1.2rem; max-width: 38ch; }

  .stage { padding: 8rem 4rem; }
  .stage-inner { max-width: 900px; display: grid; grid-template-columns: 1.4fr 0.6fr; column-gap: 3rem; align-items: start; }
  .stage-marker, .stage-word, .stage-actions { grid-column: 1; }
  .stage-body { grid-column: 1; }
  .stage-graphic { grid-column: 2; grid-row: 1 / span 4; width: 100%; max-width: 220px; margin-top: 0.5rem; justify-self: end; }
  .stage-word { font-size: clamp(3.6rem, 6vw, 5.4rem); }

  .stage--contact .stage-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); max-width: 640px; }
  .map-wrap { max-width: 640px; aspect-ratio: 16 / 7; }

  .mobile-callbar { display: none; }
}

@media (min-width: 1280px) {
  .stage { padding: 9rem 6rem; }
  .stage-inner { max-width: 1000px; }
}

@media (min-width: 1440px) {
  :root { --rail-width: 108px; }
  .stage-inner, .hero-inner { max-width: 1080px; }
}
