:root {
  --bg: #f2ede6;
  --bg-soft: #faf6f0;
  --surface: #ffffff;
  --surface-dark: #111111;
  --surface-deep: #090909;
  --text: #151515;
  --muted: #625f59;
  --line: rgba(17, 17, 17, 0.1);
  --line-light: rgba(255, 255, 255, 0.14);
  --gold: #b29263;
  --gold-soft: rgba(178, 146, 99, 0.18);
  --shadow: 0 26px 60px rgba(17, 17, 17, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--surface-deep);
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.03em;
  font-weight: 600;
}

p {
  margin: 0;
  line-height: 1.7;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 12px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(var(--container), calc(100% - 36px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.eyebrow.dark {
  color: #756f66;
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.65);
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(var(--container), calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 7, 7, 0.45);
  backdrop-filter: blur(18px);
  color: #ffffff;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled,
.site-header.menu-active {
  background: rgba(7, 7, 7, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: radial-gradient(circle at 30% 30%, rgba(178, 146, 99, 0.4), rgba(178, 146, 99, 0.08));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 800;
}

.brand-text small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible,
.btn:hover,
.btn:focus-visible,
button:hover,
button:focus-visible {
  opacity: 0.92;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-cta-mobile,
.menu-toggle {
  display: none;
}

.scroll-video-hero {
  position: relative;
  min-height: 620vh;
  background: #050505;
}

.video-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #050505;
}

.hero-video,
.hero-scrim,
.hero-glow {
  position: absolute;
  inset: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

canvas.hero-video {
  display: block;
  object-fit: unset;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.36) 45%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.06) 52%, rgba(0, 0, 0, 0.72) 100%);
}

.hero-glow {
  background:
    radial-gradient(circle at 22% 30%, rgba(178, 146, 99, 0.16), transparent 30%),
    radial-gradient(circle at 78% 70%, rgba(255, 255, 255, 0.08), transparent 24%);
  pointer-events: none;
}

.hero-chip {
  position: fixed;
  top: 104px;
  right: max(18px, calc((100vw - var(--container)) / 2));
  z-index: 8;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(8, 8, 8, 0.48);
  backdrop-filter: blur(16px);
  color: #ffffff;
}

.chip-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}

.hero-chip strong {
  font-size: 16px;
}

.scroll-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.story-panel {
  min-height: 100vh;
  width: min(720px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  margin-left: max(20px, calc((100vw - var(--container)) / 2));
  padding-top: 96px;
  padding-bottom: 88px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.story-panel.is-active {
  opacity: 1;
  transform: translateY(0);
}

.story-panel.align-right {
  margin-left: auto;
  margin-right: max(20px, calc((100vw - var(--container)) / 2));
  text-align: right;
  align-items: flex-end;
}

.story-panel.final-panel {
  margin: 0 auto;
  text-align: center;
  align-items: center;
}

.story-panel h1 {
  max-width: 900px;
  font-size: clamp(3rem, 7vw, 6.3rem);
  line-height: 0.93;
}

.story-panel h2 {
  max-width: 760px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.story-panel p {
  max-width: 640px;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  pointer-events: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible,
button:hover,
button:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: #ffffff;
  color: #111111;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Base compartida */
.scroll-hint {
  position: fixed;
  left: 50%;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease;
}

.scroll-hint:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Botón inferior (↓) — siempre visible en el hero ── */
.scroll-hint-down {
  top: auto;
  bottom: 28px;
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
  animation: bounce-down 2s ease-in-out infinite;
}

.scroll-hint-down.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(14px);
  pointer-events: none;
  animation: none;
}

/* ── Botón superior (↑) — solo aparece en el último panel ── */
.scroll-hint-up {
  top: 88px;
  bottom: auto;
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  pointer-events: none;
  animation: none;
}

.scroll-hint-up.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  animation: bounce-up 2s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateX(-50%) translateY(0);   }
  50%       { transform: translateX(-50%) translateY(6px); }
}

@keyframes bounce-up {
  0%, 100% { transform: translateX(-50%) translateY(0);    }
  50%       { transform: translateX(-50%) translateY(-6px); }
}

.metrics-strip,
.difference-section,
.featured-project,
.projects-section {
  background: var(--bg);
}

.metrics-strip {
  padding: 28px 0 0;
  margin-top: -1px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.metrics-grid article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.05);
}

.metrics-grid strong,
.service-card h3,
.frame-card h3,
.project-copy h3,
.method-steps h3 {
  display: block;
  margin-bottom: 10px;
  font-size: 1.6rem;
}

.metrics-grid p,
.service-card p,
.section-heading p,
.frame-card p,
.feature-copy p,
.project-copy span,
.method-copy p,
.method-steps p,
.contact-copy p,
.contact-links,
.footer-grid p,
.footer-grid a {
  color: var(--muted);
}

.difference-section,
.timeline-section,
.featured-project,
.projects-section,
.method-section,
.contact-section {
  padding: 110px 0;
}

.timeline-section,
.method-section,
.contact-section {
  background: #111111;
  color: #ffffff;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
  max-width: 760px;
}

.section-heading.wide {
  max-width: 840px;
}

.section-heading h2,
.feature-copy h2,
.method-copy h2,
.contact-copy h2 {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.service-card span,
.frame-card span,
.method-steps strong {
  color: #a18b68;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.frame-card {
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
}

.frame-card img {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
}

.frame-card div {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 32px;
  align-items: center;
}

.feature-visual {
  margin: 0;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.feature-visual img {
  width: 100%;
  min-height: 560px;
  object-fit: cover;
}

.feature-copy {
  display: grid;
  gap: 18px;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.feature-list li + li {
  margin-top: 10px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.16fr 0.84fr;
  grid-auto-rows: minmax(280px, auto);
  gap: 18px;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: 30px;
  background: #141414;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.project-card-large {
  grid-row: span 2;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 40%);
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover img,
.project-card:focus-visible img {
  transform: scale(1.03);
}

.project-copy {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 1;
  color: #ffffff;
}

.project-copy span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(178, 146, 99, 0.22),
    var(--shadow);
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gallery-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(8px);
}

.gallery-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(17, 17, 17, 0.94);
  color: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 54px;
}

.gallery-kicker {
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.gallery-counter {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
}

.gallery-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.gallery-nav {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
}

.gallery-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #050505;
  min-height: 62vh;
  display: grid;
  place-items: center;
}

.gallery-figure img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
}

.gallery-thumb {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  opacity: 0.68;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.gallery-thumb.is-active {
  border-color: rgba(178, 146, 99, 0.72);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.method-layout {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 26px;
  align-items: start;
}

.method-copy {
  display: grid;
  gap: 16px;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.method-steps article {
  padding: 24px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.method-steps h3 {
  margin-top: 10px;
}

.contact-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line-light);
  border-radius: 36px;
  background:
    radial-gradient(circle at top left, rgba(178, 146, 99, 0.14), transparent 30%),
    rgba(255, 255, 255, 0.04);
}

.contact-copy {
  display: grid;
  gap: 18px;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-links a,
.contact-links span {
  color: rgba(255, 255, 255, 0.72);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.contact-form select option {
  color: #111111;
}

.contact-form textarea {
  min-height: 148px;
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible,
.menu-toggle:focus-visible,
.site-nav a:focus-visible,
.brand:focus-visible,
.btn:focus-visible,
.nav-cta:focus-visible,
button:focus-visible,
.footer-grid a:focus-visible {
  outline: none;
  border-color: rgba(178, 146, 99, 0.72);
  box-shadow: 0 0 0 4px rgba(178, 146, 99, 0.16);
}

.contact-form button {
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  background: #ffffff;
  color: #111111;
  font-weight: 800;
  cursor: pointer;
}

.contact-form button.is-loading {
  opacity: 0.7;
  cursor: progress;
}

.form-status {
  min-height: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.form-status.is-success {
  color: #d1f0cb;
}

.form-status.is-error {
  color: #ffc3c3;
}

.site-footer {
  padding: 32px 0 40px;
  background: #050505;
  color: #ffffff;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-grid a {
  display: block;
  margin-top: 6px;
}

.footer-logo {
  display: block;
  width: 160px;
  height: auto;
  margin-bottom: 10px;
  filter: invert(1) brightness(2);
}

.brand-mark img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .metrics-grid,
  .service-grid,
  .project-grid,
  .method-layout,
  .feature-layout,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .timeline-grid,
  .method-steps {
    grid-template-columns: 1fr 1fr;
  }

  .project-card-large {
    grid-row: span 1;
  }
}

@media (max-width: 900px) {
  .site-header {
    align-items: center;
    width: calc(100% - 20px);
  }

  .menu-toggle {
    position: relative;
    z-index: 101;
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 82px;
    right: 10px;
    left: 10px;
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(7, 7, 7, 0.96);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 10px 6px;
  }

  .nav-cta-desktop {
    display: none;
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin-top: 6px;
  }

  .brand-text small {
    display: none;
  }

  .hero-chip {
    top: auto;
    right: 16px;
    bottom: 92px;
    left: 16px;
  }

  .scroll-video-hero {
    min-height: 600vh;
  }

  /* Cada panel ocupa exactamente 100vh para evitar solapamiento */
  .story-panel,
  .story-panel.align-right,
  .story-panel.final-panel {
    min-height: 100vh;
    max-height: 100vh;
    width: calc(100% - 32px);
    margin-right: 16px;
    margin-left: 16px;
    padding-top: 80px;
    padding-bottom: 80px;
    text-align: left;
    align-items: flex-start;
    overflow: hidden;
    gap: 12px;
  }

  .story-panel.final-panel {
    align-items: center;
    text-align: center;
  }

  .story-panel h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1;
  }

  .story-panel h2 {
    font-size: clamp(1.7rem, 8vw, 2.6rem);
    line-height: 1.05;
  }

  .story-panel p {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .timeline-grid,
  .method-steps {
    grid-template-columns: 1fr;
  }

  .difference-section,
  .timeline-section,
  .featured-project,
  .projects-section,
  .method-section,
  .contact-section {
    padding: 86px 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 24px));
  }

  .site-header {
    padding: 10px 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .metrics-grid article,
  .service-card,
  .frame-card div,
  .method-steps article,
  .contact-card {
    padding: 22px;
  }

  .metrics-grid,
  .service-grid,
  .project-grid {
    gap: 14px;
  }

  .frame-card img,
  .feature-visual img {
    aspect-ratio: 1 / 1;
    min-height: auto;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-modal {
    padding: 10px;
  }

  .gallery-dialog {
    padding: 18px;
  }

  .gallery-stage {
    grid-template-columns: 1fr;
  }

  .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .gallery-nav-prev {
    left: 24px;
  }

  .gallery-nav-next {
    right: 24px;
  }

  .gallery-figure {
    min-height: 48vh;
  }
}

/* ── Stats ── */
.stat-card {
  display: grid;
  gap: 6px;
}

.stat-number {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a18b68;
  margin-bottom: 8px;
}

/* ── Obra tag en project cards ── */
.obra-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(178, 146, 99, 0.22);
  border: 1px solid rgba(178, 146, 99, 0.4);
  color: #d4b483 !important;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px !important;
}

.project-card-wide {
  grid-column: span 2;
}

/* ── Antes / Después ── */
.before-after-section {
  padding: 110px 0;
  background: var(--bg-soft);
}

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

.ba-pair {
  display: grid;
  gap: 10px;
}

.ba-pair > .ba-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #111;
}

.ba-pair > .ba-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.ba-pair > .ba-figure figcaption {
  position: absolute;
  top: 14px;
  left: 14px;
}

.ba-label {
  display: inline-flex;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ba-label.before {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.18);
}

.ba-label.after {
  background: rgba(178, 146, 99, 0.88);
  color: #fff;
  border: 1px solid rgba(178, 146, 99, 0.6);
}

.ba-project-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
  padding-top: 4px;
}

/* ── Carpintería ── */
.carpinteria-section {
  padding: 110px 0;
  background: var(--bg-soft);
}

.carp-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-auto-rows: minmax(260px, auto);
  gap: 18px;
}

.carp-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #141414;
  box-shadow: var(--shadow);
  cursor: pointer;
  min-height: 260px;
}

.carp-card-large {
  grid-row: span 2;
}

.carp-card-wide {
  grid-column: span 2;
}

.carp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.75) 100%);
}

.carp-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.carp-card:hover img,
.carp-card:focus-visible img {
  transform: scale(1.03);
}

.carp-copy {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 1;
  color: #ffffff;
}

.carp-copy span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.carp-copy h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.1;
}

.carp-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(178,146,99,0.28), var(--shadow);
}

@media (max-width: 1024px) {
  .carp-grid {
    grid-template-columns: 1fr 1fr;
  }
  .carp-card-large {
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  .carp-grid {
    grid-template-columns: 1fr;
  }
  .carp-card-wide {
    grid-column: span 1;
  }
  .carpinteria-section {
    padding: 86px 0;
  }
}

/* ── Equipo ── */
.team-section {
  padding: 110px 0;
  background: var(--bg);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 10px;
}

.team-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8e2d8;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.team-photo-placeholder {
  display: grid;
  place-items: center;
  color: #a18b68;
}

.team-info {
  display: grid;
  gap: 8px;
}

.team-role {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a18b68;
}

.team-info h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1;
  color: var(--text);
}

.team-info p {
  color: var(--muted);
  font-size: 0.93rem;
}

@media (max-width: 1024px) {
  .ba-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
  .project-card-wide {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .team-card {
    grid-template-columns: 1fr;
  }
  .team-photo {
    width: 80px;
    height: 80px;
  }
  .before-after-section,
  .team-section {
    padding: 86px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
