:root {
  --c-ink-900: #0a0b1a;
  --c-ink-800: #0c1f34;
  --c-ink-700: #102945;
  --c-gray-500: #b3b3b1;
  --c-gray-300: #cecece;
  --c-gray-050: #e8e9e4;
  --c-gold-500: #c18d21;
  --bg: linear-gradient(180deg, var(--c-ink-900), var(--c-ink-800));
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --border: rgba(206, 206, 206, 0.22);
  --accent: var(--c-gold-500);
  --accent-soft: rgba(193, 141, 33, 0.35);
  --accent-hover: rgba(193, 141, 33, 0.55);
  --ink-900: var(--c-ink-900);
  --ink-700: var(--c-ink-700);
  --ink-500: var(--c-gray-500);
  --bg-100: var(--c-ink-900);
  --gray-300: var(--c-gray-300);
  --panel: var(--surface);
  --muted: var(--text-muted);
  --accent-dark: var(--c-ink-900);
  --shadow: 0 18px 50px rgba(10, 11, 26, 0.35);
  --radius: 16px;
  --radius-lg: 20px;
  --max-width: 1100px;
}

body.home {
  background: var(--bg);
  color: var(--text);
}

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

body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--text);
  text-decoration-color: rgba(193, 141, 33, 0.4);
}

a:hover,
button:hover {
  cursor: pointer;
}

a:not(.btn):hover,
a:not(.btn):focus-visible {
  color: var(--accent);
}

header.site-header a:not(.btn):hover,
header.site-header a:not(.btn):focus-visible {
  color: inherit;
}

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

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 11, 26, 0.08);
  color: #0a0b1a;
  transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease,
    box-shadow 0.6s ease, backdrop-filter 0.6s ease;
}

header.site-header.header--solid {
  background: #ffffff;
  color: #0a0b1a;
  border-bottom-color: rgba(10, 11, 26, 0.08);
  box-shadow: none;
}

header.site-header.header--glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 24px rgba(10, 11, 26, 0.32);
}

.header-inner {
  max-width: calc(var(--max-width) + 120px);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo container */
.logo{
  position: relative;
  display: inline-block;
  height: 32px;          /* conserva tamaño */
  width: 200px;          /* reserva ancho para evitar saltos */
}

/* Ambos ocupan el mismo espacio */
.logo .logo-intro,
.logo .logo-static{
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  display: block;
  object-fit: contain;   /* que no se deforme */
}

/* Estado por defecto: PNG visible */
.logo .logo-static{ opacity: 1; }
.logo .logo-intro{ opacity: 0; }


.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.primary-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  position: relative;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: rgba(10, 11, 26, 0.4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

header.site-header .primary-nav a:hover,
header.site-header .primary-nav a:focus-visible {
  color: inherit;
}

header.site-header .primary-nav a:focus-visible {
  outline: 2px solid rgba(10, 11, 26, 0.4);
  outline-offset: 6px;
  border-radius: 999px;
}

header.site-header.header--glass .primary-nav a::after {
  background: rgba(255, 255, 255, 0.55);
}

header.site-header.header--glass .primary-nav a:focus-visible {
  outline-color: rgba(255, 255, 255, 0.6);
}


.language-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid rgba(10, 11, 26, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.language-selector__btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  line-height: 1.2;
}

.language-selector__btn.is-active {
  background: rgba(10, 11, 26, 0.12);
}

header.site-header.header--glass .language-selector {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(10, 11, 26, 0.2);
}

header.site-header.header--glass .language-selector__btn.is-active {
  background: rgba(255, 255, 255, 0.2);
}

main {
  max-width: calc(var(--max-width) + 120px);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.above-fold {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-inline: clamp(16px, 3vw, 40px);
  background: var(--bg);
}

.above-fold-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: minmax(380px, 1fr) minmax(260px, 0.9fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
  min-height: calc(100vh - 88px);
}

.hero-panel {
  grid-column: 1 / 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.featured-panel {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(16px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: var(--shadow);
}

.featured-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.featured-panel__header h2 {
  color: var(--text);
}

.featured-panel__header .section-lead {
  color: var(--text-muted);
}

.featured-panel .btn-primary,
.featured-panel .btn-ghost,
.featured-panel .btn--ghost {
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 132px;
  padding: 10px 18px;
  line-height: 1;
}

.featured-panel .btn-primary:hover,
.featured-panel .btn-ghost:hover,
.featured-panel .btn--ghost:hover {
  transform: translateY(-1px);
}

.featured-gallery {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
}

.projects-carousel.featured-gallery {
  position: relative;
  overflow: visible;
}

.projects-carousel .carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.projects-carousel .carousel-track {
  display: flex;
  width: 100%;
  padding: 0.5rem;
  scroll-padding: 0.5rem;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  z-index: 1;
}

.featured-page {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
  width: 100%;
}

.services-panel {
  grid-column: 1 / 2;
  grid-row: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: clamp(16px, 2vw, 28px);
  box-shadow: var(--shadow);
}

.services-panel .service-card {
  border-radius: 0;
}

.services-panel .section-header {
  margin: 0 0 1rem;
}

.services-panel .section-lead {
  color: var(--text-muted);
}

.services-panel .services-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .above-fold-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }

  .hero-panel,
  .featured-panel,
  .services-panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .featured-panel {
    margin-top: 1.5rem;
  }

  .services-panel {
    margin-top: 1.5rem;
  }

  .services-panel .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary,
.btn--primary {
  background: #ffffff;
  color: var(--c-ink-900);
  box-shadow: 0 12px 24px rgba(10, 11, 26, 0.18);
  border-color: rgba(10, 11, 26, 0.12);
}

.btn-primary:hover,
.btn--primary:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(10, 11, 26, 0.22);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-primary:active,
.btn--primary:active {
  transform: translateY(1px);
  box-shadow: 0 10px 18px rgba(10, 11, 26, 0.16);
}

.btn-ghost,
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover,
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: rgba(193, 141, 33, 0.45);
}

.section-header {
  margin: 3rem 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-header h2 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--muted);
  font-size: 1rem;
}

.carousel-track {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.5rem 2.75rem 1rem;
  scroll-snap-type: x mandatory;
  scroll-padding: 2.75rem;
  min-height: 100%;
}

.projects-carousel .carousel-track {
  gap: 0;
  overflow: visible;
  padding: 0.5rem;
  scroll-snap-type: none;
  scroll-padding: 0;
  transition: transform 0.45s ease;
}

.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: rgba(193, 141, 33, 0.35);
  border-radius: 999px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(10, 11, 26, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 50;
  pointer-events: auto;
}

.carousel-btn.prev {
  left: 0.5rem;
}

.carousel-btn.next {
  right: 0.5rem;
}

.carousel-btn:hover {
  background: rgba(193, 141, 33, 0.18);
  transform: translateY(-50%) scale(1.02);
}

.carousel-btn:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.featured-page .project-card {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
}

/* Firefox/perf: keep header visible without relying on backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  header.site-header.header--glass {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 20px rgba(10, 11, 26, 0.3);
  }
}

.featured-page .flip-face,
.featured-page .flip-face img,
.featured-page .flip-face .img-fallback {
  border-radius: 0;
}

.featured-page .flip-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-skeleton {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.featured-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: featured-shimmer 1.6s infinite;
}

@keyframes featured-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(193, 141, 33, 0.45);
}

.project-card--featured {
  perspective: 1200px;
  border-radius: 0;
  overflow: visible;
}

.project-media {
  position: relative;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--c-ink-900);
  transform: scale(1);
  display: block;
}

.project-media .img-fallback {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, rgba(10, 11, 26, 0.9), rgba(12, 31, 52, 0.7));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

.flip-face .img-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 11, 26, 0.9), rgba(12, 31, 52, 0.7));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

.img-fallback-label {
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(10, 11, 26, 0.35);
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(11, 11, 18, 0.1), rgba(11, 11, 18, 0.8));
  color: #fff;
  opacity: 0;
  transition: opacity 360ms cubic-bezier(0.2, 0.6, 0.25, 1);
}

.project-overlay-content {
  display: grid;
  gap: 0.35rem;
}

.project-overlay-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card .card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: grid;
  gap: 0.4rem;
  flex: 1;
}

.project-card h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.project-card .meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.project-overlay-meta {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.project-overlay-summary {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-overlay-cta {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card:not(.project-card--featured):hover .project-media img,
.project-card:not(.project-card--featured):focus-within .project-media img {
  transform: scale(1.03);
}

.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay {
  opacity: 1;
}

.flip-card {
  perspective: 1200px;
}

.flip-inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.flip-front,
.flip-back {
  background-image: var(--card-img);
}

.flip-back {
  color: var(--c-ink-900);
  transform: rotateX(180deg);
  filter: saturate(0.9) contrast(0.95);
}

.flip-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  mix-blend-mode: screen;
  pointer-events: none;
}

.flip-card--fallback .flip-front,
.flip-card--fallback .flip-back {
  background-image: none;
}

.flip-content {
  height: 100%;
  padding: 1.4rem 1.6rem;
  display: grid;
  align-content: center;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.flip-back h3 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.flip-meta,
.flip-summary {
  font-size: 0.95rem;
  color: #0f1115;
}

.flip-summary {
  display: none;
}

.flip-cta {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flip-card:focus-visible .flip-inner {
  transform: rotateX(180deg);
}

.flip-card:focus-visible {
  box-shadow: 0 18px 32px rgba(15, 17, 21, 0.18);
}

@media (hover: hover) and (pointer: fine) {
  .flip-card:hover .flip-inner,
  .flip-card:focus-within .flip-inner,
  .flip-card:focus-visible .flip-inner {
    transform: rotateX(180deg);
  }

  #featured-projects .flip-card:hover .flip-inner,
  #featured-projects .flip-card:focus-within .flip-inner,
  #featured-projects .flip-card:focus-visible .flip-inner {
    box-shadow: 0 18px 30px rgba(15, 17, 21, 0.16);
  }
}

.project-card--featured .card-body {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .carousel-btn {
    display: none;
  }

  .carousel-track {
    padding: 0.5rem 1rem 1rem;
    scroll-padding: 1rem;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.65rem;
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-card::before,
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.service-card::before {
  background-image: var(--card-bg, none);
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: opacity 220ms ease, transform 220ms ease;
}

.service-card::after {
  background: linear-gradient(160deg, rgba(6, 8, 14, 0.6), rgba(6, 8, 14, 0.15));
  transition: opacity 220ms ease;
}

.service-card[style*="--card-bg"]::before,
.service-card[style*="--card-bg"]::after {
  opacity: 1;
}

.service-card:hover,
.service-card:focus-visible,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(11, 15, 26, 0.2);
  border-color: rgba(193, 141, 33, 0.45);
}

.service-card:hover::before,
.service-card:focus-visible::before,
.service-card:focus-within::before {
  transform: scale(1.1);
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(193, 141, 33, 0.16);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1.05rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .project-media img,
  .project-overlay,
  .flip-inner,
  .service-card,
  .btn,
  .carousel-btn {
    transition: none !important;
  }

  .project-card:hover .project-media img,
  .project-card:focus-within .project-media img,
  .project-card--featured:hover .project-media,
  .project-card--featured:focus-within .project-media,
  .project-card--featured:focus-visible .project-media,
  .flip-card:hover .flip-inner,
  .flip-card:focus-within .flip-inner,
  .flip-card:focus-visible .flip-inner,
  .service-card:hover,
  .service-card:focus-visible,
  .service-card:focus-within {
    transform: none !important;
  }

  .carousel-track {
    scroll-behavior: auto;
  }

  .flip-back {
    transform: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .flip-card:hover .flip-back,
  .flip-card:focus-within .flip-back,
  .flip-card:focus-visible .flip-back {
    opacity: 1;
  }
}

.footer {
  margin-top: 3rem;
  padding: 1.5rem 1.5rem 2.3rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.page-hero {
  background: var(--surface);
  padding: 3rem;
  border-radius: var(--radius-lg);
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 2.4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  max-width: 720px;
  color: var(--muted);
}

.filter-bar {
  margin: 1.5rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-bar select,
.filter-bar input {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-width: 180px;
}

.filter-bar input[type="search"] {
  flex: 1;
  min-width: 220px;
}

body.project-page main {
  max-width: 1100px;
  padding: 3rem 1.5rem 4rem;
}

.project-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.project-hero .project-hero-text {
  display: grid;
  gap: 0.7rem;
}

.project-hero h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge {
  background: rgba(193, 141, 33, 0.16);
  color: var(--accent);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-hero .summary {
  color: var(--muted);
}

.hero-visual {
  background: linear-gradient(135deg, rgba(193, 141, 33, 0.16), rgba(12, 31, 52, 0.08));
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid var(--border);
  min-height: 220px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.hero-visual img {
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(17, 17, 26, 0.18);
  width: 100%;
  height: auto;
}

.project-description,
.project-gallery {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.6rem;
}

.project-description h2,
.project-gallery h2 {
  margin-bottom: 0.85rem;
}

.project-description .content p,
.project-description .content ul {
  color: var(--muted);
}

.project-description .content ul {
  margin: 0.8rem 0 0.6rem 1.2rem;
  list-style: disc;
  line-height: 1.6;
}

.project-gallery .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.form-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.3rem;
}

.form-field label {
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-info {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  z-index: 60;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.whatsapp-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.site-header .whatsapp,
.footer .whatsapp,
.social a.whatsapp {
  display: none;
}

.whatsapp-button {
  display: none !important;
}

@media (max-width: 640px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 2.8rem 1.9rem;
  }

  .primary-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .language-selector {
    align-self: flex-end;
  }
}
/* HERO con video (misma estética/proporción tipo "tarjeta" como tu foto 2) */
.hero.hero-video{
  position: relative;
  overflow: hidden;
  border-radius: 0;
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: 0;
}

body.home .hero-bleed {
  width: 100%;
  margin: 0;
  min-height: 420px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.abovefold-hero .hero-bleed {
  min-height: 100%;
}

/* video de fondo */
.hero.hero-video .hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* QUITAR gradiente (overlay apagado) */
.hero.hero-video .hero-overlay{
  display: none; /* <- esto elimina el morado */
}

body.home .hero.hero-video {
  background: var(--bg);
}

body.home .hero.hero-video .hero-overlay {
  display: block;
  background: linear-gradient(180deg, rgba(14, 15, 18, 0.6) 0%, rgba(21, 23, 28, 0.85) 100%);
}

/* contenido arriba del video */
.hero.hero-video .hero-content{
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 3.2rem 1.5rem;
}

/* texto blanco para que lea sobre video */
.hero.hero-video .hero-content,
.hero.hero-video .hero-content h1,
.hero.hero-video .hero-content p{
  color: #fff;
}

/* que el “lead” no se pierda */
.hero.hero-video .section-lead{
  color: rgba(255,255,255,0.75);
}

/* botón ghost visible sobre video */
.hero.hero-video .btn-ghost{
  border-color: var(--border);
  color: var(--text);
}

body.home .hero.hero-video .btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

body.home .hero.hero-video .btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(193, 141, 33, 0.45);
}

/* FIX: Selects en tema oscuro */
:root {
  color-scheme: dark;
}

.filter-bar select {
  background: rgba(10, 15, 25, 0.88);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.filter-bar select option {
  background-color: #0b1220;
  color: #e5e7eb;
}

.filter-bar select:focus {
  border-color: rgba(255, 255, 255, 0.28);
}
