@font-face {
  font-family: "Instrument Sans";
  src: url(fonts/instrument-latin-wght-normal.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0c0c0c;
  --veil: rgba(12, 12, 12, 0.84);
  --band: rgba(22, 21, 19, 0.88);
  --surface: rgba(12, 12, 12, 0.9);
  --surface-2: rgba(30, 28, 24, 0.92);
  --line: rgba(240, 239, 233, 0.12);
  --line-strong: rgba(240, 239, 233, 0.22);
  --gold: #e3ad2b;
  --gold-soft: rgba(227, 173, 43, 0.12);
  --gold-ink: #2b2208;
  --white: #f0efe9;
  --muted: #b9b6ac;
  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --wrap: 1120px;
  color-scheme: dark;
  accent-color: var(--gold);
  scrollbar-color: #3a3730 var(--black);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; background: var(--black); }

body {
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  caret-color: var(--gold);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  isolation: isolate;
}

/* Fondo fijo con el logo de DERATEK, visible en toda la página al hacer scroll.
   Se usa un pseudo-elemento fijo (no background-attachment: fixed, que iOS ignora). */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background: var(--black) url(img/fondo-deratek.jpg) center / min(86vmin, 820px) no-repeat;
}
body::after {
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(12, 12, 12, 0.72) 0%, rgba(12, 12, 12, 0.9) 60%, var(--black) 100%);
}

::selection { background: var(--gold); color: var(--black); }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--black); padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12, 12, 12, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; font-size: 16px; }
.nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav ul a {
  font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px; transition: color 0.2s ease;
}
.nav .cta-mini { background: var(--gold); color: var(--black); padding: 0 18px; font-weight: 700; }

/* ── HERO ── */
.hero { padding: 120px 0 104px; }
h1 {
  font-size: clamp(42px, 7.2vw, 88px); font-weight: 700; line-height: 0.98;
  letter-spacing: -0.03em; text-transform: uppercase; max-width: 14ch; text-wrap: balance;
}
h1 em, h2 em { font-style: normal; color: var(--gold); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 58ch; margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; font: 700 15px/1 var(--font); letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.16s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold); color: var(--black); }
.btn-line { border-color: var(--line-strong); color: var(--white); background: rgba(12, 12, 12, 0.5); }
.btn-dark { background: var(--black); color: var(--gold); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.facts {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 80px;
  border-top: 1px solid var(--line-strong);
}
.facts li { padding: 22px 24px 0 0; }
.facts strong { display: block; font-size: 18px; }
.facts span { color: var(--muted); font-size: 15px; }

/* Único momento animado: la entrada de la portada. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.in { animation: rise 0.6s var(--ease-out) both; }
.in-2 { animation-delay: 0.06s; }
.in-3 { animation-delay: 0.12s; }
.in-4 { animation-delay: 0.18s; }

/* ── SECCIONES ── */
section { padding: 112px 0; }
.band { background: var(--band); border-block: 1px solid var(--line); }
h2 {
  font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 1.02;
  letter-spacing: -0.02em; text-transform: uppercase; max-width: 18ch; text-wrap: balance;
}
.sub { color: var(--muted); max-width: 56ch; margin: 18px 0 56px; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }

/* Servicios: filas, no tarjetas */
.services { border-top: 1px solid var(--line-strong); }
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 56px;
  padding: 40px 0; border-bottom: 1px solid var(--line-strong);
}
.service h3 { text-transform: uppercase; font-size: clamp(22px, 2.6vw, 28px); }
.service-body p { color: var(--muted); }
.service-body ul { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.service-body li { padding-left: 20px; position: relative; color: var(--white); font-size: 16px; }
.service-body li::before { content: ""; position: absolute; left: 0; top: 0.66em; width: 8px; height: 2px; background: var(--gold); }
.badge {
  display: inline-block; vertical-align: middle; margin-left: 8px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--black); background: var(--gold); padding: 3px 8px;
}

/* Proceso: secuencia numerada */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: none; }
.steps li { border-top: 2px solid var(--gold); padding-top: 22px; }
.step-n { display: block; font-size: 15px; font-weight: 700; color: var(--gold); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); margin-top: 10px; font-size: 16px; }

/* ── FAQ ── */
.faq { margin-top: 48px; max-width: 820px; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 4px; font-weight: 600; font-size: 18px;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 26px; line-height: 1; transition: transform 0.2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 4px 24px; color: var(--muted); max-width: 68ch; }

/* ── CONTACTO ── */
.contact { background: var(--gold); color: var(--black); }
.contact h2 em { color: var(--black); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.contact .sub { color: var(--gold-ink); margin-bottom: 32px; }
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.contact-alt { list-style: none; display: grid; gap: 14px; }
.contact-alt li { display: grid; gap: 2px; font-size: 17px; font-weight: 600; }
.contact-alt span { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-ink); }
.contact-alt a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-thickness: 1px; word-break: break-word; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; }
.field small { font-weight: 500; color: var(--gold-ink); }
.contact input[type="text"], .contact input[type="email"], .contact input[type="tel"], .contact textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--black); caret-color: var(--black);
  background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(12, 12, 12, 0.35); padding: 13px 14px; border-radius: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.contact textarea { resize: vertical; min-height: 128px; }
.contact input:focus, .contact textarea:focus { outline: none; border-color: var(--black); background: rgba(255, 255, 255, 0.75); }
.contact input:focus-visible, .contact textarea:focus-visible { outline: 2px solid var(--black); outline-offset: 1px; }
.contact [aria-invalid="true"] { border-color: #8a1c0c; }
.contact ::selection { background: var(--black); color: var(--gold); }
.contact :focus-visible { outline-color: var(--black); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--black); }
.layer { font-size: 13px; color: var(--gold-ink); line-height: 1.5; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-status { font-size: 15px; font-weight: 600; }
.form-status.is-error { color: #6b1206; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--black); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; align-items: center; }
footer p, footer a { font-size: 14px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* ── PÁGINAS LEGALES ── */
.legal { padding: 72px 0 96px; }
.legal .wrap { max-width: 780px; background: var(--veil); padding: 40px clamp(20px, 4vw, 48px); border: 1px solid var(--line); }
.legal h1 { font-size: clamp(32px, 5vw, 48px); max-width: none; margin-bottom: 12px; }
.legal h2 { font-size: 22px; text-transform: none; letter-spacing: 0; margin: 40px 0 12px; max-width: none; }
.legal p, .legal li { color: #d6d4cc; margin-bottom: 12px; max-width: 70ch; }
.legal ul { padding-left: 22px; }
.legal .meta { color: var(--muted); font-size: 14px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.legal th, .legal td { text-align: left; border: 1px solid var(--line-strong); padding: 10px 12px; vertical-align: top; }
.legal th { color: var(--gold); font-weight: 600; width: 34%; }
.legal a { color: var(--gold); }

/* Hover solo con ratón (en móvil el toque deja el hover pegado) */
@media (hover: hover) and (pointer: fine) {
  .nav ul a:not(.cta-mini):hover { color: var(--gold); }
  .nav .cta-mini:hover, .btn-gold:hover { background: var(--white); color: var(--black); }
  .btn-line:hover { border-color: var(--gold); color: var(--gold); }
  .btn-dark:hover { background: #262626; }
  .faq summary:hover { color: var(--gold); }
  footer a:hover { color: var(--gold); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
  .in { animation-duration: 0.3s; animation-delay: 0s; }
  .btn:active { transform: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; gap: 14px; }
  .nav ul li:not(:last-child) { display: none; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
  .facts, .steps, .contact-form { grid-template-columns: 1fr; }
  .facts { margin-top: 56px; }
  .brand span { font-size: 14px; }
  .actions .btn { flex: 1 1 100%; }
  .submit-row .btn { width: 100%; }
}

/* ── PÁGINAS INTERIORES (SEO) ── */
.wrap.narrow { max-width: 820px; }
.hero-sub { padding: 72px 0 56px; }
.hero-sub h1 { font-size: clamp(34px, 5.4vw, 64px); max-width: 18ch; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.prose { padding: 72px 0; }
.prose h2 { font-size: clamp(24px, 3vw, 32px); text-transform: none; letter-spacing: -0.01em; margin: 48px 0 16px; max-width: none; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #d6d4cc; max-width: 68ch; }
.prose p + p { margin-top: 12px; }
.prose a { color: var(--gold); }
.check, .plain { display: grid; gap: 10px; }
.check { list-style: none; }
.check li { padding-left: 22px; position: relative; }
.check li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 9px; height: 2px; background: var(--gold); }
.plain { padding-left: 22px; }
.band .faq { margin-top: 28px; }
.cta-end { padding: 72px 0; }
.cta-end .sub { margin-bottom: 24px; }
.service h3 a { text-decoration: none; }
.more { display: inline-block; margin-top: 16px; color: var(--gold); font-weight: 600; }
.nav ul a[aria-current="page"] { color: var(--white); }
@media (max-width: 960px) {
  .nav ul li:not(:last-child) { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .prose a:hover, .more:hover { color: var(--white); }
}

/* ── CUESTIONARIO → WHATSAPP ── */
.brief fieldset { border: 0; display: grid; gap: 8px; margin-bottom: 28px; }
.brief legend { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.opt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease; }
.opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.opt input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.opt b { display: block; font-size: 16px; }
.opt small { color: var(--muted); font-size: 14px; }
.brief-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.brief .field label { font-size: 14px; font-weight: 700; }
.brief .field small { font-weight: 500; color: var(--muted); }
.brief input[type="text"], .brief select, .brief textarea { width: 100%; font: 400 16px/1.4 var(--font); color: var(--white); background: var(--surface); border: 1px solid var(--line-strong); padding: 13px 14px; border-radius: 0; }
.brief textarea { resize: vertical; min-height: 96px; }
.brief [aria-invalid="true"] { border-color: #e0654f; }
.brief .form-status.is-error { color: #ff9c8a; }
@media (hover: hover) and (pointer: fine) { .opt:hover { border-color: rgba(227, 173, 43, 0.6); } }
@media (max-width: 680px) { .brief-fields { grid-template-columns: 1fr; } }
