/* ─────────────────────────────────────────────
   NILO & VALENCIA — v2
   Inspirado en Linear, Vercel, Basement Studio
───────────────────────────────────────────── */

:root {
  --bg:       #0a0a0a;
  --bg-2:     #111111;
  --bg-3:     #1a1a1a;
  --border:   rgba(255,255,255,.08);
  --border-2: rgba(255,255,255,.14);
  --text:     #f0f0f0;
  --text-2:   #888;
  --text-3:   #555;
  --blue:     #4F8EF7;
  --blue-dim: rgba(79,142,247,.12);
  --white:    #ffffff;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;

  --max: 1100px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img, svg { display: block; }

/* ── Utilidades ─────────────────────────────── */
.label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: 64px;
}
.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--white);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 8px;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.amp { color: var(--blue); }

/* ── NAV ────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled {
  background: rgba(10,10,10,.9);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -.2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav__links a {
  font-size: 14px;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav__links a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav__links .nav__cta {
  color: var(--white);
  background: rgba(255,255,255,.1);
  border: 1px solid var(--border-2);
}
.nav__links .nav__cta:hover { background: rgba(255,255,255,.16); }

.nav__right { display: flex; align-items: center; gap: 12px; }

.lang {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color .15s, color .15s;
}
.lang:hover { border-color: var(--border-2); color: var(--text-2); }
#langActive { color: var(--blue); }
.lang__sep { color: var(--text-3); }

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
}
.burger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all .25s;
}
.burger.open span:first-child { transform: translateY(7.5px) rotate(45deg); }
.burger.open span:last-child  { transform: translateY(-7.5px) rotate(-45deg); }


/* ── HERO ───────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Ruido sutil de fondo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .4;
}

/* Glow azul esquina superior derecha */
.hero::after {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(79,142,247,.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 40px 60px;
  width: 100%;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .06em;
  margin-bottom: 40px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: blink 2.5s infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

.hero__h1 {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 8vw, 108px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -2px;
  color: var(--white);
  margin-bottom: 56px;
}
.hero__line--italic {
  font-style: italic;
  color: var(--text-2);
}

.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.hero__desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 440px;
}

/* ── MARQUEE ────────────────────────────────── */
.marquee-wrap {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  overflow: hidden;
  margin-top: auto;
}
.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
}
.marquee-wrap::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.marquee-wrap::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }

.marquee {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: scroll 28s linear infinite;
}
.marquee span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.marquee span:not(:nth-child(2n)) { color: var(--text-3); }

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ── TRABAJO ────────────────────────────────── */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 40px;
}

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.case {
  background: var(--bg);
  padding: 40px;
  transition: background .2s;
}
.case:hover { background: var(--bg-2); }

.case--featured {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.case__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  grid-column: 1 / -1;
}
.case--featured .case__meta { grid-column: auto; }

.case__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
}
.case__year {
  font-size: 12px;
  color: var(--text-3);
}

.case__title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
}
.case__client {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 16px;
}
.case__desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.case__tags span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ── SERVICIOS ──────────────────────────────── */
.services {
  border-top: 1px solid var(--border);
  padding: 120px 40px;
  max-width: var(--max);
  margin: 0 auto;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.service {
  background: var(--bg);
  padding: 40px 36px;
  transition: background .2s;
}
.service:hover { background: var(--bg-2); }

.service__num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .1em;
  margin-bottom: 20px;
}
.service h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.2;
}
.service p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
}

/* ── NOSOTROS ───────────────────────────────── */
.about {
  border-top: 1px solid var(--border);
  padding: 120px 40px;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__text h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 28px;
}
.about__text p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}
.pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  transition: border-color .2s, color .2s;
}
.pill:hover {
  border-color: var(--border-2);
  color: var(--white);
}


/* ── CONTACTO ───────────────────────────────── */
.contact {
  border-top: 1px solid var(--border);
  padding: 120px 40px;
}
.contact__inner {
  max-width: 600px;
  margin: 0 auto;
}
.contact__inner h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
}
.contact__inner > p {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 48px;
}

.form { display: flex; flex-direction: column; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.form__field input,
.form__field textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--sans);
  transition: border-color .15s;
  resize: vertical;
}
.form__field input::placeholder,
.form__field textarea::placeholder { color: var(--text-3); }
.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: rgba(79,142,247,.5);
}
.form__success {
  font-size: 13px;
  color: #22c55e;
  min-height: 20px;
}

/* ── FOOTER ─────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.footer__rut {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
}
.footer__links a {
  font-size: 13px;
  color: var(--text-3);
  transition: color .15s;
}
.footer__links a:hover { color: var(--text); }
.footer__copy {
  font-size: 12px;
  color: var(--text-3);
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,10,.97);
    backdrop-filter: blur(20px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav__links.open a { padding: 12px 14px; }
  .burger { display: flex; }

  .hero__content { padding: 60px 24px 40px; }
  .hero__bottom { flex-direction: column; align-items: flex-start; }

  .cases { grid-template-columns: 1fr; }

  .services__grid { grid-template-columns: 1fr; }

  .about { grid-template-columns: 1fr; gap: 48px; padding: 80px 24px; }

  .work, .services, .contact { padding: 80px 24px; }
  .form__row { grid-template-columns: 1fr; }

  .footer { padding: 24px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .hero__h1 { letter-spacing: -1px; }
}
