/* Torre corporativa — proyecto conceptual de Codai */
:root {
  --gold: #c08e0a;
  --gold-hi: #e0a826;
  --gold-lo: #8a6606;
  --night: #0e1218;
  --night-2: #151b24;
  --paper: #f3efe7;
  --paper-2: #e9e3d8;
  --ink: #16191e;
  --ink-2: #4a4f57;
  --mist: rgba(243, 239, 231, 0.84);
  --line-l: rgba(243, 239, 231, 0.16);
  --line-d: rgba(22, 25, 30, 0.14);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", "Gotham", system-ui, sans-serif;

  --t-hero: clamp(2.7rem, 1rem + 8.4vw, 9.6rem);
  --t-h2: clamp(2.3rem, 1.2rem + 3.6vw, 4.6rem);
  --t-body: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 400 var(--t-body)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.locked, body.locked { overflow: hidden; overscroll-behavior: none; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }

em { font-style: italic; color: var(--gold-hi); }
.dark em { color: var(--gold); }
.eyebrow {
  margin: 0 0 22px;
  font: 500 11px/1.6 var(--sans);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.eyebrow.dark { color: var(--gold-lo); }
.display, .h2 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: 0; }
.display { font-size: var(--t-hero); line-height: 0.94; }
.display span { display: block; }
.h2 { font-size: var(--t-h2); line-height: 0.98; }
.h2.dark { color: var(--ink); }
.fine { font-size: 12px; color: var(--ink-2); letter-spacing: 0.02em; }
.fine.light { color: rgba(243, 239, 231, 0.45); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 18px var(--gutter);
  transition: transform 0.5s var(--ease), background 0.4s;
}
.nav.solid { background: rgba(14, 18, 24, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav.light { background: rgba(243, 239, 231, 0.82); color: var(--ink); }
.nav.light .brand img { filter: brightness(0.15) sepia(1) hue-rotate(5deg) saturate(3); }
.nav.hide { transform: translateY(-110%); }
.brand img { width: 128px; height: auto; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a, .nav-cta { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; opacity: 0.82; transition: opacity 0.2s, color 0.2s; }
.nav nav a:hover { opacity: 1; color: var(--gold-hi); }
.nav-cta { padding: 10px 18px; border: 1px solid currentColor; border-radius: 2px; opacity: 1; }
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
@media (max-width: 820px) { .nav nav { display: none; } .nav-cta { margin-left: auto; } .nav-cta .wide { display: none; } }

/* ---------- film ---------- */
.film { height: 420vh; position: relative; }
.film-stage, .model-stage, .inside-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film video, .inside video, .film .film-canvas, .inside .film-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 13, 18, 0.65) 0%, rgba(10, 13, 18, 0) 30%, rgba(10, 13, 18, 0) 45%, rgba(10, 13, 18, 0.82) 100%); }
.film-copy, .inside-copy { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45); }
.film-shade.soft { background: linear-gradient(180deg, rgba(10, 13, 18, 0.5), rgba(10, 13, 18, 0) 40%, rgba(10, 13, 18, 0.65)); }
.film-copy, .inside-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(48px, 10vh, 120px); }
.film-copy .lede { max-width: 470px; margin: 28px 0 0; color: var(--mist); }
.chapter {
  position: absolute; left: 0; bottom: 0; margin: 0; max-width: 640px;
  font-family: var(--serif); font-size: clamp(1.9rem, 1rem + 2.8vw, 3.6rem); line-height: 1.02;
}
.chapter .num { display: block; font: 500 11px var(--sans); letter-spacing: 0.34em; color: var(--gold-hi); margin-bottom: 16px; }
[data-at] { transition: opacity 0.7s ease, transform 0.9s var(--ease); }
[data-at].off { opacity: 0; transform: translateY(18px); pointer-events: none; }
.altimeter {
  position: absolute; right: var(--gutter); top: 92px;
  font: 500 11px var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--mist);
}
.altimeter span { color: #fff; }
@media (max-width: 720px) { .altimeter, .scroll-cue { display: none; } .film-copy .lede { font-size: 14.5px; } }
.scroll-cue { transition: opacity 0.4s; position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--mist); }
.scroll-cue::after { content: ""; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(var(--gold-hi), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- model ---------- */
.model { height: 460vh; position: relative; background: radial-gradient(60% 55% at 64% 46%, #2c3038 0%, #16191e 55%, #0a0c0f 100%); }
.model-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.model-copy { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(430px, 82vw); pointer-events: none; }
.mc { position: absolute; top: 0; left: 0; transform: translateY(-50%); }
.mc p:not(.eyebrow) { color: var(--mist); max-width: 380px; margin-top: 22px; }
.lv { color: var(--gold-hi); font-weight: 600; }
.model-steps { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font: 500 10px var(--sans); letter-spacing: 0.24em; color: rgba(243, 239, 231, 0.35); }
.model-steps li { transition: color 0.4s; }
.model-steps li.on { color: var(--gold-hi); }
@media (max-width: 720px) { .model-steps { top: 90px; transform: none; display: flex; } }
@media (max-width: 720px) {
  .model-copy { top: auto; bottom: 34px; transform: none; }
  .mc { top: auto; bottom: 0; transform: none; padding: 18px 18px 16px; background: rgba(14, 18, 24, 0.66); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 18px; }
  .mc .h2 { font-size: 2.1rem; }
  .mc p:not(.eyebrow) { margin-top: 10px; font-size: 14px; }
}

/* ---------- floor ---------- */
.floor { background: var(--paper); color: var(--ink); padding: clamp(80px, 12vh, 140px) var(--gutter) clamp(60px, 9vh, 110px); }
.floor-head { max-width: 900px; margin-bottom: clamp(30px, 5vh, 56px); }
.floor-grid { display: grid; grid-template-columns: minmax(250px, 300px) 1fr; gap: clamp(20px, 3vw, 44px); align-items: stretch; }
.floor-view { position: relative; min-height: 640px; border-radius: 2px; overflow: hidden; background: radial-gradient(90% 90% at 60% 40%, #fbf9f5, var(--paper-2)); border: 1px solid var(--line-d); }
.floor-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; padding: 7px 12px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.view-bar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 22px; padding: 0; }
.view-bar button { border: 0; background: transparent; padding: 6px 0; border-bottom: 1px solid transparent; font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; transition: color 0.25s, border-color 0.25s; white-space: nowrap; }
.view-bar button:hover { color: var(--ink); }
.view-bar button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.view-bar .ic { font-size: 16px; padding: 6px 13px; letter-spacing: 0; }
.floor-note { position: absolute; top: 16px; right: 20px; margin: 0; font-size: 11px; color: var(--ink-2); max-width: 260px; text-align: right; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 26px; border-top: 1px solid var(--line-d); }
.stats div { padding: 16px 0 14px; border-bottom: 1px solid var(--line-d); }
.stats div:nth-child(odd) { border-right: 1px solid var(--line-d); padding-right: 12px; }
.stats div:nth-child(even) { padding-left: 16px; }
.stats dt { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 2.5rem; line-height: 1; }
.legend-h { margin: 0 0 10px; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 2px; background: transparent; text-align: left; font-size: 13.5px; color: var(--ink); cursor: pointer; transition: background 0.2s; }
.legend button:hover { background: rgba(22, 25, 30, 0.05); }
.legend button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.legend .sw { width: 12px; height: 12px; border-radius: 0; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.legend .ct { margin-left: auto; font-size: 12px; opacity: 0.6; }
.room-card { margin-top: 20px; padding: 18px 18px 16px; border-radius: 2px; background: #fff; box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--line-d); animation: rise 0.5s var(--ease); }
.rc-k { margin: 0; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-lo); }
.rc-t { margin: 6px 0 2px; font-family: var(--serif); font-weight: 500; font-size: 1.7rem; line-height: 1.05; }
.rc-a { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.rc-n { margin: 0; font-size: 13.5px; }
@media (max-width: 900px) {
  .floor-grid { grid-template-columns: 1fr; }
  .floor-side { order: 2; }
  .floor-view { min-height: 64vh; border-radius: 22px; }
  .floor-note { left: 16px; right: 16px; top: 14px; text-align: left; max-width: none; font-size: 10.5px; }
  .view-bar { bottom: 12px; gap: 16px; }
  .view-bar button { font-size: 10px; letter-spacing: 0.16em; }
  .floor-view { min-height: 60vh; }
  .stats dd { font-size: 2.1rem; }
  .legend button { font-size: 12.5px; padding: 8px 8px; gap: 8px; }
  .legend { grid-template-columns: 1fr 1fr; }
}

/* ---------- inside ---------- */
.inside { height: 340vh; position: relative; }
@media (max-width: 720px) { .film { height: 300vh; } .model { height: 340vh; } .inside { height: 260vh; } }
.inside-copy .chapter { position: absolute; }

/* ---------- rooms ---------- */
.rooms { background: var(--paper); color: var(--ink); padding: clamp(80px, 12vh, 140px) var(--gutter); }
.rooms-head { margin-bottom: clamp(30px, 5vh, 60px); }
.rooms-grid { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: clamp(12px, 1.6vw, 22px); }
.room { margin: 0; position: relative; background: transparent; }
.room > img { border-radius: 2px; background: var(--paper-2); }
.room { overflow: visible; }
.room.big { grid-row: span 2; }
.room img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 16 / 9; transition: filter 0.8s var(--ease); }
.room.big img { aspect-ratio: 4 / 3.4; }
.room:hover img { filter: brightness(1.04) contrast(1.02); }
.room figcaption { margin-top: 12px; color: var(--ink); font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.room figcaption span { color: var(--gold); margin-right: 4px; }
.rooms .fine { margin: 18px 0 0; }
@media (max-width: 760px) { .rooms-grid { grid-template-columns: 1fr; } .room.big { grid-row: auto; } .room.big img { aspect-ratio: 16 / 10; } }

/* ---------- process ---------- */
.process { background: var(--paper-2); color: var(--ink); padding: clamp(80px, 12vh, 140px) var(--gutter); display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 6vw, 110px); }
.process .body { color: var(--ink-2); max-width: 460px; margin-top: 26px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 70px 1fr; gap: 6px 18px; padding: 24px 0; border-top: 1px solid var(--line-d); }
.steps li:last-child { border-bottom: 1px solid var(--line-d); }
.steps .n { grid-row: span 2; font-family: var(--serif); font-size: 2.8rem; line-height: 0.9; color: var(--gold); }
.steps h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.7rem; line-height: 1.1; }
.steps p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 860px) { .process { grid-template-columns: 1fr; } }

/* ---------- note ---------- */
.note { position: relative; min-height: 100vh; display: grid; align-items: center; overflow: hidden; padding: clamp(90px, 14vh, 160px) var(--gutter); }
.note video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.note-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 13, 18, 0.92) 0%, rgba(10, 13, 18, 0.7) 45%, rgba(10, 13, 18, 0.35) 100%); }
.note-in { position: relative; display: grid; grid-template-columns: minmax(0, 640px); gap: clamp(30px, 5vw, 80px); align-items: center; }
.note-copy p:not(.eyebrow) { color: var(--mist); max-width: 500px; }
.note-copy .h2 { margin-bottom: 26px; }
.note-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; padding: 15px 26px; border-radius: 2px; font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; transition: transform 0.3s var(--ease), background 0.3s, color 0.3s; }
.btn:hover { transform: translateY(-2px); }
.btn.gold { background: var(--gold); color: #fff; box-shadow: 0 16px 34px -16px rgba(192, 142, 10, 0.8); }
.btn.gold:hover { background: var(--gold-hi); }
.btn.line { border: 1px solid var(--line-l); }
.btn.line:hover { border-color: var(--paper); }
@media (max-width: 860px) { .note-in { grid-template-columns: 1fr; } .note-shade { background: linear-gradient(180deg, rgba(10, 13, 18, 0.9), rgba(10, 13, 18, 0.6)); } }

/* ---------- footer ---------- */
.foot { background: #0a0d12; padding: 60px var(--gutter) 40px; }
.foot > img { width: 170px; height: auto; margin-bottom: 34px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px 60px; font-size: 13px; color: var(--mist); }
.foot-cols p { margin: 0; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { color: var(--gold-hi); }
.foot .fine { margin-top: 40px; max-width: 760px; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr; } }

/* ---------- reveals ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1.2s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* ---------- proyecto conceptual ---------- */
.brand-txt { font-family: var(--serif); font-size: 24px; line-height: 1; text-decoration: none; letter-spacing: 0.01em; }
.brand-txt em { color: var(--gold-hi); }
.nav.light .brand-txt em { color: var(--gold-lo); }
.foot-brand { font-family: var(--serif); font-size: 30px; margin: 0 0 18px; color: #fff; }
.concept {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 60; margin: 0;
  font-size: 10.5px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.78); white-space: nowrap;
  background: rgba(10, 13, 18, 0.74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 0; border-radius: 10px 10px 0 0;
  padding: 6px 14px calc(6px + env(safe-area-inset-bottom));
}
.concept a { color: var(--gold-hi); font-weight: 600; text-decoration: none; }
.concept a:hover, .concept a:focus-visible { text-decoration: underline; }
@media (max-width: 420px) { .concept { font-size: 9.5px; padding: 5px 10px calc(5px + env(safe-area-inset-bottom)); } }
.foot { padding-bottom: 70px; }

.film-canvas { background: #0b0d10 center/cover no-repeat; }
#top .film-canvas { background-image: url(/assets/rise-poster.jpg); }
@media (max-aspect-ratio: 4/5) { #top .film-canvas { background-image: url(/assets/rise-poster-m.jpg); } }
#inside .film-canvas { background-image: url(/assets/ext-hd.webp); }
