/* HAT Agencia — sistema visual "editorial oscuro" */
:root {
  --bg: #0b0d0c;
  --bg-2: #121513;
  --ink: #f1efe8;
  --dim: #8d938e;
  --line: rgba(241, 239, 232, .14);
  --line-strong: rgba(241, 239, 232, .32);
  --lime: #d6e12b;
  --teal: #45c6b4;
  --orange: #f2a30f;
  --pad: clamp(16px, 4vw, 56px);
  --display: "Archivo", "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--lime); color: var(--bg); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.dim { color: var(--dim); }
.lime { color: var(--lime); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--bg); padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 28px;
  padding: 14px var(--pad);
  background: rgba(11, 13, 12, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .brand img { height: 34px; width: auto; }
.top nav { display: flex; gap: 26px; justify-content: center; }
.top nav a { text-decoration: none; font-size: 14px; color: var(--dim); display: inline-flex; gap: 6px; }
.top nav a b { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--lime); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.top nav a.m-only { display: none; }
.top.open nav a.m-only { display: flex; color: var(--lime); }
.top .lang { font-family: var(--mono); font-size: 12px; text-decoration: none; color: var(--dim); border: 1px solid var(--line-strong); padding: 6px 10px; }
.top .lang:hover { color: var(--ink); border-color: var(--ink); }
.cta-sm {
  font-size: 14px; font-weight: 600; text-decoration: none; background: var(--lime); color: var(--bg);
  padding: 10px 16px; display: inline-flex; align-items: center; gap: 8px;
}
.cta-sm:hover { background: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink); font: 12px var(--mono); padding: 8px 10px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 120px) var(--pad) 0; position: relative; }
.hero .meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 5vw, 56px); border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.display {
  font-family: var(--display); font-stretch: 62%; font-weight: 800; text-transform: uppercase;
  line-height: .86; letter-spacing: -.01em; margin: 0;
}
.kicker { margin: 0 0 22px; }
.home-h1 { font-size: clamp(56px, 13vw, 220px); }
.page-h1 { font-size: clamp(44px, 7.4vw, 124px); max-width: 16ch; }
.hero h1 .row { display: block; }
.hero h1 .row.line { display: flex; align-items: center; gap: .18em; }
.hero h1 .rule { flex: 1; height: .06em; background: var(--lime); min-width: .6em; transform: translateY(-.05em); }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.hero .sub {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line);
}
.hero .sub p { grid-column: 1 / span 5; margin: 0; font-size: clamp(17px, 1.5vw, 21px); color: var(--ink); }
.hero .sub .actions { grid-column: 8 / span 5; display: flex; gap: 12px; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer;
  font: 600 16px var(--display); padding: 16px 22px; border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); }
.btn .arr { font-family: var(--mono); }

/* ---------- Ticker ---------- */
.ticker { border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; padding: 14px 0; }
.ticker .track { display: inline-flex; gap: 48px; animation: tick 38s linear infinite; padding-left: 48px; }
.ticker span { font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--dim); }
.ticker span i { font-style: normal; color: var(--lime); margin-right: 10px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Numbers ---------- */
.numbers { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--line); }
.numbers div { padding: clamp(24px, 4vw, 48px) var(--pad); border-right: 1px solid var(--line); }
.numbers div:last-child { border-right: 0; }
.numbers b { display: block; font-stretch: 62%; font-weight: 800; font-size: clamp(52px, 7vw, 112px); line-height: .9; font-variant-numeric: tabular-nums; }
.numbers b sup { font-size: .4em; color: var(--lime); vertical-align: top; margin-left: 4px; }
.numbers span { display: block; margin-top: 10px; }

/* ---------- Section frame ---------- */
.sec { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: clamp(64px, 10vw, 140px) var(--pad); border-bottom: 1px solid var(--line); }
.sec > .label { grid-column: 1 / span 3; position: sticky; top: 96px; align-self: start; }
.sec > .label .n { font-stretch: 62%; font-weight: 800; font-size: 64px; line-height: 1; color: var(--lime); display: block; margin-bottom: 8px; }
.sec > .body { grid-column: 4 / span 9; }
/* Ritmo: unas secciones ocupan todo el ancho, otras se corren a la derecha */
.sec.bleed > .label { grid-column: 1 / -1; position: static; display: flex; gap: 14px; align-items: baseline; }
.sec.bleed > .label .n { margin: 0; }
.sec.bleed > .body { grid-column: 1 / -1; }
.sec.offset > .body { grid-column: 6 / -1; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 40px 0; }
.slots:empty { display: none; }

/* Ficha técnica */
.spec { margin: 0; border-top: 1px solid var(--line-strong); }
.spec-h { padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
.spec > div:not(.spec-h) { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec dt { padding-top: 4px; }
.spec dd { margin: 0; font-size: 18px; }
.sec h2 { font-size: clamp(40px, 6.5vw, 104px); margin-bottom: 28px; }
.sec .lead { font-size: clamp(18px, 1.6vw, 23px); max-width: 760px; margin: 0 0 40px; }
.sec .lead em { font-style: normal; color: var(--lime); }
.prose p { max-width: 720px; color: #d5d3cc; }
.prose h3 { font-size: 22px; margin: 40px 0 10px; }

/* ---------- Service index ---------- */
.index { border-top: 1px solid var(--line-strong); }
.index a {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 24px; align-items: baseline; text-decoration: none;
  padding: 26px 0; border-bottom: 1px solid var(--line-strong); position: relative; transition: padding .25s, color .25s;
}
.index a .t { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 4.6vw, 72px); line-height: .95; }
.index a .d { display: block; font-size: 15px; color: var(--dim); margin-top: 8px; max-width: 560px; font-stretch: 100%; font-weight: 400; text-transform: none; }
.index a .go { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.index a:hover { padding-left: 18px; color: var(--lime); }
.index a:hover .go { color: var(--lime); }
.index a.minor .t { font-size: clamp(22px, 2.6vw, 38px); }

/* ---------- Drawing panel ---------- */
.drawing { border: 1px solid var(--line-strong); position: relative; background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px; }
.drawing figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-strong); background: var(--bg); }
.drawing svg { width: 100%; height: auto; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line-strong); }
.steps.four { grid-template-columns: repeat(4, 1fr); }
/* Línea de tiempo: el molde (semanas 3–10) ocupa proporcionalmente más ancho */
.steps.timed { grid-template-columns: 1fr 1fr 1fr 3.2fr 1fr 1fr; }
.steps.timed li:nth-child(4) { background: repeating-linear-gradient(90deg, rgba(214,225,43,.07) 0 1px, transparent 1px 28px); padding-left: 14px; }
.sec > * { min-width: 0; }
.steps li { list-style: none; padding: 22px 18px 26px 0; border-right: 1px solid var(--line); margin-right: 18px; }
.steps li:last-child { border-right: 0; }
.steps { padding: 0; margin: 0; }
.steps .wk { display: block; color: var(--lime); margin-bottom: 26px; }
.steps h3 { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1; margin: 0 0 10px; }
.steps p { margin: 0; font-size: 14.5px; color: var(--dim); }

/* ---------- Two col / lists ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.list li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.list li::before { content: "→"; font-family: var(--mono); color: var(--lime); }
.list li b { display: block; font-weight: 600; }
.list li span { color: var(--dim); font-size: 15px; }

/* ---------- Statement ---------- */
.statement { padding: clamp(80px, 12vw, 180px) var(--pad); border-bottom: 1px solid var(--line); }
.statement p { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: clamp(40px, 7.5vw, 128px); line-height: .9; margin: 0; max-width: 14ch; }
.statement p .dim { color: #3b403c; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq details:first-child { border-top: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 22px 0; font-size: 20px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--lime); font-size: 22px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 24px; max-width: 760px; color: #d5d3cc; }

/* ---------- Photo slot (replace with real photography) ---------- */
.slot { aspect-ratio: 4 / 3; border: 1px dashed var(--line-strong); display: grid; place-items: center; text-align: center; padding: 24px; }

/* ---------- Contact ---------- */
.contact-big { padding: clamp(80px, 12vw, 160px) var(--pad) clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.contact-big h2 { font-size: clamp(64px, 16vw, 260px); }
.contact-big .ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; border-top: 1px solid var(--line-strong); }
.contact-big .ways a, .contact-big .ways div { padding: 22px 0; text-decoration: none; display: block; }
.contact-big .ways strong { display: block; font-size: clamp(18px, 1.8vw, 24px); font-weight: 600; margin-top: 8px; word-break: break-word; }
.contact-big .ways a:hover strong { color: var(--lime); }

form.f { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
form.f .full { grid-column: 1 / -1; }
form.f label { display: block; padding: 18px 0 0; border-bottom: 1px solid var(--line-strong); }
form.f label .mono { color: var(--dim); }
form.f input, form.f select, form.f textarea {
  display: block; width: 100%; background: transparent; border: 0; color: var(--ink); font: 400 19px var(--display);
  padding: 8px 0 14px; outline: none; border-radius: 0; -webkit-appearance: none; appearance: none;
}
form.f select option { background: var(--bg); }
form.f textarea { min-height: 120px; resize: vertical; }
form.f label:focus-within { border-bottom-color: var(--lime); }
form.f .check { border: 0; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--dim); padding-top: 24px; }
form.f .check input { width: 18px; height: 18px; flex: none; accent-color: var(--lime); -webkit-appearance: auto; appearance: auto; margin-top: 2px; padding: 0; }
form.f .send { margin-top: 32px; }
.hp { display: none; }

/* ---------- Footer ---------- */
.foot { padding: 48px var(--pad) 32px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.foot .logo { grid-column: 1 / span 4; }
.foot .logo img { height: 48px; width: auto; margin-bottom: 18px; }
.foot .col { grid-column: span 2; }
.foot .col a { display: block; text-decoration: none; color: var(--dim); font-size: 14px; padding: 4px 0; }
.foot .col a:hover { color: var(--ink); }
.foot .legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin-left: auto;
  background: var(--ink); color: var(--bg); padding: 20px; display: none; gap: 14px; font-size: 14px;
}
.consent.show { display: grid; }
.consent p { margin: 0; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.consent button { font: 600 14px var(--display); padding: 10px 16px; border: 1px solid var(--bg); background: transparent; color: var(--bg); cursor: pointer; }
.consent button.ok { background: var(--bg); color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ticker .track { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .top { grid-template-columns: auto 1fr auto auto; }
  .top nav { display: none; }
  .menu-btn { display: inline-block; }
  .top .lang { justify-self: end; }
  .top.open nav {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 20px;
  }
  .top.open nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--ink); }
  .steps, .steps.timed { grid-template-columns: repeat(3, 1fr); }
  .steps li:nth-child(3) { border-right: 0; }
  .sec.offset > .body { grid-column: 4 / span 9; }
}
@media (max-width: 820px) {
  .top { gap: 12px; }
  .top .cta-sm { display: none; }
  .hero .sub, .sec, .foot { grid-template-columns: 1fr; }
  .hero .sub p, .hero .sub .actions, .sec > .label, .sec > .body, .foot .logo, .foot .col { grid-column: auto; }
  .hero .sub .actions { justify-content: flex-start; }
  .sec > .label { position: static; display: flex; gap: 14px; align-items: baseline; }
  .sec > .label .n { font-size: 40px; margin: 0; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers div:nth-child(2) { border-right: 0; }
  .numbers div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cols { grid-template-columns: 1fr; }
  .steps, .steps.four, .steps.timed { grid-template-columns: 1fr; }
  .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 84px 1fr; padding: 20px 0; }
  .steps.timed li:nth-child(4) { padding-left: 0; }
  .steps .wk { margin: 6px 0 0; grid-row: span 2; }
  .sec.offset > .body { grid-column: auto; }
  .spec > div:not(.spec-h) { grid-template-columns: 1fr; gap: 4px; }
  .numbers { grid-auto-flow: row; grid-template-columns: 1fr; }
  .numbers div { border-right: 0; border-bottom: 1px solid var(--line); }
  .numbers div:last-child { border-bottom: 0; }
  .index a { grid-template-columns: 40px 1fr; }
  .index a .go { display: none; }
  .contact-big .ways { grid-template-columns: 1fr; gap: 0; }
  .contact-big .ways > * { border-bottom: 1px solid var(--line); }
  form.f { grid-template-columns: 1fr; }
  .hero h1 .outline { -webkit-text-stroke-width: 1px; }
}
