/* ============================================================
   Voicepos Chile SpA — landing
   Direction: "Estudio de señal" — nocturno cálido, tipografía
   editorial (Fraunces) + grotesca (Hanken) + mono para etiquetas,
   con la onda de voz como firma.
   ============================================================ */

:root {
  --ink: #0b0e13;
  --ink-2: #10141c;
  --ink-3: #161b24;
  --line: #232b38;
  --line-soft: #1a212b;

  --ivory: #ece8df;
  --fog: #aeb6c2;
  --muted: #7e8899;

  --signal: #e9a24b;
  --signal-hi: #f3b76a;
  --signal-2: #64b6c4; /* frío — sólo vive en la onda */
  --on-signal: #0b0e13;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);

  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset-ish ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient warmth in the top-left, very restrained */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgba(233, 162, 75, 0.09), transparent 60%),
    radial-gradient(50rem 40rem at 110% 8%, rgba(100, 182, 196, 0.05), transparent 55%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

p {
  margin: 0;
}

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section {
  padding-block: var(--section-y);
}

.section + .section {
  padding-top: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.section-head {
  max-width: 34ch;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.section-head .eyebrow {
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem);
}

.accent {
  color: var(--signal);
  font-style: italic;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  background: var(--signal);
  color: var(--on-signal);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- brand mark (mini waveform) ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}
.brand-mark span {
  width: 3px;
  border-radius: 3px;
  background: var(--signal);
}
.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 20px; }
.brand-mark span:nth-child(4) { height: 12px; }
.brand-mark span:nth-child(5) { height: 6px; }

.brand-word {
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
}
.site-header[data-scrolled] {
  background: rgba(11, 14, 19, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 2rem;
}
.nav a {
  color: var(--fog);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.18s var(--ease);
}
.nav a:hover {
  color: var(--ivory);
}

.nav-cta {
  margin-left: 0.25rem;
}

/* ---------- buttons ---------- */
.btn {
  --btn-pad-y: 0.7rem;
  --btn-pad-x: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  --btn-pad-y: 0.95rem;
  --btn-pad-x: 1.6rem;
  font-size: 1rem;
}

.btn-wa {
  background: var(--signal);
  color: var(--on-signal);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 10px 30px -12px rgba(233, 162, 75, 0.55);
}
.btn-wa:hover {
  background: var(--signal-hi);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 16px 40px -14px rgba(233, 162, 75, 0.7);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.btn-ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
  transform: translateY(-2px);
}

.wa-glyph {
  width: 17px;
  height: 17px;
  flex: none;
  background: currentColor;
  -webkit-mask: center / contain no-repeat
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2 22l5.25-1.38a9.9 9.9 0 0 0 4.79 1.22h.01c5.46 0 9.91-4.45 9.91-9.91S17.5 2 12.04 2Zm5.8 14.13c-.25.7-1.45 1.34-2 1.42-.53.08-1.19.11-1.92-.12-.44-.14-1.01-.33-1.74-.65-3.06-1.32-5.06-4.4-5.21-4.6-.15-.2-1.25-1.66-1.25-3.17 0-1.51.79-2.25 1.07-2.56.28-.31.61-.38.81-.38.2 0 .41 0 .59.01.19.01.44-.07.69.53.25.6.86 2.11.94 2.26.08.15.13.33.03.53-.1.2-.15.33-.3.5-.15.18-.31.4-.44.53-.15.15-.3.31-.13.61.17.3.76 1.25 1.63 2.02 1.12.99 2.07 1.3 2.37 1.45.3.15.47.13.65-.08.18-.2.75-.87.95-1.17.2-.3.4-.25.68-.15.28.1 1.77.83 2.07.98.3.15.5.22.57.35.08.13.08.72-.17 1.42Z"/></svg>');
  mask: center / contain no-repeat
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2 22l5.25-1.38a9.9 9.9 0 0 0 4.79 1.22h.01c5.46 0 9.91-4.45 9.91-9.91S17.5 2 12.04 2Zm5.8 14.13c-.25.7-1.45 1.34-2 1.42-.53.08-1.19.11-1.92-.12-.44-.14-1.01-.33-1.74-.65-3.06-1.32-5.06-4.4-5.21-4.6-.15-.2-1.25-1.66-1.25-3.17 0-1.51.79-2.25 1.07-2.56.28-.31.61-.38.81-.38.2 0 .41 0 .59.01.19.01.44-.07.69.53.25.6.86 2.11.94 2.26.08.15.13.33.03.53-.1.2-.15.33-.3.5-.15.18-.31.4-.44.53-.15.15-.3.31-.13.61.17.3.76 1.25 1.63 2.02 1.12.99 2.07 1.3 2.37 1.45.3.15.47.13.65-.08.18-.2.75-.87.95-1.17.2-.3.4-.25.68-.15.28.1 1.77.83 2.07.98.3.15.5.22.57.35.08.13.08.72-.17 1.42Z"/></svg>');
}

/* ---------- mobile nav ---------- */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ivory);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem var(--gutter) 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 14, 19, 0.96);
  backdrop-filter: blur(14px);
}
.mobile-menu[hidden] {
  display: none;
}
.mobile-menu a:not(.btn) {
  padding: 0.85rem 0.25rem;
  font-size: 1.1rem;
  color: var(--fog);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu .btn {
  margin-top: 1rem;
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.hero-eyebrow {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.hero-title {
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.4rem);
  max-width: 16ch;
  font-weight: 400;
}

.hero-lead {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  max-width: 54ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--fog);
  line-height: 1.55;
}

.hero-cta {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ---------- waveform (firma) ---------- */
.waveform {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  display: flex;
  align-items: flex-end;
  gap: clamp(3px, 0.8vw, 7px);
  height: clamp(84px, 16vw, 150px);
  width: 100%;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.waveform .bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  will-change: transform;
  animation: wave var(--dur, 2.4s) var(--ease) var(--delay, 0s) infinite alternate;
}
@keyframes wave {
  from { transform: scaleY(0.42); }
  to { transform: scaleY(1); }
}

/* ---------- servicios ---------- */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.service {
  padding: clamp(1.5rem, 2.5vw, 2rem) 0 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.25s var(--ease);
}
.service:hover {
  border-top-color: var(--signal);
}
.service-name {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
  margin-bottom: 0.7rem;
}
.service-copy {
  color: var(--fog);
  max-width: 42ch;
}

/* ---------- enfoque ---------- */
.enfoque-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.enfoque-copy .eyebrow {
  margin-bottom: 1rem;
}
.enfoque-copy .section-title {
  margin-bottom: 1.5rem;
  max-width: 18ch;
}
.enfoque-lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  color: var(--ivory);
  margin-bottom: 1.25rem;
  max-width: 48ch;
}
.enfoque-body {
  color: var(--fog);
  max-width: 48ch;
}

.stats {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--ink-2);
  padding: 1.5rem 1.6rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--ivory);
}
.stat-num {
  font-size: clamp(2.2rem, 1.5rem + 2.5vw, 3.2rem);
}
.stat-plus {
  color: var(--signal);
  font-size: 1.6rem;
  vertical-align: text-top;
}

/* ---------- contacto ---------- */
.contacto-lead {
  margin-top: 1rem;
  color: var(--fog);
  max-width: 46ch;
}
.contact-cta {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.contact-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 900px) {
  .contact-details {
    grid-template-columns: repeat(4, 1fr);
  }
}
.detail {
  background: var(--ink-2);
  padding: 1.5rem 1.6rem;
}
.detail dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.detail dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}
.detail a {
  color: var(--ivory);
  border-bottom: 1px solid var(--line);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.detail a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: var(--section-y);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-legal {
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-legal a {
  color: var(--fog);
  border-bottom: 1px solid var(--line);
}
.footer-legal a:hover {
  color: var(--signal);
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.4rem;
  padding-block: clamp(4rem, 10vw, 7rem);
}
.notfound .eyebrow {
  color: var(--signal);
}
.notfound .hero-lead {
  margin-top: 0;
}

/* ---------- focus visibility ---------- */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .enfoque-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .services {
    grid-template-columns: 1fr;
  }
  .stat {
    padding: 1.25rem 1.35rem;
  }
  .hero-cta .btn {
    width: 100%;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .waveform .bar {
    transform: none;
  }
}
