/* Paleta neutra provisoria: reemplazar por la paleta oficial de Flavored cuando llegue */
:root {
  --bg: #EEEBE5;        /* hormigón claro */
  --bg-2: #E4E0D8;
  --ink: #16181B;       /* casi negro */
  --ink-2: #3A3C40;
  --muted: #6B6A66;
  --line: #CFCAC1;
  --accent: #B8893B;    /* latón / acento de obra, sobrio */
  --dark: #16181B;
  --dark-ink: #EEEBE5;
  --dark-muted: #9C9A94;
  --radius: 4px;
  --font-head: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.035em; margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  background: rgba(238,235,229,0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__mark { height: 34px; width: auto; display: block; }
.logo__word { height: 15px; width: auto; display: block; }
.topbar__cta {
  font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--ink);
}

/* ---------- Escena con scroll ---------- */
.build { height: 420vh; position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(to bottom, transparent 0 calc(100% - 1px), var(--line) 0) 0 0 / 100% 80px,
    var(--bg);
}
.hero {
  position: absolute; z-index: 2;
  top: 120px; left: 32px; max-width: 520px;
}
.hero__title {
  font-size: clamp(40px, 6.2vw, 84px);
  line-height: 0.98;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero__title .light { font-weight: 300; color: var(--ink-2); }
.hero__lead { font-size: 18px; color: var(--ink-2); max-width: 420px; margin: 0 0 28px; }

.btn {
  display: inline-block;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: var(--radius);
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--dark { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }
.btn--dark:hover { background: var(--accent); border-color: var(--accent); color: var(--dark); }

.status {
  position: absolute; z-index: 2;
  top: 128px; right: 32px; width: 220px;
  font-family: var(--font-head);
}
.status__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.status__pct { font-variant-numeric: tabular-nums; }
.status__bar { height: 2px; background: var(--line); margin: 10px 0 8px; position: relative; }
.status__bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.status__level { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }

.scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 78%; }

.scroll-hint {
  position: absolute; z-index: 2; left: 32px; bottom: 28px;
  margin: 0; font-family: var(--font-head); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
  transition: opacity .4s;
}
.scroll-hint::after {
  content: ""; display: block; width: 1px; height: 28px; margin: 10px 0 0 4px; background: var(--muted);
  animation: hint 1.8s ease-in-out infinite; transform-origin: top;
}
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* SVG */
.ground { stroke: var(--ink); stroke-width: 2; }
.crane line, .crane path { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: square; }
.crane .thin { stroke-width: 1.2; }
.crane .tie { stroke-width: 1.2; stroke: var(--ink-2); }
.crane .solid { fill: var(--ink); stroke: none; }
.crane .cab-window { fill: var(--accent); stroke: none; }
.cable { stroke: var(--ink); stroke-width: 1.4; }
.hook__block { fill: var(--ink); }
.hook__hook { stroke: var(--ink); stroke-width: 2.2; fill: none; }
.sling { stroke: var(--ink-2); stroke-width: 1.2; }
.load { fill: var(--accent); }
.trolley rect { fill: var(--ink); }

.skyline rect { fill: var(--bg-2); }

.floor { opacity: 0; transform: translateY(-14px); transition: opacity .35s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.floor.built { opacity: 1; transform: none; }
.floor .slab { fill: var(--ink); }
.floor .wall { fill: #DAD5CC; stroke: var(--ink); stroke-width: 1.5; }
.floor .win { fill: var(--bg); stroke: var(--ink-2); stroke-width: 1; transition: fill .6s; }
.floor .win.lit { fill: var(--accent); }

/* ---------- Divisiones ---------- */
.divisions { padding: 120px 0; border-top: 1px solid var(--line); }
.divisions h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; max-width: 640px; margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { border-top: 2px solid var(--ink); padding: 28px 0 0; }
.card__num { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; }
.card h3 { font-size: 26px; font-weight: 700; margin: 12px 0 10px; }
.card p { color: var(--ink-2); margin: 0; max-width: 420px; }

/* ---------- Contacto ---------- */
.contact { background: var(--dark); color: var(--dark-ink); padding: 120px 0; }
.contact .eyebrow { color: var(--dark-muted); }
.contact h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; margin-bottom: 18px; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact__lead { color: var(--dark-muted); max-width: 380px; }
.contact__direct a { font-family: var(--font-head); font-size: 20px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent); }

.form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--dark-muted); }
.opt { opacity: .7; }
.field input, .field textarea {
  font: inherit; color: var(--dark-ink);
  background: transparent; border: 0; border-bottom: 1px solid #4A4C50; border-radius: 0;
  padding: 10px 0; outline: none; resize: vertical;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field.invalid input, .field.invalid textarea { border-color: #D2694F; }
.form .btn { justify-self: start; margin-top: 8px; }
.form__status { min-height: 1.5em; margin: 0; font-size: 14px; color: var(--dark-muted); }
.form__status.ok { color: var(--accent); }
.form__status.err { color: #E58A72; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: var(--dark-muted); border-top: 1px solid #2A2C30; font-size: 13px; }
.footer__brand { padding-top: 56px; padding-bottom: 40px; }
.footer__brand img { height: 72px; width: auto; display: block; }
.footer__inner { border-top: 1px solid #2A2C30; display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; flex-wrap: wrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar { padding: 16px 16px; }
  .hero { left: 16px; right: 16px; top: 88px; }
  .hero__lead { font-size: 16px; margin-bottom: 20px; }
  .status { top: auto; bottom: 14px; left: 16px; right: 16px; width: auto; }
  .status__bar { margin: 6px 0 4px; }
  .scene { height: 50%; bottom: 62px; }
  .scroll-hint { display: none; }
  .cards, .contact__grid, .field-row { grid-template-columns: 1fr; }
  .contact__grid { gap: 40px; }
  .divisions, .contact { padding: 80px 0; }
  .wrap { padding: 0 16px; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .hero__lead { display: none; }
}

@media (max-height: 720px) {
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floor { transition: none; }
  .scroll-hint::after { animation: none; }
}
