/* Constructora SARC · página preliminar
   Dirección: "The dark room" (taste-skill, seed 991484712). Tokens primero; todo lo demás los usa. */
:root {
  --bg: #0c0a08;
  --surface: #181512;
  --ink: #f2f1ee;
  --muted: #b3ada5;
  --accent: #c4703c; /* óxido de la marca SARC (#9f5027), aclarado para leerse sobre negro */
  --accent-ink: #0c0a08;
  --paper: #e6e5e2;
  --paper-ink: #0c0a08;
  --paper-muted: #4a4540;

  --font-display: "Panchang", "Arial Black", sans-serif;
  --font-text: "Switzer", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);

  --margin: clamp(20px, 3vw, 40px);
  --gap-section: clamp(120px, 14vw, 200px);
  --rail-h: 72px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Botones: una forma (esquinas rectas), un tamaño */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: 500 var(--step-small)/1 var(--font-text);
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--light { background: var(--paper); color: var(--paper-ink); }
.btn--light:hover { background: var(--accent); }
.btn--gold { background: var(--accent); color: var(--accent-ink); }
.btn--gold:hover { background: var(--paper); }
.btn--dark { background: var(--bg); color: var(--ink); }
.btn--dark:hover { background: var(--accent); color: var(--accent-ink); }
.btn--wide { width: 100%; }

/* ---------- Hero: dos fotos a sangre, riel al centro ---------- */
.hero { position: relative; }
.hero__pics { position: absolute; inset: 0 0 auto 0; height: 200svh; z-index: 0; }
.hero__frame { position: relative; height: 100svh; overflow: hidden; }
.hero__img, .hero__frame--second img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1) brightness(.78) contrast(1.05);
}
.hero__img { opacity: 0; transition: opacity 1.6s ease; transform: scale(1.06); }
.hero__img.is-on { opacity: 1; animation: drift 14s linear forwards; }
.hero__frame--second img { object-position: center 40%; filter: grayscale(1) brightness(.55) contrast(1.05); }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }

.hero__spacer { height: calc(50svh - var(--rail-h) / 2); }

.rail {
  position: sticky; top: 0; z-index: 10;
  height: var(--rail-h);
  background: rgba(12, 10, 8, .35);
  transition: background-color .4s ease;
}
.rail.is-docked { background: var(--bg); }
.rail__inner {
  height: 100%; padding: 0 var(--margin);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: center;
}
.rail__title { grid-column: 1 / 5; font: 500 clamp(1.5rem, 1rem + 1.2vw, 2.25rem)/1 var(--font-text); letter-spacing: -0.02em; white-space: nowrap; }
.rail__title a { text-decoration: none; display: block; }
.rail__logo { height: 44px; width: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rail__line { grid-column: 6 / 9; font-size: var(--step-body); max-width: 44ch; color: var(--ink); }
.rail__nav { grid-column: 9 / 13; justify-self: end; display: flex; align-items: center; gap: 24px; }
.rail__nav a:not(.btn) { font-size: var(--step-small); text-decoration: none; position: relative; }
.rail__nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.rail__nav a:not(.btn):hover::after, .rail__nav a:not(.btn):focus-visible::after { transform: scaleX(1); }

.hero__phone { display: none; }

/* Segunda pantalla: la frase sobre la segunda foto */
.statement {
  position: relative; z-index: 1;
  min-height: calc(150svh - var(--rail-h) / 2);
  padding: 0 var(--margin) 14svh;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-content: end; row-gap: 32px;
}
.statement h2 {
  grid-column: 1 / 13;
  font: 700 clamp(2.5rem, 1rem + 7.4vw, 8.5rem)/1 var(--font-display);
  letter-spacing: -0.02em; text-transform: uppercase;
}
.statement__text { grid-column: 1 / 7; font-size: var(--step-lead); line-height: 1.45; max-width: 34ch; }
.statement .btn { grid-column: 9 / 13; justify-self: end; align-self: end; }

/* ---------- Sectores: foto fija, lista activa ---------- */
.sectors {
  padding: var(--gap-section) var(--margin);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: start;
}
.sectors__pic {
  grid-column: 1 / 6; position: sticky; top: calc(var(--rail-h) + 6vh);
  aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface);
}
.sectors__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(.85) contrast(1.05);
  opacity: 0; transform: scale(1.04); transition: opacity .5s ease, transform 1.2s var(--ease);
}
.sectors__img.is-on { opacity: 1; transform: scale(1); }
.sectors__list { grid-column: 7 / 13; padding-top: 4vh; }
.sectors__list h2 {
  font: 700 clamp(1.75rem, 0.9rem + 2.4vw, 3.25rem)/1 var(--font-display); letter-spacing: -0.02em; text-transform: uppercase;
  margin-bottom: 56px;
}
.rows { list-style: none; margin: 0; padding: 0; }
.row { padding: 8px 0; }
.row + .row { margin-top: 8px; background: none; }
.row__head {
  width: 100%; min-height: 72px; padding: 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  background: none; border: 0; color: var(--muted); cursor: pointer; text-align: left; font-family: inherit;
  transition: color .3s ease;
}
.row__name { font: 500 clamp(1.5rem, 1rem + 1.6vw, 2.5rem)/1.1 var(--font-text); letter-spacing: -0.02em; transition: transform .35s var(--ease); }
.row__meta { font-size: var(--step-small); color: var(--muted); white-space: nowrap; }
.row__head:hover, .row.is-active .row__head { color: var(--ink); }
.row__head:hover .row__name { transform: translateX(8px); }
.row.is-active .row__name { color: var(--ink); }
.row.is-active .row__meta { color: var(--accent); }
.row__body {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease);
}
.row__body > * { overflow: hidden; }
.row.is-active .row__body { grid-template-rows: 1fr; }
.row__body p { max-width: 40ch; color: var(--ink); padding: 4px 0 20px; }
.row:not(.is-active) .row__body { visibility: hidden; }
.row__body { row-gap: 0; }
.row__link {
  display: inline-block; margin-top: 8px; font-weight: 500;
  color: var(--accent); text-decoration: none; transition: transform .25s var(--ease);
}
.row__link::after { content: " →"; }
.row__link:hover { transform: translateX(4px); }
.row__inner { overflow: hidden; }

/* ---------- Contacto: colores invertidos, el correo como titular ---------- */
.contact {
  min-height: 100svh; background: var(--paper); color: var(--paper-ink);
  padding: calc(var(--rail-h) + 48px) var(--margin) 40px;
  display: grid; grid-template-rows: auto 1fr auto; row-gap: 48px;
}
.contact__top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: end; row-gap: 20px; }
.contact__top h2 {
  grid-column: 1 / 13;
  font: 700 clamp(1.75rem, 0.9rem + 2.4vw, 3.25rem)/1 var(--font-display); letter-spacing: -0.02em; text-transform: uppercase;
}
.contact__top p { grid-column: 1 / 7; font-size: var(--step-lead); line-height: 1.4; max-width: 30ch; }
.contact__top .btn { grid-column: 9 / 13; justify-self: end; }
.contact__mail {
  align-self: end; display: block;
  font: 500 clamp(2rem, 0.5rem + 5.6vw, 6.75rem)/1 var(--font-text); letter-spacing: -0.04em;
  text-decoration: none; overflow-wrap: anywhere; transition: color .3s ease;
}
.contact__mail:hover { color: #9f5027; }
.br-phone { display: none; }
.contact__foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; font-size: var(--step-body); color: var(--paper-ink); }
.contact__foot a { text-decoration: none; }
.contact__foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact__social { display: flex; gap: 24px; }

/* ---------- Pie: el nombre sobre la última foto ---------- */
.footer { position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.footer__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: grayscale(1) brightness(.5) contrast(1.05); }
.footer__top, .footer__bottom { position: relative; padding: 32px var(--margin); }
.footer__top { display: flex; justify-content: space-between; gap: 24px; font-size: var(--step-body); }
.footer__top nav { display: flex; flex-direction: column; gap: 6px; }
.footer__top a { text-decoration: none; }
.footer__top a:hover { color: var(--accent); }
.footer__top p { text-align: right; }
.footer__mark {
  font: 700 18.5vw/.82 var(--font-display); letter-spacing: -0.03em;
  white-space: nowrap;
}
.footer__tag { font-size: var(--step-lead); margin-top: 12px; }
.footer__legal { font-size: var(--step-small); color: var(--ink); margin-top: 20px; max-width: 90ch; }
.footer__legal a { text-underline-offset: 3px; }

/* ---------- Entradas ---------- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Teléfono ---------- */
@media (max-width: 1000px) {
  :root { --rail-h: 64px; }
  .rail__inner { display: flex; justify-content: space-between; gap: 12px; }
  .rail__logo { height: 38px; }
  .rail__line, .rail__nav a:not(.btn) { display: none; }
  .rail__nav { gap: 0; }
  .rail__nav .btn { min-height: 40px; padding: 0 14px; }

  .hero__phone {
    display: block; position: absolute; z-index: 2; left: 0; right: 0; top: calc(100svh - 230px);
    padding: 24px 20px; background: rgba(12, 10, 8, .55);
  }
  .hero__phone p { font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.375rem); margin-bottom: 16px; max-width: 40ch; }

  .statement { grid-template-columns: 1fr; padding-bottom: 10svh; }
  .statement h2, .statement__text, .statement .btn { grid-column: 1; }
  .statement .btn { justify-self: stretch; }

  .sectors { grid-template-columns: 1fr; padding-top: 0; }
  .sectors__pic { grid-column: 1; position: relative; top: auto; aspect-ratio: 4 / 3; }
  .sectors__list { grid-column: 1; padding-top: 40px; }
  .sectors__list h2 { margin-bottom: 24px; }
  .row__head { min-height: 60px; flex-wrap: wrap; row-gap: 4px; }

  .contact__top { grid-template-columns: 1fr; }
  .contact__top h2, .contact__top p, .contact__top .btn { grid-column: 1; }
  .contact__top .btn { justify-self: stretch; }
  .contact__mail { font-size: 8.2vw; }
  .br-phone { display: inline; }
  .contact__foot { flex-direction: column; align-items: start; }

  .footer { min-height: 88svh; }
  .footer__top { flex-direction: column; }
  .footer__top p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__img { transform: none; }
}
