@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-mono.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --concrete: #bdb6a9;
  --paper: #ebe7de;
  --ink: #2a2926;
  --moss: #535c2e;
  --moss-dark: #3f4622;
  --cc-bg: #000;
  --cc-fg: #f4f2ec;
  --grotesk: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --space: clamp(72px, 11vw, 168px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--grotesk);
  font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.25rem);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 0.95; letter-spacing: -0.035em; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--paper);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Subtítulos (closed captions) ---------- */
.cc-box {
  display: inline-block;
  background: var(--cc-bg);
  color: var(--cc-fg);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.35;
  padding: 0.2em 0.5em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
a.cc-box:hover, button.cc-box:hover { background: var(--moss); }

.skip { position: fixed; left: 8px; top: -60px; z-index: 50; }
.skip:focus { top: 8px; }

.cc {
  font-family: var(--mono);
  font-size: clamp(1rem, 0.8vw + 0.75rem, 1.375rem);
  line-height: 1.6;
  max-width: 40ch;
}
.cc-line {
  display: table;           /* la caja negra se ajusta al ancho del texto */
  background: var(--cc-bg);
  color: var(--cc-fg);
  padding: 0.05em 0.45em;
  margin-bottom: 0.15em;
}
.cc-sound { color: #cfd6b4; }
html.js .cc-line:not(.started) { visibility: hidden; }
.cc .w { display: none; }
.cc .w.on { display: inline; }
html:not(.js) .cc .w { display: inline; }

/* ---------- Cabecera ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
}
.wordmark {
  font-weight: 700; font-size: 1.25rem; letter-spacing: -0.04em;
  text-decoration: none; background: var(--paper); padding: 0.05em 0.35em;
}
.top-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 70%; }
@media (max-width: 720px) {
  .top-nav a:not([href="#contacto"]) { display: none; }
}

/* ---------- Fotos con artefactos ---------- */
.photo { margin: 0; position: relative; overflow: hidden; background: var(--concrete); }
.photo img, .photo canvas { width: 100%; height: 100%; object-fit: cover; }
.photo canvas { position: absolute; inset: 0; opacity: 0; }
.photo.live canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .photo canvas { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 600px; }
.hero-photo { position: absolute; inset: 0; }
.hero-text {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(20px, 5vh, 56px);
  display: grid; gap: clamp(18px, 3vh, 32px);
}
.hero-title {
  font-size: clamp(4.4rem, 15.5vw, 17rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--paper);
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.25);
}

/* ---------- Bloques foto | texto ---------- */
.split { display: grid; }
.split-photo { height: 72svh; }
.split-body { padding: var(--space) var(--gutter); }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split-photo { position: sticky; top: 0; height: 100svh; }
  .split-rev .split-photo { order: 2; }
  .split-body { padding: var(--space) var(--gutter) var(--space) clamp(32px, 5vw, 88px); }
  .split-rev .split-body { padding: var(--space) clamp(32px, 5vw, 88px) var(--space) var(--gutter); }
}
.split-body h2 { font-size: clamp(3rem, 7vw, 6.5rem); margin-bottom: 0.35em; }
.split-body .cc { margin-bottom: clamp(36px, 5vw, 64px); }

.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li {
  border-top: 2px solid var(--ink);
  padding: 16px 0 36px;
}
.service-list h3 { font-size: clamp(2rem, 3.6vw, 3.2rem); margin-bottom: 12px; overflow-wrap: break-word; }
.service-list p { max-width: 44ch; }

/* ---------- Bandas a sangre ---------- */
.band { position: relative; height: 92svh; min-height: 520px; }
.band-short { height: 78svh; }
.band-photo { position: absolute; inset: 0; }
.band-cc { position: absolute; left: var(--gutter); bottom: clamp(24px, 6vh, 64px); right: var(--gutter); }
.band-title {
  position: absolute; left: var(--gutter); bottom: clamp(20px, 5vh, 56px); right: var(--gutter);
  font-size: clamp(3.4rem, 10vw, 10rem); font-weight: 700; letter-spacing: -0.05em; line-height: 0.85;
  color: var(--paper);
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.3);
}

/* ---------- Compromisos ---------- */
.promise-list {
  list-style: none; margin: 0;
  padding: var(--space) var(--gutter);
  display: grid; gap: clamp(40px, 6vw, 96px) clamp(32px, 6vw, 120px);
}
@media (min-width: 760px) { .promise-list { grid-template-columns: 1fr 1fr; } }
.promise-list h3 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); margin-bottom: 18px; }
.promise-list p { max-width: 38ch; font-size: clamp(1.1rem, 0.6vw + 0.95rem, 1.4rem); }

/* ---------- Cómo trabajamos (secuencia real) ---------- */
.how { background: var(--concrete); }
.steps {
  list-style: none; margin: 0; counter-reset: step;
  padding: var(--space) var(--gutter);
  display: grid; column-gap: 32px;
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding: 14px 0 40px;
}
.steps li::before {
  content: counter(step);
  display: block;
  font-size: clamp(3.5rem, 6vw, 5.5rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em;
  color: var(--moss);
  margin-bottom: 18px;
}
.steps h3 { font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.steps p { max-width: 32ch; }

/* ---------- Contacto ---------- */
@media (min-width: 960px) { .contact-body { align-self: center; } }
.contact h2 { font-size: clamp(3.4rem, 8vw, 7.5rem); margin-bottom: 32px; }
.wa {
  display: inline-block;
  font-size: clamp(1.15rem, 1.4vw, 1.4rem); font-weight: 600;
  text-decoration: none;
  padding: 18px 28px 20px;
  color: var(--cc-fg);
  background: var(--moss);
}
.wa:hover { background: var(--moss-dark); }
.phones { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.phones a { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.02em; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.phones a:hover { color: var(--moss); }

/* ---------- Pie ---------- */
.foot {
  background: var(--ink); color: var(--paper);
  padding: 48px var(--gutter) 40px;
  display: grid; gap: 18px; font-size: 0.95rem;
}
.foot-mark { font-weight: 700; font-size: 1.6rem; letter-spacing: -0.04em; }
.foot p { max-width: 62ch; }
.credits summary { cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.credits ul { margin: 12px 0; padding-left: 1.1em; }
.credits li { margin-bottom: 4px; }
.foot :focus-visible { outline-color: var(--paper); box-shadow: none; }
