/* Zabache Krow · layout: cabecera fija, hero a dos columnas con la luna del logo como pieza central,
   franja de resultados a ancho completo y secciones editoriales en filas. Un solo look oscuro de marca. */

:root {
  --bg: #000000;
  --surface: #120a04;
  --text: #f5f5f0;
  --muted: #b9b1a4;
  --line: rgba(254, 172, 46, 0.22);
  --orange: #fe7c06;
  --amber: #feac2e;
  --gold: #ffc140;
  --ember: #c9640c;
  --error: #ff9b7a;

  --font-display: "Cinzel", Georgia, serif;
  --font-head: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 64px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Banda que tapa la zona segura superior en móviles */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
.section { padding-block: clamp(56px, 9vw, 112px); }

.section-head { display: grid; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title {
  font: 700 clamp(1.8rem, 3.6vw, 2.8rem) / 1.1 var(--font-head);
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
}
.section-intro { color: var(--muted); max-width: 62ch; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 600 1rem/1.2 var(--font-head);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--orange); color: #000; }
.btn-primary:hover { background: var(--amber); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--amber); color: var(--gold); }
.btn svg { flex: none; }

/* Cabecera */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand span {
  font: 600 1.02rem/1 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.nav-links { display: flex; gap: clamp(16px, 2.4vw, 28px); }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font: 500 0.95rem/1 var(--font-head);
  padding-block: 8px;
}
.nav-links a:hover { color: var(--text); }
.nav .btn { min-height: 42px; padding: 0.6rem 1.1rem; font-size: 0.95rem; }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 88px); overflow-x: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.hero h1 {
  font: 700 clamp(2.1rem, 4.3vw, 3.5rem) / 1.06 var(--font-head);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font-size: 0.92rem; color: var(--muted); }

/* Animación del hero (todo dentro de .demo para no chocar con el resto) */
.demo { position: relative; min-width: 0; --ink-2: #0d0b09; --text-dark: #1b1815; --paper: #f5f5f0; }
.demo::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: radial-gradient(closest-side, rgba(254, 124, 6, 0.22), rgba(254, 172, 46, 0.06) 60%, transparent 75%);
  pointer-events: none;
}
.demo .frame {
  position: relative;
  border: 1px solid rgba(245, 245, 240, 0.14);
  border-radius: 14px;
  background: var(--ink-2);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(254, 124, 6, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.demo .chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #15120f; border-bottom: 1px solid rgba(245, 245, 240, 0.14); }
.demo .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #3a342d; display: block; }
.demo .url {
  margin-left: 10px; flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--muted); background: #0b0907;
  border-radius: 6px; padding: 5px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo .stage { position: relative; aspect-ratio: 16 / 11.5; overflow: hidden; container-type: inline-size; background: var(--paper); }
.demo .sc { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.45s ease; padding: 5cqw 6cqw; }
.demo .stage[data-scene="search"] .s-search,
.demo .stage[data-scene="land"] .s-land,
.demo .stage[data-scene="call"] .s-call { opacity: 1; }
.demo .stage.fade .sc { opacity: 0 !important; }

.demo .s-search { color: var(--text-dark); }
.demo .sbar {
  display: flex; align-items: center; gap: 2cqw;
  border: 1px solid #d8d3c8; background: #fff; border-radius: 100px;
  padding: 1.9cqw 3cqw; font-size: 3.1cqw; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.demo .sbar svg { width: 3.4cqw; height: 3.4cqw; flex: none; stroke: #7b746a; }
.demo .caret { width: 0.3cqw; height: 3.4cqw; background: var(--text-dark); animation: demo-blink 1s steps(1) infinite; }
@keyframes demo-blink { 50% { opacity: 0; } }
.demo .serp { margin-top: 3.4cqw; display: grid; gap: 2.6cqw; }
.demo .serp > * { opacity: 0; transform: translateY(1.2cqw); transition: opacity 0.4s ease, transform 0.4s ease; }
.demo .serp.show > * { opacity: 1; transform: none; }
.demo .serp.show > :nth-child(2) { transition-delay: 0.15s; }
.demo .serp.show > :nth-child(3) { transition-delay: 0.3s; }
.demo .ad {
  background: #fff; border-radius: 1.6cqw; padding: 2.4cqw 2.8cqw;
  border: 1px solid #e4dfd3; transition: box-shadow 0.25s, border-color 0.25s, transform 0.15s;
}
.demo .ad.hot { border-color: var(--orange); box-shadow: 0 0 0 0.5cqw rgba(254, 124, 6, 0.2); }
.demo .ad.press { transform: scale(0.985); }
.demo .adtag { font-size: 2.2cqw; color: #5d564c; display: flex; align-items: center; gap: 1.2cqw; margin-bottom: 0.8cqw; }
.demo .adtag b { font-weight: 700; color: var(--text-dark); border: 1px solid #5d564c; border-radius: 0.6cqw; padding: 0 0.9cqw; font-size: 1.9cqw; }
.demo .ad h3 { margin: 0 0 0.6cqw; font-family: var(--font-body); font-weight: 500; font-size: 3.4cqw; color: #1a4fa8; line-height: 1.2; }
.demo .ad p { margin: 0; font-size: 2.4cqw; line-height: 1.4; color: #4a443b; }
.demo .org { padding: 1cqw 2.8cqw; display: grid; gap: 1.1cqw; }
.demo .org span { display: block; height: 1.5cqw; border-radius: 1cqw; background: #dcd7cb; }
.demo .org span:nth-child(1) { width: 36%; background: #e6e1d6; }
.demo .org span:nth-child(2) { width: 78%; height: 2.2cqw; background: #cfc9bb; }
.demo .org span:nth-child(3) { width: 92%; }

.demo .s-land { background: var(--paper); color: var(--text-dark); display: flex; flex-direction: column; }
.demo .s-land nav { display: flex; justify-content: space-between; align-items: center; font-size: 2.6cqw; padding-bottom: 3cqw; border-bottom: 1px solid #ddd8cc; }
.demo .s-land nav b { font-family: var(--font-head); font-size: 3cqw; }
.demo .s-land nav span { color: #5d564c; }
.demo .s-land h2 { font-family: var(--font-head); font-weight: 700; font-size: 6.6cqw; line-height: 1.05; letter-spacing: -0.02em; margin: 5cqw 0 2cqw; max-width: 20ch; }
.demo .s-land p { margin: 0 0 4cqw; font-size: 2.8cqw; color: #4a443b; max-width: 34ch; line-height: 1.45; }
.demo .cta { display: flex; gap: 2cqw; }
.demo .cta span {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 2.9cqw;
  padding: 2cqw 3.4cqw; border-radius: 1.4cqw;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.2s;
}
.demo .cta .q { background: var(--text-dark); color: var(--paper); }
.demo .cta .c { background: var(--orange); color: #000; }
.demo .cta span.press { transform: scale(0.94); filter: brightness(0.9); }
.demo .cta span.hot { box-shadow: 0 0 0 0.6cqw rgba(254, 124, 6, 0.3); }
.demo .s-land .bar { margin-top: auto; height: 11cqw; border-radius: 1.6cqw; background: repeating-linear-gradient(110deg, #e2ddd0 0 3cqw, #ebe6da 3cqw 6cqw); }

.demo .s-call { background: radial-gradient(120% 90% at 50% 0%, #2a1807 0%, #0b0907 62%); display: grid; place-items: center; text-align: center; color: var(--paper); }
.demo .callbox { display: grid; justify-items: center; gap: 1.6cqw; }
.demo .callbox small { font-size: 2.5cqw; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.demo .callbox strong { font-family: var(--font-head); font-weight: 700; font-size: 9.4cqw; line-height: 1; letter-spacing: -0.02em; color: var(--paper); }
.demo .avatar { position: relative; width: 12cqw; height: 12cqw; border-radius: 50%; background: linear-gradient(145deg, var(--gold), var(--orange)); display: grid; place-items: center; margin-bottom: 1.4cqw; }
.demo .avatar svg { width: 5.6cqw; height: 5.6cqw; stroke: #000; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo .avatar::before, .demo .avatar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 0.35cqw solid var(--orange); opacity: 0; }
.demo .chip {
  margin-top: 2.4cqw; display: inline-flex; align-items: center; gap: 1.4cqw;
  background: rgba(254, 172, 46, 0.12); border: 1px solid rgba(254, 172, 46, 0.5);
  color: var(--gold); border-radius: 100px; padding: 1.2cqw 2.6cqw;
  font-family: var(--font-head); font-weight: 600; font-size: 3cqw;
}
.demo .stage.on .avatar::before { animation: demo-ring 1.6s ease-out infinite; }
.demo .stage.on .avatar::after { animation: demo-ring 1.6s ease-out 0.8s infinite; }
@keyframes demo-ring { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2); opacity: 0; } }
.demo .callbox > * { opacity: 0; transform: translateY(1.6cqw); transition: opacity 0.45s ease, transform 0.45s ease; }
.demo .stage[data-scene="call"] .callbox > * { opacity: 1; transform: none; }
.demo .stage[data-scene="call"] .callbox > :nth-child(2) { transition-delay: 0.1s; }
.demo .stage[data-scene="call"] .callbox > :nth-child(3) { transition-delay: 0.25s; }
.demo .stage[data-scene="call"] .callbox > :nth-child(4) { transition-delay: 0.4s; }

.demo .cursor {
  position: absolute; left: 0; top: 0; width: 3.4cqw; z-index: 5; opacity: 0;
  transition: transform 1s cubic-bezier(0.45, 0.05, 0.25, 1), opacity 0.3s;
  filter: drop-shadow(0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.35)); pointer-events: none;
}
.demo .cursor svg { display: block; width: 100%; height: auto; }
.demo .caption { position: relative; margin: 14px 4px 0; font-size: 0.85rem; color: var(--muted); }

/* Franja de prueba social */
.proof { background: var(--surface); border-block: 1px solid var(--line); padding-block: 14px; }
.proof .wrap { display: grid; gap: 6px; }
.proof-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.proof-label { font: 600 0.85rem/1.3 var(--font-head); color: var(--muted); }
.proof-list { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.proof-list li { display: flex; align-items: baseline; gap: 8px; font-size: 0.95rem; }
.proof-list b { font: 700 1.35rem/1 var(--font-head); color: var(--gold); font-variant-numeric: tabular-nums; }
.proof-link { margin-left: auto; font: 500 0.92rem/1.3 var(--font-head); color: var(--amber); text-underline-offset: 4px; }
.proof-foot { color: var(--muted); font-size: 0.78rem; max-width: 100ch; }

/* Servicios */
.service-list { border-bottom: 1px solid var(--line); }
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 16px clamp(24px, 5vw, 72px);
  padding-block: 32px;
  border-top: 1px solid var(--line);
}
.service h3 { font: 600 clamp(1.3rem, 2.4vw, 1.7rem) / 1.2 var(--font-head); letter-spacing: -0.01em; }
.service-body { display: grid; gap: 16px; }
.service-body p { color: var(--muted); max-width: 60ch; }
.ticks { display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

/* Trabajos anteriores */
.cases { background: #1f160d; border-block: 1px solid var(--line); }
.case-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.case-top { display: grid; gap: 10px; padding: clamp(20px, 3vw, 32px); max-width: 72ch; }
.case-top h3 { font: 600 clamp(1.3rem, 2.4vw, 1.7rem) / 1.2 var(--font-head); }
.case-top p { color: var(--muted); }
.table-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 620px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font: 500 0.82rem/1.3 var(--font-head); color: var(--muted); letter-spacing: 0.04em; }
td.num, th.num { text-align: right; }
td.roi { color: var(--gold); font: 700 1.15rem/1 var(--font-head); }
td:first-child { font: 600 1rem/1.3 var(--font-head); }
.case-note { padding: 16px 20px; color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--line); }
.case-foot { display: grid; gap: 12px; padding: clamp(18px, 3vw, 28px) clamp(20px, 3vw, 32px); border-top: 1px solid var(--line); background: #0d0703; }
.case-foot h4 { font: 600 0.98rem/1.3 var(--font-head); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.92rem; }
.other-work {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 12px clamp(24px, 5vw, 72px);
  padding-inline: clamp(4px, 1vw, 8px);
}
.other-work h3 { font: 600 1.3rem/1.2 var(--font-head); }
.other-work p { color: var(--muted); max-width: 60ch; }

/* Cómo trabajo */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.step { border-top: 2px solid var(--amber); padding-top: 18px; display: grid; gap: 10px; align-content: start; }
.step-num { font: 700 0.95rem/1 var(--font-head); color: var(--gold); }
.step h3 { font: 600 1.25rem/1.25 var(--font-head); }
.step p { color: var(--muted); font-size: 0.98rem; }

/* Sobre */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.about-art img { width: min(100%, 240px); aspect-ratio: 1; }
.about-copy { display: grid; gap: 18px; max-width: 62ch; }
.about-copy p { color: var(--muted); }
.about-copy p:first-of-type { color: var(--text); font-size: 1.15rem; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  cursor: pointer;
  list-style: none;
  font: 600 1.1rem/1.35 var(--font-head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--amber); font-size: 1.6rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 64ch; }

/* Contacto */
.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-copy { display: grid; gap: 24px; justify-items: start; }
.contact-copy .section-head { margin-bottom: 0; }
.contact-lines { display: grid; gap: 12px; font-variant-numeric: tabular-nums; }
.contact-lines dt { color: var(--muted); font-size: 0.85rem; }
.contact-lines dd { margin: 0; font: 600 1.15rem/1.3 var(--font-head); overflow-wrap: anywhere; }
.contact-lines a { text-decoration-color: var(--amber); text-underline-offset: 4px; }

.form { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.form h3 { font: 600 1.25rem/1.3 var(--font-head); }
.field { display: grid; gap: 6px; min-width: 0; }
.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
label { font: 500 0.92rem/1.3 var(--font-head); }
.opt { color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(245, 245, 240, 0.28);
  border-radius: 6px;
  font: 400 1rem/1.4 var(--font-body);
}
textarea { min-height: 112px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-size: 0.95rem; }
.form-status.ok { color: var(--gold); }
.form-status.err { color: var(--error); }
.form-fine { color: var(--muted); font-size: 0.85rem; }

/* Pie */
.site-footer { border-top: 1px solid var(--line); padding-block: 32px 96px; color: var(--muted); font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-inner .brand span { font-size: 0.9rem; color: var(--text); }

/* WhatsApp flotante */
.wa-float {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: var(--orange);
  color: #000;
  font: 600 0.98rem/1 var(--font-head);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(254, 124, 6, 0.35);
}
.wa-float:hover { background: var(--amber); }

/* Adaptación */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .service, .other-work, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .about-art img { width: 140px; }
}
@media (max-width: 520px) {
  .brand span { font-size: 0.86rem; letter-spacing: 0.12em; }
  .brand img { width: 32px; height: 32px; }
  .nav .btn { padding-inline: 0.9rem; }
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { width: 100%; }
  .proof-link { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .demo .caret, .demo .stage.on .avatar::before, .demo .stage.on .avatar::after { animation: none; }
}
