/* ============================================================
   NEMARI — sistema de diseño (según brief nemari-brief.md)
   Oscuro por defecto. Michroma para títulos, Inter para texto.
   ============================================================ */

:root {
  /* Paleta — oscuro (base) */
  --surface: #170322;
  --surface-alt: #33063f;
  --line: #4a0a5c;
  --ink: #fff4fb;
  --ink-muted: #dcb3e9;
  --primary: #d465fa;
  --on-primary: #170322;
  --accent: #fd5dad;
  --on-accent: #170322;
  --warm: #fd8074;
  --on-warm: #170322;
  --highlight: #ffca06;
  --pastel-lavender: #f4d6fb;
  --pastel-pink: #fdd4e8;
  --pastel-peach: #fedfd8;
  --on-pastel: #330342;

  --font-display: 'Michroma', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
}
.display { font-size: clamp(32px, 5.4vw, 48px); line-height: 1.13; }
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.18; }
h2 { font-size: clamp(20px, 2.6vw, 24px); line-height: 1.33; }
h3 { font-size: 17px; line-height: 1.53; }
p { margin: 0; }
.muted { color: var(--ink-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--highlight);
  flex: none;
}

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ── Header ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: rgba(23, 3, 34, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(74, 10, 92, 0.6);
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 82px;
}
.nav-logo img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--ink-muted);
  transition: color 200ms var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: none; }
.nav-burger {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 42px; height: 42px; color: var(--ink); cursor: pointer;
  font-size: 18px;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: clamp(150px, 20vw, 210px) 0 clamp(80px, 10vw, 130px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: -20% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(46% 60% at 22% 20%, rgba(212, 101, 250, 0.32), transparent 70%),
    radial-gradient(38% 50% at 82% 8%, rgba(253, 93, 173, 0.24), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-logo { margin-bottom: 40px; }
.hero-logo img { height: 46px; width: auto; }
.hero h1.display { max-width: 16ch; margin-bottom: 26px; }
.hero-sub { max-width: 56ch; font-size: 18px; line-height: 1.6; color: var(--ink-muted); margin-bottom: 40px; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-note { font-size: 14px; color: var(--ink-muted); }

/* ── Marquee de servicios (thread motif) ── */
.thread-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--accent) 50%, var(--line) 85%, transparent);
  margin: 0;
}

/* ── Servicios ── */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(44px, 6vw, 64px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2.display { margin-top: 16px; max-width: 18ch; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.svc-card {
  background: var(--surface);
  padding: 34px 30px 30px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 220px;
  transition: background 260ms var(--ease);
}
.svc-card:hover { background: var(--surface-alt); }
.svc-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--warm);
}
.svc-card h3 { color: var(--ink); }
.svc-card p { color: var(--ink-muted); font-size: 14.5px; }

/* ── Experiencia / clientes — ticker horizontal (igual a mm2d.cl) ── */
.ticker-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-row {
  display: flex;
  gap: 54px;
  white-space: nowrap;
  width: max-content;
  align-items: center;
  animation: nemari-ticker 32s linear infinite;
}
.ticker-logo {
  flex-shrink: 0;
  height: 78px; width: 150px;
  display: flex; align-items: center; justify-content: center;
}
.ticker-logo img {
  max-height: 100%; max-width: 100%; width: auto; object-fit: contain; display: block;
}
@keyframes nemari-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Por qué Nemari ── */
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.why-copy p { font-size: 17px; color: var(--ink-muted); max-width: 52ch; }
.why-copy p + p { margin-top: 20px; }
.why-card {
  background: var(--pastel-lavender);
  color: var(--on-pastel);
  border-radius: 20px;
  padding: 34px;
}
.why-card .name-origin { font-family: var(--font-display); font-size: 15px; margin-bottom: 14px; display: block; color: #6d0186; }
.why-card p { color: var(--on-pastel); font-size: 15px; }
.why-pillars { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.why-pillar { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-muted); }
.why-pillar .dot { flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--highlight); margin-top: 6px; }
.why-pillar strong { color: var(--ink); font-weight: 600; }

/* ── Franja de tono / cita ── */
.tone-band {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tone-band .wrap { padding-top: clamp(56px, 8vw, 88px); padding-bottom: clamp(56px, 8vw, 88px); }
.tone-quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.5;
  max-width: 22ch;
  color: var(--ink);
}
.tone-quote .hl { color: var(--accent); }

/* ── Contacto ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(30px, 4vw, 44px);
}
.contact-card .email-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--primary);
  margin: 22px 0 26px;
  word-break: break-all;
}
.contact-card .email-link:hover { color: var(--accent); }
.contact-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.contact-list li { list-style: none; font-size: 14.5px; color: var(--ink-muted); padding-left: 18px; position: relative; }
.contact-list li::before { content: '—'; position: absolute; left: 0; color: var(--warm); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer .wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo img { height: 20px; }
.footer-meta { font-size: 13px; color: var(--ink-muted); display: flex; gap: 22px; flex-wrap: wrap; }

/* ── Casos ── */
.case-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.case-card {
  background: var(--surface);
  padding: clamp(28px, 4vw, 40px) clamp(26px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 14px;
  transition: background 260ms var(--ease);
}
.case-card:hover { background: var(--surface-alt); }
.case-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.case-head h3 { color: var(--ink); font-size: 20px; }
.case-status {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  white-space: nowrap;
}
.case-card p { color: var(--ink-muted); font-size: 15px; max-width: 70ch; }

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .why-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .ticker-logo { height: 60px; width: 110px; }
}
