/* ==========================================================================
   Tokens globales
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f4f1f2;
  --bg-soft: #fbf8f9;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-dark: #171214;
  --text: #22191d;
  --muted: #5f5258;
  --line: rgba(34, 25, 29, 0.1);
  --accent: #d81b7d;
  --accent-deep: #8f0d51;
  --shadow: 0 30px 80px rgba(51, 26, 38, 0.12);
}

* {
  box-sizing: border-box;
}

/* ==========================================================================
   Base del documento
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 27, 125, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(143, 13, 81, 0.08), transparent 26%),
    linear-gradient(180deg, #faf7f8 0%, #f3eef0 100%);
  opacity: 1;
}

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

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

a {
  color: inherit;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.topbar p,
.topbar a {
  margin: 0;
}

.topbar div {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(251, 248, 249, 0.82);
  border-bottom: 1px solid rgba(34, 25, 29, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.15rem;
}

.brand img {
  display: block;
  width: auto;
  height: 76px;
  max-width: min(330px, 48vw);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a,
.footer-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}

.nav a::after,
.footer-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav a:hover::after,
.footer-nav a:hover::after {
  width: 100%;
}

/* ==========================================================================
   Botones y alertas
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, #f23f9a 100%);
  box-shadow: 0 18px 40px rgba(216, 27, 125, 0.25);
}

.btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline {
  color: var(--text);
  border-color: rgba(34, 25, 29, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.btn-outline-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.alert {
  padding: 1rem 1.5rem;
  text-align: center;
}

.alert.success {
  background: rgba(33, 155, 97, 0.12);
  color: #13432d;
}

.alert.error {
  background: rgba(193, 66, 79, 0.14);
  color: #6c1e2a;
}

/* ==========================================================================
   Hero principal
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 1rem 0 0.95rem;
  background:
    linear-gradient(112deg, rgba(17, 12, 15, 0.92) 0%, rgba(17, 12, 15, 0.78) 42%, rgba(17, 12, 15, 0.4) 100%),
    url('../img/Stand_Astersa (2).jpg') center/cover no-repeat;
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto -10% -10% auto;
  width: 38vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 27, 125, 0.2), transparent 68%);
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(390px, 1.04fr);
  gap: 1.4rem;
  align-items: center;
  min-height: min(510px, calc(100vh - 280px));
}

.hero-copy {
  padding: 0.4rem 0;
  max-width: 610px;
}

.eyebrow,
.section-header p,
.section-kicker,
.footer-label,
.service-pill,
.portfolio-meta span,
.gallery-info span,
.panel-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
}

.hero h1,
.section-header h2,
.about h2,
.contact h2 {
  letter-spacing: 0;
}

.hero h1 {
  max-width: 20ch;
  margin: 0.65rem 0 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.45rem, 4.2vw, 3.95rem);
  line-height: 0.94;
}

.hero-copy p {
  max-width: 560px;
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.93rem;
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-panel {
  align-self: center;
  display: flex;
  align-items: stretch;
  padding-bottom: 0;
}

.hero-feature,
.service-card,
.portfolio-card,
.process-card,
.gallery-card,
.testimonial-card,
.about-panel,
.contact-form {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero-carousel {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9.15;
}

.hero-feature {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #140f12;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 1.1s ease, transform 1.1s ease;
  pointer-events: none;
}

.hero-feature.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

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

.hero-feature::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.hero-feature-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 1.1rem 1.1rem 2.8rem;
}

.hero-feature-copy span {
  color: rgba(255, 255, 255, 0.64);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
}

.hero-slide-title {
  max-width: 20ch;
  margin: 0.45rem 0 0.45rem;
  font-size: 1.18rem;
  line-height: 1.08;
  text-shadow: 0 12px 28px rgba(10, 7, 8, 0.4);
}

.hero-slide-description {
  max-width: 40ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-carousel-dots {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  gap: 0.45rem;
}

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

.hero-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.hero-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(5, 3, 4, 0.34);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.24s ease, background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  backdrop-filter: blur(14px);
}

.hero-carousel-control span {
  display: grid;
  place-items: center;
  width: 1em;
  height: 1em;
  font-size: 1.55rem;
  line-height: 1;
}

.hero-carousel-control-prev span {
  transform: translateY(-0.02em);
}

.hero-carousel-control-next span {
  transform: translateY(-0.02em);
}

.hero-carousel-control-prev {
  left: 1rem;
}

.hero-carousel-control-next {
  right: 1rem;
}

.hero-carousel-control:hover,
.hero-carousel-control:focus-visible {
  border-color: rgba(227, 9, 125, 0.8);
  background:
    linear-gradient(180deg, rgba(227, 9, 125, 0.95), rgba(181, 3, 98, 0.82));
  box-shadow: 0 20px 48px rgba(227, 9, 125, 0.34);
  transform: translateY(-50%) scale(1.05);
}

.hero-carousel-control:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-metrics article {
  padding: 1.15rem 1.2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.hero-metrics strong {
  display: block;
  font-size: 1.9rem;
}

.hero-metrics span {
  display: block;
  margin-top: 0.4rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ==========================================================================
   Secciones generales
   ========================================================================== */
.section {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 2.4rem;
}

.section-header.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 2rem;
  align-items: start;
}

.section-header p,
.section-kicker,
.footer-label,
.service-pill,
.gallery-info span,
.portfolio-meta span,
.panel-label {
  color: var(--accent);
}

.section-header h2,
.about h2,
.contact h2 {
  margin: 0.8rem 0 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.96;
}

.section-intro,
.about-copy p,
.contact-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.section-side {
  display: grid;
  justify-items: start;
  gap: 1.2rem;
  padding-top: 0.35rem;
}

/* ==========================================================================
   Grid de contenido de la home
   ========================================================================== */
.services-grid,
.portfolio-grid,
.process-grid,
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
}

.service-card,
.process-card,
.testimonial-card,
.contact-form,
.about-panel {
  border-radius: 26px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.service-card,
.process-card,
.testimonial-card {
  padding: 1.8rem;
}

.service-card h3,
.process-card h3,
.portfolio-body h3 {
  margin: 0.9rem 0 0.9rem;
  font-size: 1.35rem;
}

.service-card p,
.process-card p,
.testimonial-card p,
.gallery-info p,
.portfolio-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.portfolio {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45));
}

.portfolio::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 7rem;
  background: linear-gradient(180deg, #faf7f8 0%, rgba(250, 247, 248, 0.72) 35%, rgba(250, 247, 248, 0) 100%);
  pointer-events: none;
}

.portfolio::after {
  content: '';
  position: absolute;
  bottom: -2rem;
  left: 0;
  width: 100%;
  height: 14rem;
  background: linear-gradient(180deg, 
    rgba(251, 248, 249, 0.8) 0%,
    rgba(251, 248, 249, 0.6) 15%,
    rgba(251, 248, 249, 0.35) 35%,
    rgba(251, 248, 249, 0.15) 60%,
    rgba(251, 248, 249, 0) 100%);
  pointer-events: none;
  filter: blur(0.5px);
}

.portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: transparent;
  border: 1px solid var(--line);
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background-color: var(--bg-soft);
}

.portfolio-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 12, 15, 0.72) 100%);
  color: #ffffff;
}

.portfolio-body h3:only-child {
  margin: 0;
}

.portfolio-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.portfolio-specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.portfolio-specs strong {
  color: var(--accent-deep);
}

.process {
  position: relative;
  background:
    linear-gradient(180deg, rgba(216, 27, 125, 0.06), transparent),
    var(--bg-soft);
}

.process::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 7rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(251, 248, 249, 0.34) 38%, rgba(251, 248, 249, 0) 100%);
  pointer-events: none;
}

.process::after {
  content: '';
  position: absolute;
  bottom: -2rem;
  left: 0;
  width: 100%;
  height: 13rem;
  background: linear-gradient(180deg, 
    rgba(251, 248, 249, 0.6) 0%,
    rgba(251, 248, 249, 0.45) 15%,
    rgba(251, 248, 249, 0.25) 35%,
    rgba(244, 241, 242, 0.1) 60%,
    rgba(244, 241, 242, 0) 100%);
  pointer-events: none;
  filter: blur(0.5px);
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #1b1417;
  color: #ffffff;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 24px;
  background: #0f0b0d;
}

.gallery-card:nth-child(2),
.gallery-card:nth-child(5) {
  transform: translateY(2rem);
}

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

.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.gallery-info {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 1.4rem;
  color: #ffffff;
}

.gallery-info h3 {
  margin: 0.7rem 0 0.6rem;
  font-size: 1.35rem;
}

.gallery-info p {
  color: rgba(255, 255, 255, 0.78);
}

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

.testimonial-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.testimonial-head img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-head strong,
.testimonial-head span {
  display: block;
}

.testimonial-head span {
  margin-top: 0.2rem;
  color: var(--muted);
}

.about-grid,
.contact-shell,
.footer-grid {
  display: grid;
  gap: 2rem;
}

.about-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
}

.section.about {
  position: relative;
}

.section.about::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 7rem;
  background: linear-gradient(180deg, rgba(251, 248, 249, 0.76) 0%, rgba(244, 241, 242, 0.42) 42%, rgba(244, 241, 242, 0) 100%);
  pointer-events: none;
}

.about-panel {
  padding: 2rem;
  background:
    linear-gradient(145deg, rgba(216, 27, 125, 0.12), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.about-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.about-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text);
  line-height: 1.7;
}

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.contact {
  position: relative;
  background:
    linear-gradient(120deg, rgba(24, 18, 21, 0.94) 0%, rgba(39, 23, 31, 0.92) 50%, rgba(76, 27, 53, 0.88) 100%);
  color: #ffffff;
}

.contact-shell {
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  align-items: start;
}

.contact-copy p,
.contact-points span,
.contact-points a {
  color: rgba(255, 255, 255, 0.8);
}

.contact-points {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.contact-points a {
  text-decoration: none;
}

.contact-details {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.05rem;
}

.contact-detail-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #1f181c;
  box-shadow: 0 18px 46px rgba(7, 4, 5, 0.18);
}

.contact-detail-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.18rem;
  line-height: 1;
}

.contact-detail-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-detail-card h3 {
  margin: 0 0 0.18rem;
  font-size: 1rem;
  line-height: 1.1;
}

.contact-detail-card p {
  margin: 0;
  color: rgba(31, 24, 28, 0.68);
  line-height: 1.35;
  font-size: 0.86rem;
}

.contact-detail-card p + p {
  margin-top: 0.15rem;
}

.contact-form {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
}

.contact-form label {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

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

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 1.8rem;
  background: #130f11;
  color: #ffffff;
}

/* ==========================================================================
   Pagina interna de proyectos
   ========================================================================== */
.inner-hero {
  padding: 2.6rem 0 2rem;
  background:
    radial-gradient(circle at top right, rgba(216, 27, 125, 0.18), transparent 26%),
    linear-gradient(120deg, rgba(18, 13, 16, 0.96) 0%, rgba(38, 21, 30, 0.9) 100%);
  color: #ffffff;
}

.inner-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: center;
}

.inner-hero-copy h1 {
  max-width: 11ch;
  margin: 0.75rem 0 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 5.2vw, 4.8rem);
  line-height: 0.94;
}

.inner-hero-copy p {
  max-width: 52ch;
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.inner-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.3rem;
}

.inner-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.inner-hero-meta article {
  padding: 1.25rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inner-hero-meta strong,
.inner-hero-meta span {
  display: block;
}

.inner-hero-meta strong {
  font-size: 1.15rem;
}

.inner-hero-meta span {
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.55;
}

.inner-hero-meta-wide {
  grid-column: span 2;
}

.section-header-compact h2 {
  max-width: 11ch;
}

.project-showcase {
  padding-top: 2.2rem;
  padding-bottom: 2.4rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 242, 244, 0.94));
}

.project-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 1.3rem;
  align-items: stretch;
}

.project-lead-card,
.project-mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.project-lead-card {
  min-height: 560px;
}

.project-lead-card img,
.project-mini-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--bg-soft);
}

.project-lead-card::after,
.project-mini-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.project-lead-copy,
.project-mini-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  color: #ffffff;
}

.project-lead-copy {
  padding: 1.6rem 1.7rem 1.7rem;
}

.project-lead-copy span,
.project-mini-copy span {
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

.project-lead-copy h2 {
  margin: 0.6rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.98;
}

.project-lead-copy p {
  max-width: 44ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.project-showcase-side {
  display: grid;
  gap: 1.2rem;
}

.project-section-header {
  margin-bottom: 0;
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(34, 25, 29, 0.08);
}

.project-section-header h2 {
  max-width: 10ch;
  margin: 0.7rem 0 0.9rem;
}

.project-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-mini-card {
  min-height: 220px;
}

.project-mini-copy {
  padding: 1rem 1rem 1.15rem;
}

.project-mini-copy h3 {
  margin: 0;
  font-size: 1.05rem;
}

.project-lead-copy,
.project-mini-copy,
.project-group-main-label {
  margin: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.projects-page {
  background: linear-gradient(180deg, rgba(247, 242, 244, 0.94), rgba(243, 237, 240, 0.8));
}

.projects-header-bar {
  margin-bottom: 1.6rem;
}

.projects-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}

.projects-filter-row span,
.project-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 25, 29, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
}

.project-nav-link {
  border: 0;
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.project-nav-link:hover,
.project-nav-link:focus {
  background: rgba(255, 255, 255, 1);
  color: var(--text);
  transform: translateY(-1px);
}

.project-nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-tile {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

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

.project-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--bg-soft);
}

.project-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.project-tile-copy {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 1.35rem 1.35rem 1.45rem;
  color: #ffffff;
}

.project-tile-copy span {
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

.project-tile-copy h3 {
  margin: 0.55rem 0 0.45rem;
  font-size: 1.3rem;
}

.project-tile-copy p {
  max-width: 38ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-groups {
  display: grid;
  gap: 3.5rem;
}

.project-group {
  padding: 2.2rem 1.75rem 1.75rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(34, 25, 29, 0.08);
  box-shadow: 0 28px 60px rgba(13, 9, 10, 0.08);
}

.project-group-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.project-group-header h3 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.4rem);
  line-height: 1.05;
}

.project-group-header p {
  margin: 0.9rem 0 0;
  max-width: 56ch;
  color: rgba(34, 25, 29, 0.85);
  line-height: 1.8;
}

.project-group-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.2rem;
  align-items: stretch;
  grid-template-areas: 'main thumbs';
}

.project-group-reverse .project-group-grid {
  grid-template-areas: 'thumbs main';
}

.project-group-main {
  grid-area: main;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 420px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.project-group-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: var(--bg-soft);
}

.project-group-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.project-group-main-label {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.2rem;
  padding: 0;
  background: transparent;
  color: #ffffff;
}

.project-group-main-label strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 0;
  text-shadow: 0 10px 22px rgba(12, 8, 10, 0.45);
}

.project-group-main-label span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.project-group-thumbs {
  grid-area: thumbs;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-group-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 180px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.project-group-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: var(--bg-soft);
}

.project-group-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.project-group-thumb:nth-child(1) {
  min-height: 260px;
}

.project-group-reverse .project-group-grid {
  direction: rtl;
}

.project-group-reverse .project-group-grid > * {
  direction: ltr;
}

@media (max-width: 1050px) {
  .project-group-grid {
    grid-template-columns: 1fr;
  }

  .project-group-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .project-group-header {
    flex-direction: column;
    margin-bottom: 1.6rem;
  }

  .project-group-main {
    min-height: 320px;
  }

  .project-group-thumb:nth-child(1) {
    min-height: 180px;
  }
}

.footer-grid {
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  align-items: start;
}

.project-group-copy h3 {
  margin: 0.55rem 0 0.75rem;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
}

.project-group-copy p {
  max-width: 60ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.project-group-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.project-group-main,
.project-group-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 260px;
  aspect-ratio: 16 / 10;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.project-group-main img,
.project-group-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background-color: var(--bg-soft);
}

.project-group-main-label {
  left: 1rem;
  right: auto;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: 0;
  background: transparent;
  color: #ffffff;
  z-index: 2;
  pointer-events: none;
}

.project-group-main-label strong {
  display: inline-block;
  font-size: 1.25rem;
  line-height: 1.1;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.project-group-main::after,
.project-group-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.project-group-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-group-thumb {
  min-height: 180px;
  aspect-ratio: auto;
}

.project-group-thumb:nth-child(1) {
  min-height: 260px;
}

@media (max-width: 980px) {
  .project-group-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      'main'
      'thumbs';
    width: 100%;
    max-width: 100%;
  }

  .project-group-reverse .project-group-grid {
    direction: ltr;
    grid-template-areas:
      'main'
      'thumbs';
  }

  .project-group-grid > *,
  .project-group-main,
  .project-group-thumbs,
  .project-group-thumb {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .projects-page {
    overflow-x: hidden;
  }

  .project-groups {
    gap: 2rem;
  }

  .project-group {
    width: 100%;
    padding: 1.45rem 0.9rem 0.95rem;
    border-radius: 24px;
  }

  .project-group-header {
    margin-bottom: 1.2rem;
  }

  .project-group-header h3 {
    font-size: clamp(1.9rem, 10vw, 2.35rem);
  }

  .project-group-header p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .project-group-main,
  .project-group-thumb {
    width: 100%;
    min-height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }

  .project-group-main-label {
    left: 0.85rem;
    bottom: 0.85rem;
    max-width: calc(100% - 1.7rem);
  }

  .project-group-main-label strong {
    font-size: clamp(1rem, 5.8vw, 1.35rem);
  }

  .project-group-thumbs {
    grid-template-columns: 1fr;
  }

  .project-group-thumb:nth-child(1) {
    min-height: auto;
  }

  .project-group-copy h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .topbar {
    display: none;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
  }

  .brand img {
    height: 34px;
    max-width: 28vw;
  }

  .nav {
    flex-wrap: nowrap;
    gap: 0.75rem;
    font-size: 0.82rem;
  }

  .header-inner > .btn {
    min-height: 32px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
  }
}

.footer-grid {
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  align-items: start;
}

.footer-brand img {
  display: block;
  height: 64px;
  max-width: min(290px, 70vw);
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p,
.footer-contact p,
.footer-contact a {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  line-height: 1.8;
}

.footer-nav,
.footer-contact {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}

.cookie-consent {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 30;
  display: grid;
  justify-items: start;
  gap: 0.55rem;
}

.cookie-consent.is-dismissed {
  display: none;
}

.cookie-tab {
  min-height: 38px;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(216, 27, 125, 0.24);
  border-radius: 999px;
  background: rgba(251, 248, 249, 0.92);
  color: var(--accent-deep);
  box-shadow: 0 16px 38px rgba(51, 26, 38, 0.16);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.cookie-tab:hover,
.cookie-tab:focus-visible {
  border-color: rgba(216, 27, 125, 0.58);
  box-shadow: 0 18px 42px rgba(216, 27, 125, 0.2);
  transform: translateY(-2px);
}

.cookie-tab:focus-visible {
  outline: 3px solid rgba(216, 27, 125, 0.22);
  outline-offset: 3px;
}

.cookie-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 540px;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(19, 15, 17, 0.94);
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(10, 8, 9, 0.28);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.cookie-banner.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  visibility: hidden;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.cookie-banner button {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

main img[data-zoomable-image] {
  cursor: zoom-in;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 12, 15, 0.44);
  backdrop-filter: blur(10px);
}

.image-viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(88vw, 980px);
  max-height: min(82vh, 820px);
  padding: 1rem;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(249, 244, 246, 0.9)),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(216, 27, 125, 0.12);
  box-shadow: 0 38px 90px rgba(22, 16, 19, 0.28);
  backdrop-filter: blur(22px);
}

.image-viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(62vh, 620px);
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(216, 27, 125, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 240, 243, 0.86));
}

.image-viewer-stage.is-draggable {
  cursor: grab;
}

.image-viewer-stage.is-draggable:active {
  cursor: grabbing;
}

.image-viewer-stage img {
  max-width: 100%;
  max-height: min(62vh, 620px);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.image-viewer-caption {
  margin-top: 0.9rem;
  text-align: center;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

.image-viewer-meta {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}

.image-viewer-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: rgba(216, 27, 125, 0.1);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.image-viewer-controls {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.image-viewer-control,
.image-viewer-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  box-shadow: 0 12px 28px rgba(25, 17, 20, 0.14);
  cursor: pointer;
}

.image-viewer-control {
  font-size: 1.1rem;
  line-height: 1;
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  box-shadow: 0 14px 30px rgba(25, 17, 20, 0.16);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
}

.image-viewer-nav[hidden] {
  display: none;
}

.image-viewer-nav-prev {
  left: 1rem;
}

.image-viewer-nav-next {
  right: 1rem;
}

.image-viewer-control:disabled {
  opacity: 0.42;
  cursor: default;
}

.image-viewer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(216, 27, 125, 0.96) 0%, rgba(109, 22, 76, 0.96) 100%);
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 16px 34px rgba(109, 22, 76, 0.28);
}

.image-viewer-control:hover,
.image-viewer-control:focus-visible,
.image-viewer-nav:hover,
.image-viewer-nav:focus-visible,
.image-viewer-close:hover,
.image-viewer-close:focus-visible {
  background: linear-gradient(135deg, var(--accent) 0%, #f23f9a 100%);
  color: #ffffff;
}

.image-viewer-close:hover,
.image-viewer-close:focus-visible {
  filter: brightness(1.04);
}

/* ==========================================================================
   Transiciones de página
   ========================================================================== */
.page-transition-overlay {
  display: none;
  pointer-events: none;
}

.page-transition-overlay.active {
  display: none;
  pointer-events: none;
}

/* ==========================================================================
   Responsividad
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-shell,
  .section-header.split,
  .about-grid,
  .contact-shell,
  .footer-grid,
  .services-grid,
  .process-grid,
  .inner-hero-shell,
  .project-showcase-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid,
  .gallery-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    max-width: none;
  }

  .hero-copy h1 {
    max-width: 11ch;
  }

  .project-tile-wide {
    grid-column: span 1;
  }

  .project-mini-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .topbar,
  .header-inner,
  .nav,
  .hero-metrics,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero {
    padding-top: 1rem;
  }

  .hero-shell {
    min-height: auto;
  }

  .hero-carousel {
    aspect-ratio: 16 / 10;
  }

  .inner-hero {
    padding-top: 1.5rem;
  }

  .inner-hero-meta {
    grid-template-columns: 1fr;
  }

  .inner-hero-meta-wide {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.2rem, 1200px);
  }

  .topbar {
    display: none;
  }

  .header-inner {
    gap: 0.55rem;
    padding: 0.45rem 0 0.55rem;
  }

  .brand img {
    height: 44px;
    max-width: 52vw;
  }

  .nav {
    gap: 0.55rem 0.8rem;
    font-size: 0.9rem;
  }

  .header-inner > .btn {
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-carousel {
    aspect-ratio: 16 / 10.2;
  }

  .contact-detail-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.65rem;
  }

  .contact-detail-icon {
    width: 40px;
    height: 40px;
    font-size: 1.08rem;
  }

  .contact-detail-card h3 {
    font-size: 0.98rem;
  }

  .hero-feature-copy {
    padding: 0.95rem 0.95rem 2.6rem;
  }

  .hero-carousel-control {
    width: 34px;
    height: 34px;
  }

  .hero-carousel-control span {
    font-size: 1.35rem;
  }

  .hero-carousel-control-prev {
    left: 0.65rem;
  }

  .hero-carousel-control-next {
    right: 0.65rem;
  }

  .hero-slide-title {
    font-size: 1.15rem;
  }

  .hero-slide-description {
    font-size: 0.92rem;
  }

  .portfolio-grid,
  .gallery-grid,
  .services-grid,
  .process-grid,
  .testimonials-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-mini-grid {
    grid-template-columns: 1fr;
  }

  .project-lead-card {
    min-height: 420px;
  }

  .gallery-card:nth-child(2),
  .gallery-card:nth-child(5) {
    transform: none;
  }

  .cookie-consent {
    right: 0.6rem;
    left: 0.6rem;
    bottom: 0.6rem;
  }

  .cookie-banner {
    max-width: none;
    flex-direction: column;
    align-items: stretch;
  }
}
