/* ==========================================================================
   DASAKI STUDIO — Stylesheet
   Nordic-slate, dark/modern, signal-line scroll-storytelling layout.
   Palette is intentionally restrained: near-black ground, ice-gray ink,
   steel + slate as the only "accent" — the glow IS the accent.
   ========================================================================== */


   @font-face {
  font-family: 'Grotesk';
  src: url('../fonts/Neue-Pixel-Grotesk.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


@font-face {
  font-family: 'TWKLausanne';
  src: url('../fonts/TWKLausanne/TWKLausanne-400.otf') format('otf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* -----------------------------
   1. Design tokens
------------------------------ */
:root{
  /* --- Nordic slate palette (as specified) --- */
  --ice:        #F0F5F9;   /* lightest — headings, primary text on dark */
  --steel:      #C9D6DF;   /* secondary text, borders, hairlines */
  --slate:      #52616B;   /* muted text, dividers, form chrome */
  --near-black: #1E2022;   /* primary ground */

  /* --- derived surfaces (built from the four tokens above only) --- */
  --ground:      var(--near-black);
  --ground-deep: #16181a;  /* darker recess for cards / alt panels */
  --ground-raise:#25282b;  /* slightly raised surface */
  --line:        rgba(201, 214, 223, 0.34);   /* steel hairline */
  --line-strong: rgba(201, 214, 223, 0.28);   
  --glow:        rgba(240, 245, 249, 0.16);   /* ice glow, the "accent" */
  --glow-strong: rgba(240, 245, 249, 0.42);

  /* --- type --- */
  --font-display: 'TWKLausanne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Courier New', monospace;

  /* --- rhythm --- */
  --section-pad: clamp(6rem, 12vw, 11rem);
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --content-max: 1180px;

  /* --- motion --- */
  --ease-out: cubic-bezier(.16,.84,.44,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --dur-fast: .25s;
  --dur-med: .6s;
  --dur-slow: 1.1s;
}



/* -----------------------------
   2. Reset
------------------------------ */
*, *::before, *::after{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
body{
  background: var(--ground);
  color: var(--steel);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font-family:inherit; cursor:pointer; }
input, textarea, select{ font-family:inherit; font-size:1rem; color:inherit; }
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--ice); font-weight:400; line-height:1.12; letter-spacing:-0.01em; }
:focus-visible{ outline: 2px solid var(--ice); outline-offset: 4px; }

/* Hide default cursor for custom-cursor devices only (fine pointer) */
@media (hover:hover) and (pointer:fine){
  body{ cursor:none; }
  a, button, input, textarea, select, .cursor-hover{ cursor:none; }
}

/* -----------------------------
   3. Utility / layout
------------------------------ */
.wrap{
  max-width: var(--content-max);
  margin-inline:auto;
  padding-inline: var(--gutter);
}
.section{
  position:relative;
  padding-block: var(--section-pad);
}
.section-inner{ position:relative; z-index:2; }

.eyebrow{
  display:flex; align-items:center; gap:.75rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--slate);
  margin-bottom: 1.25rem;
}
.eyebrow::before{
  content:'';
  width: 28px; height:1px;
  background: var(--slate);
}
.eyebrow .code{ color: var(--steel); }

.section-head{
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.section-head h2{
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin-bottom: 1.1rem;
}
.section-head p{
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 46ch;
}

.btn{
  display:inline-flex; align-items:center; gap:.6rem;
  font-family: var(--font-mono);
  font-size:.85rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding: .95rem 1.6rem;
  border:1px solid var(--line-strong);
  background:transparent;
  color:var(--ice);
  border-radius:2px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn::after{ content:'→'; transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover{ border-color: var(--ice); background: rgba(240,245,249,.06); transform: translateY(-2px); }
.btn:hover::after{ transform: translateX(4px); }
.btn-solid{ background: var(--ice); color: var(--near-black); border-color: var(--ice); }
.btn-solid:hover{ background: var(--steel); }

/* Fade-up reveal utility, driven by IntersectionObserver in JS */
.reveal{
  opacity:0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible{ opacity:1; transform:none; }
.reveal-delay-1{ transition-delay:.08s; }
.reveal-delay-2{ transition-delay:.16s; }
.reveal-delay-3{ transition-delay:.24s; }
.reveal-delay-4{ transition-delay:.32s; }

/* -----------------------------
   4. Custom cursor
------------------------------ */
.cursor-dot, .cursor-ring{
  position:fixed; top:0; left:0;
  pointer-events:none;
  border-radius:50%;
  z-index:9999;
  transform: translate(-50%,-50%);
  will-change: transform;
}
.cursor-dot{
  width:6px; height:6px;
  background: var(--ice);
}
.cursor-ring{
  width:34px; height:34px;
  border:1px solid var(--glow-strong);
  transition: width var(--dur-fast) var(--ease-out), height var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.cursor-ring.is-active{
  width:56px; height:56px;
  background: rgba(240,245,249,.05);
  border-color: var(--ice);
}
@media (hover:none), (pointer:coarse){
  .cursor-dot, .cursor-ring{ display:none; }
}

/* -----------------------------
   5. Preloader
------------------------------ */
.preloader{
  position:fixed; inset:0;
  z-index: 10000;
  background: var(--near-black);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap: 1.5rem;
  transition: opacity .7s var(--ease-in-out), visibility .7s var(--ease-in-out);
}
.preloader.is-hidden{ opacity:0; visibility:hidden; }
.preloader-mark{
  font-family: 'Grotesk';
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing:.02em;
  color: var(--ice);
  display:flex;
}
.preloader-mark span{
  opacity:0;
  transform: translateY(12px);
  animation: letterIn .6s var(--ease-out) forwards;
}
@keyframes letterIn{ to{ opacity:1; transform:none; } }
.preloader-bar{
  width: 200px; height:1px;
  background: var(--line);
  position:relative; overflow:hidden;
}
.preloader-bar::after{
  content:'';
  position:absolute; top:0; left:0; height:100%; width:0%;
  background: var(--ice);
  animation: loadBar 1.3s var(--ease-in-out) forwards .4s;
}
@keyframes loadBar{ to{ width:100%; } }
.preloader-pct{
  font-family: var(--font-mono);
  font-size:1.75rem;
  color: var(--slate);
  letter-spacing:.1em;
}

/* -----------------------------
   6. Signal line (signature element)
   A vertical progress line threading through every section,
   representing a live signal moving through the studio's systems.
------------------------------ */
.signal{
  position: fixed;
  left: clamp(1rem, 3.5vw, 3rem);
  top: 0;
  height: 100vh;
  width: 1px;
  z-index: 40;
  display:flex; align-items:center;
  pointer-events:none;
}
.signal-track{
  position:relative;
  width:1px; height: 64vh;
  background: var(--line);
}
.signal-fill{
  position:absolute; top:0; left:0; width:100%;
  height:0%;
  background: linear-gradient(to bottom, transparent, var(--ice));
  transition: height .1s linear;
}
.signal-dot{
  position:absolute; left:50%;
  width:7px; height:7px;
  border-radius:50%;
  background: var(--ice);
  box-shadow: 0 0 12px 2px var(--glow-strong);
  transform: translate(-50%, 0);
  top:0%;
  transition: top .1s linear;
}
@media (max-width: 860px){ .signal{ display:none; } }

/* -----------------------------
   7. Header / hamburger nav
------------------------------ */
.site-header{
  position: fixed; top:0; left:0; right:0;
  z-index: 600; /* CAMBIADO: De 500 a 600 para quedar por encima de .nav-overlay (550) */
  display:flex; align-items:center; justify-content:space-between;
  padding: 1.6rem var(--gutter);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--near-black) 100%, transparent) 0%,
    color-mix(in srgb, var(--near-black) 90%, transparent) 80%,
    color-mix(in srgb, var(--near-black) 0%, transparent) 98%,
    color-mix(in srgb, var(--near-black) 0%, transparent) 100%
  );
  transition: background var(--dur-fast);
}

/* Al abrir el menú, hacemos el header transparente para integrarlo limpiamente */
.nav-open .site-header {
  background: transparent;
}

.logo{
  font-family: var(--font-display);
  font-weight:600;
  font-size:1.05rem;
  letter-spacing:.02em;
  color: var(--ice);
  display:flex; flex-direction:column; line-height:1.05;
}
.logo img {
  width: 30%;
  min-width: 150px;
  height: auto;
}
.logo small{
  font-family: var(--font-mono);
  font-weight:400;
  font-size:.62rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color: var(--steel);
  margin-top:.3rem;
}

.hamburger{
position: relative;
  width: 52px; 
  height: 52px;
  min-width: 52px; /* Bloquea el ancho mínimo */
  min-height: 52px; /* Bloquea la altura mínima */
  flex-shrink: 0; /* IMPIDE que Flexbox comprima o aplaste el botón en responsive */
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: transparent; 
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  z-index: 650;
  transition: border-color var(--dur-fast);
}
.hamburger:hover{ border-color: var(--ice); }



.hamburger-lines {
  position: relative;
  width: 18px;
  height: 13px; /* 13px permite distancias exactas de 6px sin subpíxeles */
}

.hamburger-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--ice);
  transform-origin: center;
  transition: transform var(--dur-med) var(--ease-in-out), opacity var(--dur-fast);
  /* Fuerza al motor del navegador a tratar la línea en píxeles nitidos */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Posicionamiento en píxeles enteros exactos */
.hamburger-lines span:nth-child(1) { top: 0px; }
.hamburger-lines span:nth-child(2) { top: 6px; }
.hamburger-lines span:nth-child(3) { top: 12px; }

/* --- ANIMACIÓN A "X" EN ESTADO ABIERTO (.nav-open) --- */

/* La línea 1 baja 6px al centro y rota 45deg */
.nav-open .hamburger-lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

/* La línea 2 desaparece */
.nav-open .hamburger-lines span:nth-child(2) {
  opacity: 0;
}

/* La línea 3 sube 6px al centro y rota -45deg */
.nav-open .hamburger-lines span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Fullscreen nav overlay */
.nav-overlay{
  position: fixed; inset:0;
  z-index: 550;
  background: var(--near-black);
  display:flex; flex-direction:column; justify-content:center;
  padding: 6rem var(--gutter);
  clip-path: circle(0% at calc(100% - 3.3rem) 3.3rem);
  visibility: hidden;
  transition: clip-path .8s var(--ease-in-out), visibility .8s;
}
.nav-open .nav-overlay {
  clip-path: circle(150% at calc(100% - 3.3rem) 3.3rem);
  visibility: visible;
}
.nav-overlay-grid{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap: 4rem;
  max-width: var(--content-max); margin-inline:auto; width:100%;
}
.nav-links{ display:flex; flex-direction:column; gap: .4rem; }
.nav-links li{ overflow:hidden; }
.nav-links a{
  display:inline-flex; align-items:baseline; gap:1rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6.5vw, 4.4rem);
  color: var(--slate);
  font-weight:600;
  transform: translateY(110%);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-open .nav-links a{ animation: navIn .7s var(--ease-out) forwards; }
.nav-links li:nth-child(1) a{ animation-delay:.15s; }
.nav-links li:nth-child(2) a{ animation-delay:.22s; }
.nav-links li:nth-child(3) a{ animation-delay:.29s; }
.nav-links li:nth-child(4) a{ animation-delay:.36s; }
@keyframes navIn{ to{ transform:none; } }
.nav-links a .n{ font-family: var(--font-mono); font-size:.9rem; color: var(--slate); }
.nav-links a:hover{ color: var(--ice); }

.nav-meta{
  display:flex; flex-direction:column; justify-content:space-between; gap: 2.5rem;
  min-width: 220px;
}
.nav-meta-block h4{
  font-family: var(--font-mono); font-size:.72rem; letter-spacing:.14em;
  text-transform:uppercase; color: var(--slate); margin-bottom:.9rem; font-weight:500;
}
.nav-meta-block a, .nav-meta-block p{ color: var(--steel); font-size:.95rem; display:block; margin-bottom:.4rem; }
.nav-meta-block a:hover{ color: var(--ice); }
.nav-social{ display:flex; gap:1.1rem; margin-top:.3rem; }

/* -----------------------------
   8. Hero
------------------------------ */
.hero{
  position:relative;
  height:100svh;
  min-height:560px;
  display:flex; flex-direction:column; justify-content:flex-end;
  overflow:hidden;
}
.hero-media{
  position:absolute; inset:0;
  z-index:0;
}
.hero-media video{
  width:100%; height:100%; object-fit:cover;
  filter: grayscale(45%) brightness(.55) contrast(1.05);
  transform: scale(1.08);
}
.hero-grid{
  position:absolute; inset:-10% -10%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity:.35;
  will-change: transform;
}
.hero-vignette{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(30,32,34,0) 0%, rgba(30,32,34,.55) 62%, rgba(30,32,34,.92) 100%),
    linear-gradient(to top, var(--near-black) 2%, transparent 42%);
}
.hero-content{
  position:relative; z-index:2;
  padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem);
}
.hero-tagline{
  font-family: var(--font-mono);
  font-size:1.1rem;
  letter-spacing:.22em;
  text-transform:uppercase;
  color: var(--steel);
  margin-bottom: 1.4rem;
  display:flex; gap:.6rem; align-items:center;
}
.hero-tagline span{ color: var(--slate); }
.hero h1{
  font-size: clamp(1.5rem, 4.5vw, 4.2rem);/*clamp(2.6rem, 7.4vw, 6.4rem);*/
  max-width: 25ch;
  color: var(--ice);
}
.hero h1 em{
  font-style:normal;
  color:transparent;
  -webkit-text-stroke: 1px var(--steel);
}
.hero-sub{
  margin-top: 1.8rem;
  max-width: 46ch;
  font-size: 1.08rem;
  color: var(--steel);
}
.hero-actions{
  margin-top: 2.6rem;
  display:flex; gap:1rem; flex-wrap:wrap;
}
.hero-scroll{
  position:absolute; right: var(--gutter); bottom: 2.4rem;
  z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:.7rem;
  font-family: var(--font-mono); font-size:.68rem; letter-spacing:.16em;
  color: var(--slate); text-transform:uppercase;
}
.hero-scroll .line{
  width:1px; height:46px;
  background: linear-gradient(var(--steel), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse{ 0%,100%{ opacity:.3; } 50%{ opacity:1; } }

/* -----------------------------
   9. Node / section labels (timeline system)
------------------------------ */
.node-label{
display: flex; 
  align-items: center; /* Centra verticalmente la bolita con el bloque eyebrow */
  gap: .9rem;
  margin-bottom: 1.4rem;
}
.eyebrow {
  display: flex; 
  align-items: center; /* Centra verticalmente la línea horizontal del eyebrow con su texto */
  gap: .75rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0; /* Asegúrate de eliminar o tener a 0 el margin-bottom si desalinea */
  line-height: 1;   /* Reduce la altura de línea para un centrado perfecto */
}

.node-marker {
  width: 9px; 
  height: 9px; 
  border-radius: 50%;
  border: 1px solid var(--steel);
  flex-shrink: 0;
  transition: background var(--dur-fast), box-shadow var(--dur-fast);
}
.section.is-active .node-marker{ background: var(--ice); box-shadow:0 0 10px 2px var(--glow-strong); }

/* -----------------------------
   10. About
------------------------------ */
/*.about{ background: var(--ground); }*/

.about { 
  background: transparent; /* Quita el color sólido --near-black */
  position: relative;
  /* Activa la ventana de recorte para que el video fijo solo sea visible dentro de la sección */
  clip-path: inset(0 0 0 0); 
}

.about-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.about-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ajusta el tono, brillo y contraste para encajar con la estética slate del sitio */
  filter: grayscale(40%) brightness(0.4) contrast(1.1);
}

.about-panel {
  border: 1px solid var(--line);
  /* Un fondo semitransparente para que las tarjetas sigan siendo legibles sobre el video */
  background: rgba(22, 24, 26, 0.85); 
  backdrop-filter: blur(8px);
  padding: 2rem;
  border-radius: 2px;
}
.about-bg {
  position: absolute; inset: 0; z-index: 1; /* Pasa sobre el video (z-index: 0) pero bajo el texto */
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .35; /* Ajusta la opacidad de los puntos si queda muy cargado */
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  pointer-events: none;
}
.about-grid{
  display:grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 6vw, 5rem);
  align-items:start;
}
.about-lede{
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--ice);
  font-weight:500;
  line-height:1.4;
  margin-bottom: 1.6rem;
}
.about-body p{ margin-bottom:1.1rem; max-width: 58ch; color: var(--steel); }
.about-stats{
  display:grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem;
  border-top:1px solid var(--line);
  padding-top: 2rem;
  margin-top: 2.4rem;
}
.stat .num{
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--ice);
  display:block;
}
.stat .label{
  font-family: var(--font-mono);
  font-size:.72rem; letter-spacing:.1em; text-transform:uppercase;
  color: var(--slate); margin-top:.35rem; display:block;
}
.about-panel{
  border:1px solid var(--line);
  background: var(--ground-deep);
  padding: 2rem;
  border-radius: 2px;
}
.about-panel h4{
  font-family: var(--font-mono); font-size:.72rem; letter-spacing:.14em;
  text-transform:uppercase; color: var(--slate); margin-bottom:1.4rem;
}
.about-panel ul{ display:flex; flex-direction:column; gap:1rem; }
.about-panel li{
  display:flex; justify-content:space-between; gap:1rem;
  padding-bottom:1rem; border-bottom:1px solid var(--line);
  color: var(--steel); font-size:.94rem;
}
.about-panel li:last-child{ border-bottom:none; padding-bottom:0; }
.about-panel li span:last-child{ color: var(--ice); font-family: var(--font-mono); font-size:.85rem; }

/* -----------------------------
   11. Services
------------------------------ */
.services { 
  background: var(--ground-deep); 
}

.service-list { 
  border-top: 1px solid var(--line); 
}

.service-item {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 2.1rem 1.5rem;
  display: grid; 
  grid-template-columns: 90px 1fr auto; 
  gap: 1.5rem;
  align-items: start;
  /* Eliminamos el background de aquí para controlarlo en .service-overlay */
  transition: padding-left var(--dur-med) var(--ease-out);
}
/* 1. Capa Multimedia (z-index: 0) */
.service-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.service-bg-img img,
.service-bg-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(40%) brightness(0.75);
  transform: scale(1.05);
  transition: transform 0.8s var(--ease-out);
}

/* 2. Capa opaca que tapa el video (z-index: 1) */
.service-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--ground-deep);
  opacity: 1; /* Completamente opaca por defecto */
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

/* 3. Textos sobre el video (z-index: 2) */
.service-item > *:not(.service-bg-img):not(.service-overlay) {
  position: relative;
  z-index: 2;
}

/* --- HOVER --- */
.service-item:hover {
  padding-left: 2rem;
}

/* Al pasar el cursor, la capa se vuelve semi-transparente dejando ver el video en movimiento *//*
.service-item:hover .service-overlay {
  opacity: 0.25; 
}
*/
/* Reemplaza la regla de hover/is-hovered de los servicios por esta: */
.service-item:hover,
.service-item.is-hovered {
  padding-left: 2rem;
}

.service-item:hover .service-overlay,
.service-item.is-hovered .service-overlay {
  opacity: 0.25; 
}

.service-item:hover .service-bg-img video,
.service-item:hover .service-bg-img img,
.service-item.is-hovered .service-bg-img video,
.service-item.is-hovered .service-bg-img img {
  transform: scale(1.0);
}

.service-item:hover h3,
.service-item.is-hovered h3 { 
  color: var(--ice); 
}

/*.service-item:hover{ padding-left: .8rem; }*/
.service-index{ font-family: var(--font-mono); color: var(--slate); font-size:.9rem; padding-top:.3rem; }
.service-item h3{ font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom:.6rem; transition: color var(--dur-fast); }
/*.service-item:hover h3{ color: var(--ice); }*/
.service-item p{ max-width: 54ch; color: var(--slate); font-size:.98rem; }
.service-tags{ display:flex; flex-wrap:wrap; gap:.5rem; align-self:start; padding-top:.4rem; }
.tag{
  font-family: var(--font-mono); font-size:.68rem; letter-spacing:.06em;
  text-transform:uppercase; color: var(--steel);
  border:1px solid var(--line-strong); padding:.35rem .65rem; border-radius:2px;
  white-space:nowrap;
}

/* -----------------------------
   12. Portfolio
------------------------------ */
.portfolio{ background: var(--ground); }
.portfolio-filter{
  display:flex; flex-wrap:wrap; gap:.6rem;
  margin-bottom: 2.6rem;
}
.filter-btn{
  font-family: var(--font-mono); font-size:.75rem; letter-spacing:.08em; text-transform:uppercase;
  padding:.6rem 1.1rem; border:1px solid var(--line-strong); background:transparent; color: var(--slate);
  border-radius:2px; transition: all var(--dur-fast) var(--ease-out);
}
.filter-btn:hover{ color: var(--ice); border-color: var(--ice); }
.filter-btn.is-active{ background: var(--ice); color: var(--near-black); border-color: var(--ice); }

.work-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
}
.work-card{
  position:relative; overflow:hidden;
  border:1px solid var(--line);
  aspect-ratio: 4/5;
  background: var(--ground-deep);
}
.work-card img{
  width:100%; height:100%; object-fit:cover;
  filter: grayscale(70%) brightness(.72);
  transform: scale(1.02);
  transition: transform .8s var(--ease-out), filter .5s;
}
.work-card:hover img{ transform: scale(1.1); filter: grayscale(10%) brightness(.85); }
.work-overlay{
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(30,32,34,.92) 0%, rgba(30,32,34,.1) 55%, transparent 75%);
  display:flex; flex-direction:column; justify-content:flex-end;
  padding: 1.5rem;
}
.work-cat{
  font-family: var(--font-mono); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase;
  color: var(--steel); margin-bottom:.4rem;
}
.work-overlay h3{ font-size:1.25rem; }
.work-card[data-cat]{ transition: opacity .4s var(--ease-out), transform .4s var(--ease-out); }
.work-card.is-hidden{ display:none; }

/* -----------------------------
   13. Contact
------------------------------ */
.contact{ background: var(--ground-deep); }
.contact-grid{
  display:grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 5rem);
}
.contact-info p{ color: var(--steel); max-width:40ch; margin-bottom: 2rem; }
.contact-detail{ margin-bottom:1.6rem; }
.contact-detail h4{
  font-family: var(--font-mono); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase;
  color: var(--slate); margin-bottom:.5rem;
}
.contact-detail a, .contact-detail span{ font-size:1.05rem; color: var(--ice); }

.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap:1.4rem; }
.field{ margin-bottom:1.5rem; position:relative; }
.field label{
  display:block; font-family: var(--font-mono); font-size:.7rem; letter-spacing:.1em;
  text-transform:uppercase; color: var(--slate); margin-bottom:.6rem;
}
.field input, .field textarea, .field select{
  width:100%; background:transparent; border:none; border-bottom:1px solid var(--line-strong);
  padding: .7rem .1rem; color: var(--ice); transition: border-color var(--dur-fast);
}
.field select{ appearance:none; }
.field select option{ background: var(--near-black); color: var(--ice); }
.field textarea{ resize:vertical; min-height:110px; }
.field input:focus, .field textarea:focus, .field select:focus{ border-color: var(--ice); outline:none; }
.field .error-msg{
  display:block; min-height: 1.2rem; font-size:.78rem; color: #d98787; margin-top:.4rem; font-family: var(--font-mono);
}
.field.has-error input, .field.has-error textarea, .field.has-error select{ border-color:#c96a6a; }
.form-foot{ display:flex; align-items:center; gap:1.5rem; margin-top:.5rem; flex-wrap:wrap; }
.form-status{
  font-family: var(--font-mono); font-size:.82rem; color: var(--slate);
}
.form-status.is-success{ color: var(--ice); }

/* -----------------------------
   14. Footer
------------------------------ */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 1.8rem var(--gutter);
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem;
  flex-wrap:wrap;
}
.footer-copy{ font-family: var(--font-mono); font-size:.78rem; color: var(--slate); }
.footer-social{ display:flex; gap:1.4rem; align-items:center; }
.footer-social a{
  font-family: var(--font-mono); font-size:.78rem; color: var(--steel);
  display:flex; align-items:center; gap:.4rem; transition: color var(--dur-fast);
}
.footer-social a:hover{ color: var(--ice); }
.footer-social svg{ width:14px; height:14px; }

/* -----------------------------
   15. Back to top
------------------------------ */
.to-top{
  position:fixed; right: 1.6rem; bottom: 1.6rem;
  width:48px; height:48px; border-radius:50%;
  border:1px solid var(--line-strong);
  background: var(--ground);
  display:flex; align-items:center; justify-content:center;
  z-index: 300;
  opacity:0; visibility:hidden; transform: translateY(12px);
  transition: opacity var(--dur-fast), transform var(--dur-fast), border-color var(--dur-fast), visibility var(--dur-fast);
}
.to-top.is-visible{ opacity:1; visibility:visible; transform:none; }
.to-top:hover{ border-color: var(--ice); }
.to-top svg{ width:16px; height:16px; stroke: var(--ice); }

/* -----------------------------
   16. Responsive
------------------------------ */
@media (max-width: 980px){
  .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .work-grid{ grid-template-columns: repeat(2, 1fr); }
  .service-item{ grid-template-columns: 50px 1fr; }
  .service-tags{ grid-column: 2 / 3; }
}
@media (max-width: 720px){
  .form-row{ grid-template-columns: 1fr; }
  .work-grid{ gap:.8rem; }
  .nav-overlay-grid{ flex-direction:column; gap:2.5rem; }
  .site-footer{ flex-direction:column; align-items:flex-start; }
}
@media (max-width: 520px){
  .work-grid{ grid-template-columns: 1fr; }
  .hero h1{ max-width: none; }
}

/* Extra-small phones: tighten nav type so long words never clip
   against the index number, and ease up section padding a touch. */
@media (max-width: 380px){
  .nav-links a{ font-size: clamp(1.7rem, 9.5vw, 2.6rem); gap:.6rem; }
  .hero-actions{ gap:.7rem; }
  .hero-actions .btn{ padding:.85rem 1.3rem; font-size:.8rem; }
  .about-stats{ gap:1.2rem 1.4rem; }
}

/* Short viewports (landscape phones in particular): the hero's
   fixed min-height was taller than the actual viewport, clipping
   content. Let it size to the real viewport and hide the purely
   decorative scroll cue so it can't overlap the CTAs. */
@media (max-height: 600px) and (orientation: landscape){
  .hero{ height:auto; min-height:100svh; padding-top: 5.5rem; }
  .hero-scroll{ display:none; }
  .hero-content{ padding-bottom: 2rem; }
}

/* Narrow-and-short phones: the decorative scroll indicator can sit
   under the hero buttons when the heading wraps to more lines. */
@media (max-width: 400px) and (max-height: 700px){
  .hero-scroll{ display:none; }
}


/* -----------------------------
   Ajustes de Maquetación Móvil (< 768px)
------------------------------ */
@media (max-width: 768px) {
  /* 1. Dar más aire al header */
  .site-header {
    padding: 1.2rem 1.2rem;
  }
  
  .logo img {
    min-width: 120px;
    width: 35%;
  }
  /* Ajuste de espacio vertical en Hero */
.hero {
  /* Centra el contenido en vertical en lugar de pegarlo abajo */
  justify-content: center;
  /* Espacio para la cabecera fija arriba */
  padding-top: 6rem;
}


  /* 2. Reducir tipografía del Hero para que no empuje todo hacia abajo */
  .hero-content {
    padding-inline: 1.2rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6.5vw, 2.4rem);
    max-width: 100%;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-top: 1rem;
  }

  /* 3. Botones en vertical para que NUNCA se desborden ni tapen el SCROLL */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    margin-top: 1.8rem;
    max-width: 280px; /* Ancho controlado en móvil */
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1.2rem;
  }

  /* 4. Ocultar o recolocar la línea de SCROLL en móviles para evitar solapamientos */
  .hero-scroll {
    display: none;
  }
}