/* ==========================================================================
   PROYECTA503 — Architectural & Engineering Editorial Design System
   Inspired by Swiss-editorial precision + Official Brand Palette
   ========================================================================== */

:root {
  /* Official Proyecta503 Palette */
  --jacksons-purple: #1E358B;
  --jacksons-purple-hover: #16286B;
  --mercury: #E2E2E2;
  --corduroy: #607466;
  --yellow-sea: #FFAD05;

  /* Light Theme Surfaces & Ink */
  --paper: #F4F3EF;
  --surface: #FFFFFF;
  --surface-alt: #EAE8E1;
  --ink: #141413;
  --mute: #607466;
  --line: #E2E2E2;
  --line-strong: #C9C6BF;
  --night: #0E0E0D;
  --night-surface: #15171E;
  --brand: #1E358B;
  --brand-ink: #FFFFFF;
  --accent: #FFAD05;
  --accent-ink: #141413;
  --nav-bg: rgba(244, 243, 239, 0.86);
  --glass: rgba(20, 20, 19, 0.06);

  /* Typography */
  --f-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* Spacing & Layout */
  --wrap: min(1440px, 100vw - 64px);
  --gutter: clamp(20px, 4vw, 64px);
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --paper: #0E0E0D;
  --surface: #15171E;
  --surface-alt: #1C1F29;
  --ink: #F4F3EF;
  --mute: #A4ABA6;
  --line: #272A34;
  --line-strong: #3B4050;
  --brand: #4B6EE8;
  --brand-hover: #6584F0;
  --brand-ink: #FFFFFF;
  --nav-bg: rgba(14, 14, 13, 0.86);
  --glass: rgba(244, 243, 239, 0.08);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--f-sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Custom Cursor (Fine pointer desktop only) */
.cur {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s, background-color 0.25s;
  mix-blend-mode: difference;
  border-color: #FFFFFF;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cur {
    display: block;
  }
  .cur.is-hover {
    width: 34px;
    height: 34px;
    background-color: rgba(255, 173, 5, 0.18);
  }
}

/* Intro Veil */
#intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: var(--jacksons-purple);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: transform 0.85s var(--ease-out), opacity 0.6s ease;
}

#intro.done {
  transform: translateY(-100%);
  pointer-events: none;
}

.intro-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: introPulse 1.1s var(--ease-out) forwards;
}

.intro-bar {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  border-radius: 2px;
}

.intro-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--yellow-sea);
  transform-origin: left;
  animation: introLoad 0.9s var(--ease-out) forwards;
}

@keyframes introPulse {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introLoad {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Container & Grid Helpers */
.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sec {
  padding-block: clamp(72px, 9vw, 136px);
  border-top: 1px solid var(--line);
}

/* Typography Scale & Editorial Labels */
.lbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.eb {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.eb::before {
  content: "";
  width: 36px;
  height: 1px;
  background-color: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.75s var(--ease-out);
}

.eb.in::before {
  transform: scaleX(1);
}

/* Line-draw animation for horizontal dividers */
.sec,
.nosotros-grid,
.foot-legal {
  position: relative;
}

.line-reveal {
  transform-origin: left;
}

@media (prefers-reduced-motion: reduce) {
  .eb::before {
    transform: scaleX(1);
  }
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h-xl {
  font-size: clamp(32px, 4.2vw, 62px);
  line-height: 1.05;
}

.h-lg {
  font-size: clamp(28px, 3.4vw, 50px);
  line-height: 1.08;
}

.h-md {
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.2;
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */
header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 76px;
  background-color: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateZ(0);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s, border-color 0.35s;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--brand);
}

[data-theme="dark"] .brand-wordmark {
  color: #FFFFFF;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-block: 4px;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background-color: var(--yellow-sea);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.nav-portfolio-pill {
  background-color: var(--brand);
  color: #FFFFFF;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.nav-links a.nav-portfolio-pill::after {
  display: none;
}

.nav-links a.nav-portfolio-pill:hover {
  background-color: var(--jacksons-purple-hover);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background-color: var(--surface);
  color: var(--ink);
  transition: border-color 0.25s, background-color 0.25s, color 0.25s;
}

.ctrl-switch:hover {
  border-color: var(--brand);
}

.ctrl-switch .sep {
  opacity: 0.35;
}

.ctrl-switch .active-opt {
  color: var(--brand);
}

[data-theme="dark"] .ctrl-switch .active-opt {
  color: var(--yellow-sea);
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.menu-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.menu-bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
}

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 540px) {
  .nav-inner {
    gap: 8px;
  }
  .brand svg {
    width: 26px;
    height: 26px;
  }
  .brand-wordmark {
    font-size: 13px;
  }
  .nav-controls {
    gap: 6px;
  }
  .ctrl-switch {
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }
  .menu-btn {
    padding: 5px 9px;
    font-size: 12px;
    gap: 6px;
  }
}

/* Fullscreen Mobile / Overlay Menu */
#menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background-color: var(--paper);
  color: var(--ink);
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: clip-path 0.65s var(--ease-out);
}

#menu.open {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}

.mn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.mn-close {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.mn-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block: 24px;
}

.mn-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(26px, 6vw, 42px);
  font-weight: 500;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}

.mn-list .idx {
  font-size: 13px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.mn-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--mute);
}

/* ==========================================================================
   BLOQUE 1: HERO + SCROLL-DRIVEN VIDEO -> 360° VIEWER SPLIT
   ========================================================================== */
.hero-stage {
  position: relative;
  min-height: 155vh;
  padding-top: 76px;
  background-color: var(--night);
  color: #F4F3EF;
}

.hero-sticky {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  min-height: 580px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding: clamp(16px, 2.5vw, 32px) var(--gutter);
}

.hero-split {
  --split: 0;
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  height: 100%;
  display: grid;
  grid-template-columns: calc(100% - (50% + 12px) * var(--split)) calc((50% - 12px) * var(--split));
  gap: calc(24px * var(--split));
  align-items: stretch;
}

.hero-video-panel,
.hero-360-panel {
  min-width: 0;
}

/* Left Panel: Video Presentation */
.hero-video-panel {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #090D16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 3.5vw, 48px);
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.04);
  animation: heroKenBurns 22s ease-in-out infinite alternate;
}

@keyframes heroKenBurns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}

.hero-video-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 14, 13, 0.35) 0%, rgba(14, 14, 13, 0.45) 45%, rgba(14, 14, 13, 0.88) 100%);
  pointer-events: none;
}

.hero-top-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(30, 53, 139, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--yellow-sea);
  box-shadow: 0 0 10px var(--yellow-sea);
}

.hero-scroll-hint {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 243, 239, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-h1 {
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.07;
  font-weight: 500;
  color: #FFFFFF;
}

.hero-sub {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: rgba(244, 243, 239, 0.88);
  max-width: 66ch;
}

.hero-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  color: rgba(244, 243, 239, 0.85);
}

.hero-backing {
  color: var(--yellow-sea);
  font-weight: 500;
}

/* Right Panel: Dynamic 360° Interactive Viewer */
.hero-360-panel {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #111524;
  border: 1px solid rgba(255, 255, 255, 0.16);
  opacity: 0;
  transform: translateX(48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}

.viewer-360-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  cursor: grab;
  overflow: hidden;
}

.viewer-360-canvas-wrap:active {
  cursor: grabbing;
}

#panoramaCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-360-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.viewer-360-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill-360 {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 14, 13, 0.72);
  border: 1px solid rgba(255, 173, 5, 0.55);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.viewer-360-controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-360 {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 14, 13, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-360:hover {
  background: var(--jacksons-purple);
  border-color: var(--yellow-sea);
}

.viewer-360-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(0deg, rgba(14, 14, 13, 0.85) 0%, transparent 100%);
  margin: -20px;
  padding: 24px 20px 20px;
}

.viewer-360-bottom p {
  font-size: 13px;
  color: rgba(244, 243, 239, 0.9);
}

.viewer-360-yaw {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--yellow-sea);
  font-weight: 600;
}

@media (max-width: 960px) {
  .hero-stage {
    min-height: auto;
  }
  .hero-sticky {
    position: relative;
    top: 0;
    height: auto;
    min-height: auto;
  }
  .hero-split {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .hero-video-panel {
    min-height: 74vh;
  }
  .hero-360-panel {
    opacity: 1 !important;
    transform: none !important;
    min-height: 400px;
  }
}

/* ==========================================================================
   BLOQUE 2: NOSOTROS (IDENTIDAD CORPORATIVA SIN TÍTULOS)
   ========================================================================== */
.nosotros-lead {
  font-size: clamp(22px, 2.4vw, 35px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 48ch;
  margin-bottom: clamp(40px, 5vw, 68px);
}

.nosotros-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.nosotros-card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  padding-top: clamp(36px, 4vw, 56px);
}

.valor-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 2px solid var(--brand);
}

.valor-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .valor-num {
  color: var(--yellow-sea);
}

.valor-item p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--mute);
}

@media (max-width: 1080px) {
  .valores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nosotros-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .valores-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BLOQUE 3: SERVICIOS PRINCIPALES (SP Split Panel Style)
   ========================================================================== */
.svc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.svc-list {
  display: flex;
  flex-direction: column;
}

.svc-item {
  padding-block: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.3s;
}

.svc-item:first-child {
  border-top: 1px solid var(--line);
}

.svc-item.active {
  border-bottom-color: var(--brand);
}

.svc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.svc-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.svc-idx {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.svc-item.active .svc-idx {
  color: var(--brand);
}

[data-theme="dark"] .svc-item.active .svc-idx {
  color: var(--yellow-sea);
}

.svc-name {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 500;
}

.svc-arrow {
  font-size: 20px;
  color: var(--mute);
  transition: transform 0.3s var(--ease-out), color 0.3s;
}

.svc-item.active .svc-arrow {
  transform: translateX(6px);
  color: var(--brand);
}

.svc-sublist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  padding-left: 34px;
}

.svc-sub h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.svc-sub p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mute);
}

.svc-panel {
  position: sticky;
  top: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--surface);
}

.svc-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.svc-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.55s var(--ease-out), transform 0.8s var(--ease-out);
}

.svc-stage img.active {
  opacity: 1;
  transform: scale(1);
}

.svc-stage-caption {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--mute);
}

@media (max-width: 960px) {
  .svc-grid {
    grid-template-columns: 1fr;
  }
  .svc-panel {
    position: relative;
    top: 0;
  }
  .svc-stage {
    aspect-ratio: 16 / 10;
  }
  .svc-sublist {
    padding-left: 0;
  }
}

/* ==========================================================================
   BLOQUE 4: METODOLOGÍA (LÍNEA DE TIEMPO DINÁMICA - 7 ETAPAS)
   ========================================================================== */
.sec-dark {
  background-color: var(--night);
  color: #F4F3EF;
  border-top-color: #24262E;
}

.sec-dark .lbl {
  color: #A4ABA6;
}

.sec-dark .eb::before {
  background-color: var(--yellow-sea);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.timeline-progress-wrap {
  width: min(360px, 100%);
}

.timeline-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--yellow-sea);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.timeline-bar {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  overflow: hidden;
}

.timeline-bar-fill {
  height: 100%;
  width: 14.28%;
  background: var(--yellow-sea);
  transition: width 0.45s var(--ease-out);
}

.timeline-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
}

.tl-step {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding-block: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  width: 100%;
  transition: border-color 0.3s, padding-left 0.3s var(--ease-out);
}

.tl-step:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tl-step.active {
  border-bottom-color: var(--yellow-sea);
  padding-left: 8px;
}

.tl-num {
  font-size: 13px;
  font-weight: 600;
  color: rgba(244, 243, 239, 0.5);
  font-variant-numeric: tabular-nums;
}

.tl-step.active .tl-num {
  color: var(--yellow-sea);
}

.tl-title {
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 500;
  color: rgba(244, 243, 239, 0.72);
  transition: color 0.25s;
}

.tl-step.active .tl-title,
.tl-step:hover .tl-title {
  color: #FFFFFF;
}

.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 0.3s, transform 0.3s;
}

.tl-step.active .tl-dot {
  background: var(--yellow-sea);
  transform: scale(1.4);
}

.tl-inline-desc {
  display: none;
  grid-column: 2 / -1;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(244, 243, 239, 0.8);
  padding-top: 10px;
}

.tl-step.active .tl-inline-desc {
  display: none;
}

.timeline-detail-card {
  position: sticky;
  top: 110px;
  background-color: var(--night-surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tl-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(30, 53, 139, 0.65);
  border: 1px solid rgba(255, 173, 5, 0.45);
  font-size: 12px;
  font-weight: 600;
  color: var(--yellow-sea);
}

.tl-detail-title {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  color: #FFFFFF;
}

.tl-detail-copy {
  font-size: 16.5px;
  line-height: 1.65;
  color: rgba(244, 243, 239, 0.85);
}

.tl-nav-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tl-nav-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  transition: background-color 0.2s, border-color 0.2s;
}

.tl-nav-btn:hover {
  background-color: var(--jacksons-purple);
  border-color: var(--yellow-sea);
}

@media (max-width: 900px) {
  .timeline-layout {
    grid-template-columns: 1fr;
  }
  .timeline-detail-card {
    display: none;
  }
  .tl-step.active .tl-inline-desc {
    display: block;
  }
}

/* ==========================================================================
   BLOQUE 5: ACCESO A PORTAFOLIO (PÁGINA APARTE)
   ========================================================================== */
.portfolio-gate {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  background-color: var(--jacksons-purple);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 68px);
  position: relative;
  overflow: hidden;
}

.portfolio-gate::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 173, 5, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.portfolio-gate-copy h2 {
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.portfolio-gate-copy p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 54ch;
  margin-bottom: 28px;
}

.btn-primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  background-color: var(--yellow-sea);
  color: #141413;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.portfolio-gate-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portfolio-gate-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
  .portfolio-gate {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CONTACTO (SP Style Form & Chips)
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-left h2 {
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.contact-left p {
  font-size: 16px;
  color: var(--mute);
  max-width: 44ch;
  margin-bottom: 28px;
}

.btn-wa-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background-color: var(--ink);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 600;
  transition: background-color 0.25s, transform 0.25s;
}

.btn-wa-dark:hover {
  background-color: var(--brand);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.contact-meta-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--mute);
}

.cform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}

.cform .full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 2px;
  outline: none;
  transition: border-color 0.25s;
}

.field select option {
  background-color: var(--surface);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--brand);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.chip[aria-pressed="true"] {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

.form-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn-submit {
  padding: 13px 32px;
  border-radius: 999px;
  background-color: var(--brand);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 600;
  transition: background-color 0.25s;
}

.btn-submit:hover {
  background-color: var(--jacksons-purple-hover);
}

.form-feedback {
  font-size: 14px;
  color: var(--brand);
  font-weight: 500;
}

[data-theme="dark"] .form-feedback {
  color: var(--yellow-sea);
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cform {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 6vw, 80px) 32px;
  font-size: 14.5px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.foot-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
}

.foot-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foot-col a:hover {
  color: var(--brand);
}

.foot-legal {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--mute);
}

@media (max-width: 820px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FLOATING CONTACT BUTTONS (Brief Requirement)
   ========================================================================== */
.floating-contacts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s var(--ease-out);
}

.fab-btn:hover {
  transform: translateY(-2px);
}

.fab-wa {
  background-color: #16A34A;
  color: #FFFFFF;
}

.fab-contact {
  background-color: var(--jacksons-purple);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
  .floating-contacts {
    right: 12px;
    bottom: 12px;
    flex-direction: row;
    gap: 8px;
  }
  .fab-btn {
    padding: 9px 13px;
    font-size: 12px;
  }
  .viewer-360-bottom {
    padding-bottom: 64px;
  }
}

/* ==========================================================================
   DEDICATED PORTFOLIO PAGE (portafolio.html)
   ========================================================================== */
.pf-hero {
  padding-top: 132px;
  padding-bottom: 48px;
}

.pf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pf-filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.25s;
}

.pf-filter-btn.active,
.pf-filter-btn:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 88px;
}

.pf-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), border-color 0.3s;
}

.pf-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.pf-card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.pf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.pf-card:hover .pf-card-media img {
  transform: scale(1.05);
}

.pf-card-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.pf-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 14, 13, 0.76);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.pf-tag-360 {
  background: var(--yellow-sea);
  color: #141413;
}

.pf-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-card-body h3 {
  font-size: 20px;
}

.pf-card-body p {
  font-size: 14px;
  color: var(--mute);
}

@media (max-width: 980px) {
  .pf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pf-grid {
    grid-template-columns: 1fr;
  }
}

/* Project Detail Modal (Render vs Obra Real + 360°) */
.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(14, 14, 13, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pf-modal.open {
  display: flex;
}

.pf-modal-box {
  background-color: var(--surface);
  color: var(--ink);
  width: min(980px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  padding: clamp(20px, 3vw, 36px);
}

.compare-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
  margin-block: 20px;
}

.compare-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
  border-right: 2px solid var(--yellow-sea);
}

.compare-range {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--brand);
}
