/* ============================================
   PÁGINA DE INICIO — Panel 1 (Hero)
   Scoped under .home-page
   ============================================ */

/* ── Page-level overrides ── */
body.page-home {
  display: block;
  background: var(--home-bg-black);
  min-height: 100vh;
  min-height: 100svh;
}

body.page-home .navbar {
  display: none;
}

body.page-home.is-page-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  min-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  color: #e8e8e8;
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity 550ms ease, visibility 0s linear 550ms;
}

.page-loader.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__video {
  grid-area: 1 / 1;
  display: block;
  width: min(100%, 90rem);
  height: min(100%, 100svh);
  object-fit: contain;
}

.page-loader__status {
  grid-area: 1 / 1;
  align-self: end;
  z-index: 1;
  margin: 0 0 clamp(1rem, 4vh, 2.5rem);
  padding: 0.45rem 0.75rem;
  color: rgba(232, 232, 232, 0.82);
  background: rgba(0, 0, 0, 0.48);
  border-radius: 999px;
  font-size: clamp(0.72rem, 1.8vw, 0.88rem);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ── 1. Homepage tokens ── */
.home-page {
  --home-accent: #7cf03d;
  --home-accent-dim: #5bb82a;
  --home-accent-glow: rgba(124, 240, 61, 0.15);
  --home-bg-black: #0a0a0a;
  --home-bg-dark: #1a1a1a;
  --home-bg-mid: #3a3a3a;
  --home-bg-light: #c8c8c8;
  --home-bg-top: #d8d8d8;
  --home-text-dark: #0f0f0f;
  --home-text-light: #e8e8e8;
  --home-text-dim: #aaaaaa;
  --home-grid-color: rgba(255, 255, 255, 0.04);
  --home-panel-padding: clamp(1.5rem, 4vw, 4rem);
  --home-content-width: 90rem;
  --home-header-clearance: clamp(12rem, 15vw, 15rem);

  margin: 0;
  position: relative;
  isolation: isolate;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(circle at 35% 35%, #73767a 0%, transparent 45%),
    #000;
}

/* ── 2. Panel base ── */
.grainient-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.grainient-background__canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.splash-cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.splash-cursor-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* ── 3. Panel 1: Hero layout ── */
.home-panel--hero {
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  display: flex;
  flex-direction: column;
  background: transparent;
  padding-top: var(--home-header-clearance);
  padding-bottom: 0;
}

/* ── 3.1 Background layers ── */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  display: none;
}

/* Gradient: light gray top → dark mid → black bottom */
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      var(--home-bg-top) 0%,
      var(--home-bg-light) 15%,
      var(--home-bg-mid) 45%,
      var(--home-bg-dark) 65%,
      var(--home-bg-black) 100%
    );
}

/* Green radial glow near the helmet (right side, center area) */
.hero-bg-glow {
  position: absolute;
  top: 20%;
  right: 5%;
  width: 50%;
  height: 55%;
  background: radial-gradient(
    ellipse at center,
    var(--home-accent-glow) 0%,
    rgba(124, 240, 61, 0.05) 40%,
    transparent 70%
  );
}

/* Subtle green glow around text area */
.home-panel--hero::after {
  content: '';
  position: absolute;
  top: 25%;
  left: 0;
  width: 45%;
  height: 40%;
  background: radial-gradient(
    ellipse at 45% 50%,
    rgba(124, 240, 61, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  display: none;
}

/* Faint technical grid */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      0deg,
      var(--home-grid-color) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      var(--home-grid-color) 1px,
      transparent 1px
    );
  background-size: 60px 60px;
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

/* ── 4. Header integration ── */
.hero-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  width: min(
    calc(100% - (var(--home-panel-padding) * 2)),
    var(--home-content-width)
  );
  gap: clamp(2rem, 5vw, 6rem);
  padding: 1.5rem 0 0;
  height: auto;
  min-height: 5rem;
  margin-inline: auto;
}

.hero-logo {
  display: block;
  flex-shrink: 0;
  z-index: 2;
  line-height: 0;
  width: clamp(360px, 28vw, 480px);
}

.hero-logo-img {
  display: block;
  width: 80%;
  height: auto;
  object-fit: contain;
  transform: scale(1);
  transform-origin: left center;
}

/* ── Navigation ── */
.hero-nav {
  z-index: 2;
  justify-self: end;
  margin-left: auto;
  min-width: 0;
}

.hero-nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.hero-nav-link {
  color: var(--home-text-dark);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s;
}

.hero-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--home-accent);
  transition: width 0.3s;
}

.hero-nav-link:hover {
  color: var(--home-accent);
}

.hero-nav-link:hover::after,
.hero-nav-link:focus-visible::after {
  width: 100%;
}

.hero-nav-link:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.hero-nav-account {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 0.5rem;
}

.hero-nav-user {
  font-size: 0.85rem;
  color: var(--home-text-dark);
  opacity: 0.75;
}

.hero-nav-admin {
  font-size: 0.8rem;
  color: var(--home-accent);
  font-weight: 600;
}

.hero-logout-form {
  display: inline;
  margin: 0;
}

.hero-nav-logout {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  color: var(--home-text-dark);
  opacity: 0.65;
  padding: 0.25rem 0;
  transition: opacity 0.3s, color 0.3s;
}

.hero-nav-logout:hover {
  opacity: 1;
  color: #ef4444;
}

/* ── 5. Hero content ── */
.hero-content {
  position: relative;
  z-index: auto;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  grid-template-areas:
    "text stage"
    "ctas stage";
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(2rem, 4vw, 6rem);
  width: min(
    calc(100% - (var(--home-panel-padding) * 2)),
    var(--home-content-width)
  );
  margin-inline: auto;
  padding: 1rem 0;
}

.hero-text {
  grid-area: text;
  position: relative;
  z-index: 4;
  min-width: 0;
  align-self: end;
}

/* ── 5.1 Eyebrow ── */
.hero-eyebrow {
  display: block;
  font-size: clamp(0.65rem, 0.85vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--home-text-dark);
  opacity: 0.85;
  margin-bottom: clamp(2rem, 5vh, 5rem);
  margin-top: clamp(1rem, 5vh, 4rem);
  position: relative;
  padding-bottom: 0.65rem;
}

.hero-eyebrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3.5rem;
  height: 2px;
  background: var(--home-accent);
}

/* ── 5.2 Main heading ── */
.hero-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--home-text-dark);
  text-shadow:
    0 0 40px rgba(124, 240, 61, 0.3),
    0 0 80px rgba(124, 240, 61, 0.15),
    0 0 120px rgba(124, 240, 61, 0.08);
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-line {
  display: block;
}

.hero-line--accent {
  color: var(--home-accent);
}

/* ── 5.3 CTA buttons ── */
.hero-ctas {
  grid-area: ctas;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(100%, 280px);
  margin-top: clamp(2.5rem, 6vh, 5rem);
  align-self: start;
  min-width: 0;
  z-index: 4;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  font-weight: 600;
  font-family: inherit;
  padding: 0.9rem 1.5rem;
  text-decoration: none;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
  min-height: 48px;
  white-space: nowrap;
}

.hero-btn:active {
  transform: scale(0.97);
}

/* Primary: neon-green filled */
.hero-btn--primary {
  background: var(--home-accent);
  color: var(--home-bg-black);
  border-color: var(--home-accent);
}

.hero-btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.hero-btn--primary:hover::before,
.hero-btn--primary:focus-visible::before {
  transform: translateX(100%);
}

.hero-btn--primary:hover {
  box-shadow:
    0 0 20px rgba(124, 240, 61, 0.4),
    0 0 40px rgba(124, 240, 61, 0.15);
}

.hero-btn--primary:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 3px;
}

/* Secondary: dark outline */
.hero-btn--outline {
  background: transparent;
  color: var(--home-text-light);
  border-color: var(--home-accent);
}

.hero-btn--outline:hover {
  background: var(--home-accent);
  color: var(--home-bg-black);
  border-color: var(--home-accent);
  box-shadow:
    0 0 15px rgba(124, 240, 61, 0.3);
}

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

.hero-btn-arrow {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.hero-btn:hover .hero-btn-arrow {
  transform: translateX(4px);
}

/* ── 6. 3D Stage ── */
.hero-3d {
  grid-area: stage;
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: clamp(420px, min(50vw, 60vh), 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: grab;
}

.hero-3d.is-dragging {
  cursor: grabbing;
}

.hero-3d.has-fallback {
  cursor: default;
}

.hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  touch-action: pan-y;
}

.hero-canvas:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 4px;
}

/* ── 6.1 Loader ── */
.hero-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 350ms ease,
    visibility 0s linear 0s;
}

.hero-loader__spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(8rem, 25vw, 13rem);
  height: clamp(8rem, 25vw, 13rem);
}

.hero-loader__spinner-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-loader-text {
  display: block;
  font-size: 0.85rem;
  color: var(--home-text-dim);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ── 6.1a Model-ready state ── */
.hero-3d.is-ready .hero-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 350ms ease,
    visibility 0s linear 350ms;
}

.hero-3d canvas {
  opacity: 0;
  transition: opacity 450ms ease;
}

.hero-3d.is-ready canvas {
  opacity: 1;
}

/* ── 6.1b Error state ── */
.hero-error {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 3;
  padding: 1.5rem;
  text-align: center;
  color: var(--home-text-dim);
}

.hero-3d.has-error .hero-error {
  display: flex;
}

.hero-3d.has-error .hero-loader {
  display: none;
}

.hero-error__icon {
  font-size: 2rem;
  line-height: 1;
}

.hero-error__message {
  margin: 0;
  font-size: 0.9rem;
  max-width: 16rem;
}

.hero-error__retry {
  margin-top: 0.25rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--home-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--home-accent);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  pointer-events: auto;
  transition: background 200ms ease, color 200ms ease;
}

.hero-error__retry:hover {
  background: var(--home-accent);
  color: var(--home-bg-black);
}

/* ── Legacy spinner (kept for fallback reference) ── */
.hero-loader-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(124, 240, 61, 0.2);
  border-top-color: var(--home-accent);
  border-radius: 50%;
  animation: hero-spin 0.8s linear infinite;
}

@keyframes hero-spin {
  to { transform: rotate(360deg); }
}

/* ── 6.2 Fallback ── */
.hero-3d-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--home-text-dim);
  font-size: 0.9rem;
  text-align: center;
}

.hero-3d.has-fallback .hero-3d-fallback {
  display: flex;
}

.hero-3d-fallback-icon {
  font-size: 4rem;
  opacity: 0.5;
}

/* ── 7. Social links ── */
.hero-social {
  position: relative;
  right: auto;
  bottom: auto;
  align-self: flex-end;
  flex-shrink: 0;
  width: fit-content;
  margin-top: 1rem;
  margin-right: max(
    var(--home-panel-padding),
    calc((100% - var(--home-content-width)) / 2)
  );
  margin-bottom: clamp(1.5rem, 3vh, 3rem);
  z-index: 5;
  display: flex;
  gap: 1rem;
}

.hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: var(--home-text-light);
  transition:
    border-color 0.3s,
    color 0.3s,
    background 0.3s,
    transform 0.2s;
}

.hero-social-link svg {
  width: 1.1rem;
  height: 1.1rem;
}

.hero-social-link:hover {
  border-color: var(--home-accent);
  color: var(--home-accent);
  background: rgba(124, 240, 61, 0.08);
  transform: translateY(-2px);
}

.hero-social-link:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 3px;
}

/* ── 8. Panel 2: Transition ── */
.home-panel--transition {
  min-height: 60vh;
  background: transparent;
}

/* ── 9. Animation-ready states ── */
.home-page.is-motion-ready .hero-line {
  opacity: 1;
}

.home-page.is-motion-ready .hero-eyebrow {
  opacity: 1;
}

.home-page.is-motion-ready .hero-btn {
  opacity: 1;
}

.home-page.is-motion-ready .hero-social-link {
  opacity: 1;
}

/* Base visible state when JS is disabled */
.hero-line,
.hero-eyebrow,
.hero-btn,
.hero-social-link {
  opacity: 1;
}

/* ── 10. Responsive ── */
/* Large desktop adjustments */
@media (max-width: 1200px) {
  .home-page {
    --home-panel-padding: clamp(1.5rem, 3vw, 2.5rem);
  }

  .hero-header {
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  .hero-logo {
    width: clamp(320px, 28vw, 400px);
  }

  .hero-nav-list {
    gap: clamp(1rem, 2vw, 1.5rem);
  }

  .hero-content {
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    column-gap: clamp(1.5rem, 3vw, 3rem);
  }
}

/* Tablet: preserve the two-column composition while it remains usable */
@media (max-width: 1024px) {
  .home-page {
    --home-header-clearance: clamp(10.5rem, 19vw, 12rem);
  }

  .hero-logo {
    width: clamp(280px, 31vw, 340px);
  }

  .hero-nav-list {
    gap: 0.9rem;
  }

  .hero-nav-link {
    font-size: 0.82rem;
  }

  .hero-nav-account {
    gap: 0.6rem;
    margin-left: 0;
  }

  .hero-content {
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
    column-gap: 1.5rem;
  }

  .hero-eyebrow {
    margin-top: 1rem;
    margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  }

  .hero-heading {
    font-size: clamp(2rem, 4vw, 2.55rem);
  }

  .hero-3d {
    min-height: clamp(400px, 50vw, 560px);
  }
}

/* Mobile: two-row header and deliberate single-column flow */
@media (max-width: 768px) {
  .home-page {
    --home-panel-padding: clamp(1rem, 4vw, 1.5rem);
  }

  .home-panel--hero {
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero-header {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    min-height: auto;
    padding-top: 0.75rem;
  }

  .hero-logo {
    width: clamp(220px, 45vw, 300px);
  }

  .hero-nav {
    width: 100%;
  }

  .hero-nav-list {
    justify-content: flex-end;
    gap: 0.75rem 1rem;
  }

  .hero-nav-link {
    font-size: 0.8rem;
  }

  .hero-content {
    flex: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "stage"
      "ctas";
    grid-template-rows: auto auto auto;
    gap: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(1.5rem, 4vw, 2.5rem) 0 1rem;
  }

  .hero-text {
    min-width: 0;
    align-self: auto;
  }

  .hero-eyebrow {
    font-size: clamp(0.62rem, 1.7vw, 0.72rem);
    margin: 0 0 clamp(1.25rem, 4vw, 2rem);
  }

  .hero-heading {
    max-width: 12ch;
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 0;
  }

  .hero-3d {
    min-height: clamp(280px, 62vw, 440px);
  }

  .hero-ctas {
    width: min(100%, 430px);
    margin-top: 0.5rem;
  }

  .hero-btn {
    width: 100%;
  }

  .hero-social {
    align-self: flex-end;
    justify-content: flex-end;
    margin: 0 var(--home-panel-padding) clamp(1.5rem, 3vh, 2rem);
    padding: 0.75rem 0 0;
  }

  .hero-bg-glow {
    top: 34%;
    right: 5%;
    width: 90%;
    height: 36%;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-logo {
    width: clamp(190px, 58vw, 250px);
  }

  .hero-nav-list {
    gap: 0.55rem 0.8rem;
  }

  .hero-nav-link {
    font-size: 0.75rem;
  }

  .hero-nav-account {
    gap: 0.45rem;
  }

  .hero-content {
    padding-top: 1.25rem;
  }

  .hero-heading {
    font-size: clamp(1.85rem, 9vw, 2.45rem);
    line-height: 1.05;
  }

  .hero-3d {
    min-height: clamp(240px, 68vw, 320px);
  }

  .hero-btn {
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
  }

  .hero-social {
    gap: 0.75rem;
  }

  .hero-social-link {
    width: 2.35rem;
    height: 2.35rem;
  }

  .home-panel--hero::after {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero-header {
    padding-top: 0.5rem;
  }

  .hero-nav-list {
    gap: 0.45rem 0.65rem;
  }

  .hero-nav-link {
    font-size: 0.72rem;
  }

  .hero-heading {
    font-size: clamp(1.75rem, 8.8vw, 2rem);
  }

  .hero-3d {
    min-height: clamp(220px, 70vw, 260px);
  }

  .hero-social {
    align-self: center;
    justify-content: center;
    margin-inline: auto;
  }
}

/* Short desktop viewports */
@media (max-height: 760px) and (min-width: 769px) {
  .home-page {
    --home-header-clearance: clamp(9.5rem, 14vw, 11.5rem);
  }

  .hero-header {
    padding-top: 0.75rem;
  }

  .hero-logo {
    width: clamp(300px, 25vw, 360px);
  }

  .hero-content {
    padding-top: 0;
    padding-bottom: 0.5rem;
  }

  .hero-eyebrow {
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  .hero-heading {
    font-size: clamp(2rem, 3.4vw, 2.65rem);
  }

  .hero-ctas {
    margin-top: 1.75rem;
  }

  .hero-3d {
    min-height: clamp(380px, 54vh, 460px);
  }
}

/* ── 11. Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .page-loader {
    transition: opacity 80ms ease, visibility 0s linear 80ms;
  }

  .grainient-background {
    display: none;
  }

  .splash-cursor-layer {
    display: none;
  }

  .hero-btn::before {
    display: none;
  }

  .hero-btn-arrow {
    transition: none;
  }

  .hero-btn:hover .hero-btn-arrow {
    transform: none;
  }

  .hero-social-link {
    transition: none;
  }

  .hero-nav-link::after {
    transition: none;
  }

  .hero-loader__spinner-svg {
    /* SVG SMIL animations cannot be fully stopped via CSS alone;
       JavaScript handles pausing via prefers-reduced-motion. */
    opacity: 0.75;
  }

  .hero-loader__spinner-svg * {
    animation: none !important;
    animation-duration: 0s !important;
  }

}

/* ── 12. Homepage navigation system ── */
.hero-header {
  --hero-header-compact-height: 43px;
  position: fixed;
  top: clamp(0.6rem, 1.4vw, 1.25rem);
  left: 50%;
  right: auto;
  width: min(calc(100% - (var(--home-panel-padding) * 2)), var(--home-content-width));
  min-height: 6.25rem;
  padding: 0.6rem clamp(0.75rem, 1.5vw, 1.25rem);
  grid-template-columns: minmax(210px, clamp(230px, 19vw, 320px)) clamp(180px, 17vw, 280px) minmax(0, 1fr);
  gap: clamp(0.55rem, 1.2vw, 1.25rem);
  transform: translateX(-50%);
  border: 1px solid transparent;
  border-radius: 1.35rem;
  box-sizing: border-box;
  color: #f4f6f3;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  overflow: visible;
  z-index: 6;
  transition:
    min-height 240ms ease,
    padding 240ms ease,
    gap 240ms ease,
    background-color 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease,
    backdrop-filter 240ms ease;
}

.hero-header.is-scrolled {
  height: var(--hero-header-compact-height, 52px);
  min-height: var(--hero-header-compact-height, 52px);
  padding-block: 0;
  color: #f4f6f3;
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero-logo {
  width: 100%;
  height: 5.25rem;
  position: relative;
  display: block;
  z-index: 2;
  transition: height 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-header.is-scrolled .hero-logo {
  height: 2.25rem;
  width: 100%;
}

.hero-logo-stage {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-logo-img {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 240ms ease, transform 300ms cubic-bezier(0.22, 1, 0.36, 1), filter 240ms ease;
}

.hero-logo-img--full {
  opacity: 1;
  transform: translateY(0) scale(1.08);
  transform-origin: left center;
  filter: blur(0);
}

.hero-logo-img--compact {
  opacity: 0;
  transform: translateY(5px) scale(0.94);
  filter: blur(3px);
}

.hero-header.is-scrolled .hero-logo-img--full {
  opacity: 0;
  transform: translateY(-5px) scale(0.96);
  filter: blur(3px);
}

.hero-header.is-scrolled .hero-logo-img--compact {
  opacity: 1;
  height: 4.5rem;
  width: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-55%);
  filter: blur(0);
}

.hero-header.is-scrolled .hero-logo-stage {
  height: 100%;
  display: flex;
  align-items: center;
  overflow: visible;
}

.hero-nav {
  position: static;
  z-index: 2;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  width: 100%;
  margin: 0;
  overflow: visible;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid rgba(147, 235, 13, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.hero-search--desktop {
  justify-self: stretch;
}

.hero-search--mobile {
  display: none;
}

.hero-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-search__input {
  min-width: 0;
  width: 100%;
  padding: 0.65rem 0 0.65rem 0.9rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
}

.hero-search__input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.hero-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #dfffc2;
  cursor: pointer;
}

.hero-search__submit svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.hero-search:focus-within {
  border-color: rgba(147, 235, 13, 0.9);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: 0 0 0 3px rgba(147, 235, 13, 0.12), 0 0 18px rgba(147, 235, 13, 0.18);
}

.hero-search__submit:focus-visible {
  outline: 2px solid #93eb0d;
  outline-offset: -3px;
}

.hero-nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: clamp(0.25rem, 0.8vw, 0.85rem);
}

.hero-nav-item {
  position: relative;
  flex: 0 0 auto;
}

.hero-nav-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.6rem 0.72rem;
  border: 0;
  border-radius: 999px;
  color: #f4f6f3;
  background: transparent;
  font: inherit;
  font-size: clamp(0.98rem, 0.9vw, 1.08rem);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 0 4px rgba(147, 235, 13, 0.35), 0 0 10px rgba(147, 235, 13, 0.16);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease, text-shadow 180ms ease;
}

.hero-nav-link::after {
  display: none;
}

.hero-nav-link:hover,
.hero-nav-link:focus-visible,
.hero-nav-item.is-open > .hero-nav-trigger {
  color: #111411;
  background: rgba(147, 235, 13, 0.88);
  text-shadow: 0 0 5px rgba(147, 235, 13, 0.85), 0 0 14px rgba(147, 235, 13, 0.5);
  transform: translateY(-1px);
}

.hero-header.is-scrolled .hero-nav-link,
.hero-header.is-scrolled .hero-nav-user {
  color: #f4f6f3;
}

.hero-header.is-scrolled .hero-nav-link:hover,
.hero-header.is-scrolled .hero-nav-link:focus-visible,
.hero-header.is-scrolled .hero-nav-item.is-open > .hero-nav-trigger {
  color: #111411;
}

.hero-nav-link:focus-visible,
.hero-dropdown-link:focus-visible,
.hero-nav-toggle:focus-visible {
  outline: 2px solid #93eb0d;
  outline-offset: 3px;
}

.hero-nav-chevron {
  width: 0.7rem;
  height: 0.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  transition: transform 180ms ease;
}

.hero-nav-item.is-open .hero-nav-chevron,
.hero-nav-item:focus-within .hero-nav-chevron {
  transform: rotate(180deg);
}

.hero-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: min(22rem, calc(100vw - 2rem));
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px) scale(0.98);
  transform-origin: top left;
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 200ms;
}

[data-dropdown-align="end"] .hero-dropdown-panel {
  right: 0;
  left: auto;
  transform-origin: top right;
}

.hero-nav-item.is-open > .hero-dropdown-panel,
.hero-header:not(.is-enhanced) .hero-nav-item:hover > .hero-dropdown-panel,
.hero-header:not(.is-enhanced) .hero-nav-item:focus-within > .hero-dropdown-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.hero-dropdown-inner {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(15, 18, 17, 0.98);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.hero-dropdown-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.72rem;
  color: #f5f7f4;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.hero-dropdown-link strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.hero-dropdown-link span {
  color: #aeb5ae;
  font-size: 0.76rem;
  line-height: 1.4;
}

.hero-dropdown-link:hover,
.hero-dropdown-link:focus-visible {
  color: #93eb0d;
  background: rgba(147, 235, 13, 0.08);
  transform: translateX(2px);
}

.hero-nav-account {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding-left: clamp(0.35rem, 0.8vw, 0.75rem);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-header.is-scrolled .hero-nav-account {
  border-left-color: rgba(255, 255, 255, 0.16);
}

.hero-nav-user {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4f6f3;
  text-shadow: 0 0 7px rgba(147, 235, 13, 0.16);
}

.hero-nav-account-link,
.hero-nav-admin {
  color: #111411;
  background: #93eb0d;
}

.hero-header.is-scrolled .hero-nav-account-link,
.hero-header.is-scrolled .hero-nav-admin {
  color: #111411;
}

.hero-nav-logout {
  min-height: 2.75rem;
  padding: 0.6rem 0.72rem;
  opacity: 1;
  text-shadow: 0 0 7px rgba(147, 235, 13, 0.2);
}

.hero-nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0.72rem;
  color: #f4f6f3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.hero-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 0.25rem 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 160ms ease;
}

.hero-header.is-scrolled .hero-nav-toggle {
  color: #f4f6f3;
  border-color: rgba(255, 255, 255, 0.16);
}

.hero-header.is-menu-open .hero-nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hero-header.is-menu-open .hero-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.hero-header.is-menu-open .hero-nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 1041px) and (max-width: 1320px) {
  .hero-header {
    grid-template-columns: minmax(190px, 220px) minmax(155px, 190px) minmax(0, 1fr);
    gap: 0.45rem;
    padding-inline: 0.7rem;
  }

  .hero-nav {
    gap: 0.4rem;
  }

  .hero-nav-list {
    gap: 0.12rem;
  }

  .hero-nav-link {
    padding-inline: 0.45rem;
    font-size: 0.92rem;
  }

  .hero-nav-account {
    gap: 0.2rem;
    padding-left: 0.25rem;
  }

  .hero-search__input {
    padding-left: 0.7rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1040px) {
  .hero-header {
    grid-template-columns: minmax(190px, 1fr) auto;
    gap: 1rem;
    min-height: 5.5rem;
    padding: 0.45rem 0.65rem;
  }

  .hero-logo {
    width: min(290px, 60vw);
    height: 4.5rem;
  }

  .hero-header.is-scrolled {
    height: auto;
    min-height: var(--hero-header-compact-height, 52px);
  }

  .hero-header.is-scrolled .hero-logo {
    width: min(270px, 58vw);
    height: 2.25rem;
  }

  .hero-nav-toggle {
    display: block;
    justify-self: end;
  }

  .hero-search--desktop {
    display: none;
  }

  .hero-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    display: grid;
    align-items: stretch;
    gap: 0.65rem;
    max-height: min(76vh, 42rem);
    padding: 0.7rem;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background: rgba(15, 18, 17, 0.98);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
    /* Closed by default — JavaScript toggles is-menu-open */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.985);
    transform-origin: top center;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 220ms;
  }

  .hero-header.is-menu-open .hero-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
  }

  .hero-search--mobile {
    display: grid;
    width: 100%;
    min-height: 3rem;
    margin-bottom: 0.15rem;
  }

  .hero-search--mobile .hero-search__input {
    min-height: 3rem;
    font-size: 1rem;
  }

  .hero-search--mobile .hero-search__submit {
    width: 3rem;
    min-width: 3rem;
    min-height: 3rem;
  }

  .hero-nav-list {
    display: grid;
    gap: 0.2rem;
  }

  .hero-nav-link {
    width: 100%;
    min-height: 3rem;
    justify-content: space-between;
    padding-inline: 0.9rem;
    color: #f4f6f3;
    font-size: 1rem;
  }

  .hero-nav-item:hover > .hero-dropdown-panel,
  .hero-nav-item:focus-within > .hero-dropdown-panel {
    visibility: inherit;
    opacity: inherit;
    pointer-events: inherit;
    transform: none;
  }

  .hero-dropdown-panel,
  [data-dropdown-align="end"] .hero-dropdown-panel {
    position: static;
    display: grid;
    grid-template-rows: 0fr;
    width: 100%;
    visibility: visible;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: grid-template-rows 220ms ease, opacity 180ms ease;
  }

  .hero-nav-item.is-open > .hero-dropdown-panel {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }

  .hero-header:not(.is-enhanced) .hero-dropdown-panel {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }

  .hero-dropdown-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 0.4rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .hero-nav-item.is-open .hero-dropdown-inner {
    padding-block: 0.25rem 0.5rem;
  }

  .hero-dropdown-link {
    min-height: 3rem;
    padding: 0.65rem 0.9rem;
  }

  .hero-nav-account {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    padding: 0.65rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .hero-nav-account .hero-nav-link,
  .hero-logout-form {
    flex: 1 1 auto;
  }

  .hero-nav-account .hero-nav-link,
  .hero-nav-logout {
    justify-content: center;
  }

  .hero-nav-account-link,
  .hero-nav-admin {
    color: #111411;
  }
}

/* ============================================
   Panel 2 — Project showcase
   ============================================ */
.home-panel--showcase {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  overflow: clip;
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(4rem, 7vw, 7rem);
  color: #0b0d0f;
  background: #f7f7f4;
}

.home-panel--showcase::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--home-accent);
}

.showcase-trust,
.showcase-container {
  width: min(calc(100% - var(--home-panel-padding) - var(--home-panel-padding)), var(--home-content-width));
  margin-inline: auto;
}

.showcase-trust__label {
  margin: 0;
  color: #3f4549;
  font-size: clamp(0.78rem, 1vw, 0.96rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
}

.logo-loop {
  --logo-loop-gap: 72px;
  --logo-loop-height: 56px;
  --logo-loop-fade-color: #f7f7f4;
  position: relative;
  width: 100%;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.logo-loop__viewport {
  width: 100%;
  min-height: clamp(7rem, 11vw, 10rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.logo-loop:not(.is-enhanced) .logo-loop__viewport {
  overflow-x: auto;
  -webkit-mask-image: none;
  mask-image: none;
}

.logo-loop--fade::before,
.logo-loop--fade::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(1.25rem, 5vw, 5rem);
  pointer-events: none;
}

.logo-loop--fade::before {
  left: 0;
  background: linear-gradient(to right, var(--logo-loop-fade-color), transparent);
}

.logo-loop--fade::after {
  right: 0;
  background: linear-gradient(to left, var(--logo-loop-fade-color), transparent);
}

.logo-loop__track {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--logo-loop-gap);
  width: max-content;
  will-change: transform;
}

.logo-loop__sequence {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--logo-loop-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.logo-loop__item {
  flex: 0 0 auto;
}

.logo-loop__wordmark {
  display: inline-flex;
  align-items: center;
  min-height: var(--logo-loop-height);
  padding-inline: 0.2rem;
  color: #24282b;
  font-size: clamp(1rem, 1.55vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
  transition: color 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-loop__wordmark::before {
  content: '';
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.65rem;
  border-radius: 50%;
  background: var(--home-accent);
  box-shadow: 0 0 0 4px rgba(124, 240, 61, 0.12);
}

.logo-loop--scale-on-hover .logo-loop__item:hover .logo-loop__wordmark {
  color: #050706;
  transform: scale(1.055);
}

.showcase-heading-wrap {
  padding: clamp(3.5rem, 7vw, 7rem) 0 clamp(2rem, 4vw, 3.5rem);
}

.showcase-kicker {
  margin: 0 0 1rem;
  color: #5d6468;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.showcase-heading {
  max-width: 13ch;
  margin: 0;
  color: #0b0d0f;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.project-carousel {
  --carousel-duration: 760ms;
  --preview-width: clamp(180px, 15vw, 230px);
  --preview-height: clamp(250px, 25vw, 340px);
  --preview-gap: clamp(0.8rem, 1.5vw, 1.4rem);
  position: relative;
  height: clamp(440px, 48vw, 620px);
  overflow: hidden;
  border-radius: clamp(1rem, 2vw, 2rem);
  background: #101413;
  box-shadow: 0 30px 80px rgba(16, 23, 20, 0.2);
  isolation: isolate;
  touch-action: pan-y;
}

.project-carousel:focus-visible {
  outline: 3px solid var(--home-accent);
  outline-offset: 5px;
}

.project-carousel__slides {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-carousel__slide {
  position: absolute;
  top: 50%;
  left: 58%;
  width: var(--preview-width);
  height: var(--preview-height);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.15rem;
  opacity: 1;
  transform: translateY(-50%);
  background: #151a18;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
  transition:
    left var(--carousel-duration) cubic-bezier(0.22, 1, 0.36, 1),
    top var(--carousel-duration) cubic-bezier(0.22, 1, 0.36, 1),
    width var(--carousel-duration) cubic-bezier(0.22, 1, 0.36, 1),
    height var(--carousel-duration) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--carousel-duration) cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms ease,
    border-radius var(--carousel-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

.project-carousel__slide:nth-child(4) {
  left: calc(58% + var(--preview-width) + var(--preview-gap));
}

.project-carousel__slide:nth-child(n + 5) {
  left: calc(58% + var(--preview-width) + var(--preview-width) + var(--preview-gap) + var(--preview-gap));
  opacity: 0;
}

.project-carousel__slide.is-underlay,
.project-carousel__slide.is-active,
.project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2) {
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  transform: none;
}

.project-carousel__slide.is-underlay {
  z-index: 0;
  opacity: 0.75;
}

.project-carousel__slide.is-active,
.project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2) {
  z-index: 2;
  opacity: 1;
}

.project-carousel__slide.is-preview {
  z-index: 4;
}

.project-carousel__slide[data-project-theme="graphite"] { background: #181b20; }
.project-carousel__slide[data-project-theme="lime"] { background: #162014; }
.project-carousel__slide[data-project-theme="silver"] { background: #3c4244; }
.project-carousel__slide[data-project-theme="ink"] { background: #111923; }

.project-carousel__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.05);
  user-select: none;
}

.project-carousel__slide.is-active::after,
.project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.52) 42%, rgba(0, 0, 0, 0.08) 72%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent 45%);
}

.project-carousel__content {
  position: absolute;
  top: 50%;
  left: clamp(1.5rem, 4vw, 4rem);
  z-index: 3;
  width: min(38rem, 43%);
  color: #fff;
  visibility: hidden;
  opacity: 0;
  filter: blur(7px);
  transform: translateY(calc(-50% + 18px));
  transition:
    opacity 360ms ease 160ms,
    filter 420ms ease 160ms,
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1) 140ms,
    visibility 0s linear 500ms;
}

.project-carousel__slide.is-active .project-carousel__content,
.project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2) .project-carousel__content {
  visibility: visible;
  opacity: 1;
  filter: blur(0);
  transform: translateY(-50%);
  transition-delay: 230ms, 230ms, 210ms, 0s;
}

.project-carousel__category {
  margin: 0 0 0.9rem;
  color: var(--home-accent);
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.15em;
}

.project-carousel__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 3.5vw, 4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.project-carousel__description {
  max-width: 34rem;
  margin: clamp(0.75rem, 1.5vw, 1.15rem) 0 clamp(1rem, 2vw, 0.95rem);
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.86rem, 1.1vw, 1rem);
  line-height: 1.65;
}

.project-carousel__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--home-accent);
  border-radius: 999px;
  color: #0b0d0f;
  background: var(--home-accent);
  font-size: 0.82rem;
  font-weight: 800;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.project-carousel__cta:hover {
  color: var(--home-accent);
  background: rgba(11, 13, 15, 0.55);
  transform: translateY(-2px);
}

.project-carousel__cta:focus-visible,
.project-carousel__control:focus-visible {
  outline: 3px solid var(--home-accent);
  outline-offset: 3px;
}

.project-carousel__controls {
  position: absolute;
  left: 50%;
  bottom: clamp(0.8rem, 2vw, 1.65rem);
  z-index: 6;
  display: flex;
  gap: 0.7rem;
  transform: translateX(-50%);
}

.project-carousel__control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 10, 9, 0.7);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.project-carousel__control:hover:not(:disabled) {
  color: #0b0d0f;
  border-color: var(--home-accent);
  background: var(--home-accent);
  transform: translateY(-2px);
}

.project-carousel__control:disabled {
  opacity: 0.45;
  cursor: wait;
}

.project-carousel__control svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-carousel__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) {
  .project-carousel {
    height: clamp(420px, 58vw, 560px);
    --preview-width: clamp(145px, 17vw, 180px);
    --preview-height: clamp(200px, 25vw, 260px);
  }

  .project-carousel__slide {
    left: 61%;
  }

  .project-carousel__slide:nth-child(4) {
    left: calc(61% + var(--preview-width) + var(--preview-gap));
  }

  .project-carousel__content {
    width: 48%;
  }
}

@media (max-width: 768px) {
  .home-panel--showcase {
    padding-block: clamp(3.5rem, 10vw, 5rem);
  }

  .showcase-trust,
  .showcase-container {
    width: min(calc(100% - 1.5rem), 620px);
  }

  .logo-loop__viewport {
    min-height: clamp(6.75rem, 24vw, 9rem);
  }

  .showcase-heading-wrap {
    padding: clamp(3rem, 10vw, 4.5rem) 0 clamp(1.75rem, 6vw, 2.5rem);
  }

  .showcase-heading {
    max-width: 11ch;
    font-size: clamp(2.5rem, 10.5vw, 4.4rem);
  }

  .project-carousel {
    height: clamp(480px, 120vw, 620px);
    border-radius: 1.1rem;
  }

  .project-carousel__slide,
  .project-carousel__slide:nth-child(4),
  .project-carousel__slide:nth-child(n + 5) {
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    transform: none;
  }

  .project-carousel__slide.is-active,
  .project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .project-carousel__slide.is-active::after,
  .project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2)::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 52%, rgba(0, 0, 0, 0.08) 82%);
  }

  .project-carousel__image {
    object-fit: contain;
    object-position: center 18%;
  }

  .project-carousel__content {
    top: auto;
    right: 1.2rem;
    bottom: 6.25rem;
    left: 1.2rem;
    width: auto;
    transform: translateY(16px);
  }

  .project-carousel__slide.is-active .project-carousel__content,
  .project-carousel:not(.is-enhanced) .project-carousel__slide:nth-child(2) .project-carousel__content {
    transform: translateY(0);
  }

  .project-carousel__title {
    font-size: clamp(2.15rem, 9vw, 3.7rem);
  }

  .project-carousel__description {
    max-width: 34rem;
    margin-block: 0.9rem 1.1rem;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .project-carousel__controls {
    bottom: 1.15rem;
  }
}

@media (max-width: 480px) {
  .showcase-trust,
  .showcase-container {
    width: calc(100% - 1rem);
  }

  .showcase-trust__label {
    padding-inline: 0.75rem;
  }

  .showcase-heading {
    font-size: clamp(2.3rem, 11.5vw, 3.45rem);
  }

  .project-carousel {
    height: clamp(500px, 145vw, 600px);
  }

  .project-carousel__content {
    right: 1rem;
    bottom: 5.8rem;
    left: 1rem;
  }

  .project-carousel__category {
    margin-bottom: 0.65rem;
    font-size: 0.62rem;
  }

  .project-carousel__title {
    font-size: clamp(2rem, 10vw, 2.9rem);
  }

  .project-carousel__description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .project-carousel__control {
    width: 3rem;
    height: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-loop__viewport {
    min-height: 0;
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .logo-loop--fade::before,
  .logo-loop--fade::after,
  .logo-loop.is-reduced-motion [data-logo-loop-clone] {
    display: none;
  }

  .logo-loop__track,
  .logo-loop__sequence {
    width: 100%;
    transform: none !important;
  }

  .logo-loop__sequence {
    flex-wrap: wrap;
    justify-content: center;
    padding-block: 1.5rem;
  }

  .logo-loop__wordmark,
  .project-carousel__slide,
  .project-carousel__content {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .project-carousel__content,
  .project-carousel__slide.is-active .project-carousel__content {
    filter: none;
  }
}

@media (max-width: 768px) {
  .home-panel--hero {
    padding-top: 5.5rem;
  }

  .hero-header {
    top: 0.45rem;
    width: calc(100% - 1rem);
    min-height: 5rem;
  }

  .hero-logo {
    width: min(250px, 68vw);
    height: 4.15rem;
  }

  .hero-header.is-scrolled {
    min-height: 4.5rem;
  }

  .hero-header.is-scrolled .hero-logo {
    width: min(230px, 64vw);
    height: 3.65rem;
  }
}

@media (max-width: 430px) {
  .hero-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero-logo {
    width: min(220px, 68vw);
  }

  .hero-header.is-scrolled .hero-logo {
    width: min(200px, 62vw);
  }
}
@media (max-width: 760px) {
  .project-carousel {
    height: clamp(430px, 118vw, 540px);
  }

  .project-carousel__content {
    top: auto;
    bottom: 5rem;
    left: 1.25rem;
    width: calc(100% - 2.5rem);
    transform: none;
  }

  .project-carousel__slide.is-active .project-carousel__content,
  .project-carousel:not(.is-enhanced)
    .project-carousel__slide:nth-child(2)
    .project-carousel__content {
    transform: none;
  }

  .project-carousel__title {
    font-size: clamp(2rem, 10vw, 3.25rem);
  }
}
/* Mobile hero composition */
@media (max-width: 768px) {
  .home-panel--hero {
    min-height: 100svh;
    height: auto;
    padding-bottom: 1rem;
    overflow: visible;
  }

  .hero-content {
    flex: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "ctas"
      "stage";
    grid-template-rows: auto auto auto;
    row-gap: 0;
    width: min(calc(100% - 1.5rem), 520px);
    margin-inline: auto;
    padding: clamp(0.65rem, 1.5svh, 0.9rem) 0 0;
  }

  .hero-text {
    width: 100%;
    max-width: none;
  }

  .hero-eyebrow {
    margin: 0 0 clamp(0.4rem, 1svh, 0.65rem);
    padding-bottom: 0.4rem;
    font-size: clamp(0.72rem, 2.2vw, 0.86rem);
    line-height: 1.2;
  }

  .hero-heading {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2rem, 8.5vw, 3rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
  }

  .hero-ctas {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 0.65rem;
    margin-top: clamp(1rem, 2.2svh, 1.35rem);
  }

  .hero-btn {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1.1rem;
  }

  .hero-3d {
    width: 100%;
    height: clamp(260px, 68vw, 400px);
    min-height: 0;
    margin-top: clamp(0.5rem, 1.2svh, 0.75rem);
  }

  .hero-canvas {
    width: 100%;
    height: 100%;
    max-width: 100%;
  }

  .hero-social {
    position: static;
    align-self: auto;
    justify-content: flex-end;
    width: min(calc(100% - 1.5rem), 520px);
    margin: clamp(0.4rem, 1svh, 0.65rem) auto 0;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .hero-heading {
    font-size: clamp(1.9rem, 8.5vw, 2.45rem);
  }

  .hero-btn {
    padding-inline: 1rem;
    font-size: 0.88rem;
  }

  .hero-3d {
    height: clamp(250px, 68vw, 320px);
  }
}

@media (max-width: 430px) {
  .hero-social {
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .hero-content,
  .hero-social {
    width: calc(100% - 1rem);
  }

  .hero-heading {
    font-size: clamp(1.8rem, 8.2vw, 2rem);
  }

  .hero-3d {
    height: clamp(240px, 68vw, 280px);
  }
}

@media (max-width: 768px) and (max-height: 760px) {
  .hero-heading {
    font-size: clamp(1.8rem, 8vw, 2.7rem);
  }

  .hero-ctas {
    margin-top: 0.85rem;
  }

  .hero-3d {
    height: clamp(220px, 31svh, 280px);
    margin-top: 0.4rem;
  }
}

body.is-home-nav-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero-header,
  .hero-logo-img,
  .hero-nav-link,
  .hero-search,
  .hero-nav-chevron,
  .hero-dropdown-panel,
  .hero-dropdown-link,
  .hero-nav-toggle span,
  .hero-nav {
    transition-duration: 0.01ms;
  }

  .desktop-break {
    display: inline;
  }
  
  @media (max-width: 768px) {
    .desktop-break {
      display: none;
    }
  
    .hero-heading {
      white-space: normal;
      max-width: 100%;
    }
  }

}

.hero-header.is-scrolled .hero-search--desktop {
  width: clamp(11rem, 17vw, 17.5rem);
  height: 2rem;
  min-height: 2rem;
  padding: 0;
  align-self: center;
}

.hero-header.is-scrolled .hero-search--desktop input {
  height: 100%;
  min-height: 0;
  padding: 0.25rem 2.1rem 0.25rem 0.8rem;
  font-size: 0.75rem;
  line-height: 1;
}

.hero-header.is-scrolled .hero-search--desktop button {
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
}

.hero-header.is-scrolled .hero-search--desktop svg {
  width: 0.85rem;
  height: 0.85rem;
}

.hero-header.is-scrolled .hero-nav {
  gap: clamp(0.65rem, 1.1vw, 1.15rem);
  height: 100%;
  align-items: center;
}
.hero-header.is-scrolled .hero-nav a {
  font-size: 0.78rem;
  line-height: 1;
  padding-block: 0.25rem;
  white-space: nowrap;
}
.hero-header.is-scrolled .hero-nav__link {
  font-size: 0.78rem;
  line-height: 1;
  padding-block: 0.25rem;
}
.hero-header.is-scrolled .hero-nav svg {
  width: 0.75rem;
  height: 0.75rem;
}
.hero-header.is-scrolled .hero-cart,
.hero-header.is-scrolled .hero-account,
.hero-header.is-scrolled .hero-user {
  font-size: 0.76rem;
  line-height: 1;
}
.hero-header.is-scrolled .hero-cart svg,
.hero-header.is-scrolled .hero-account svg {
  width: 0.95rem;
  height: 0.95rem;
}
/* Enlaces y botones del menú principal */
.hero-header.is-scrolled .hero-nav a,
.hero-header.is-scrolled .hero-nav button,
.hero-header.is-scrolled .hero-nav [role="button"] {
  font-size: 0.78rem;
  line-height: 1;
  padding-block: 0.2rem;
  white-space: nowrap;
}

/* Botones que abren submenús: Servicios y Nosotros */
.hero-header.is-scrolled .hero-nav-toggle,
.hero-header.is-scrolled .hero-nav__toggle,
.hero-header.is-scrolled [data-nav-dropdown-toggle] {
  font-size: 0.78rem;
  line-height: 1;
  padding-block: 0.2rem;
  gap: 0.25rem;
}

/* Flechas de Servicios y Nosotros */
.hero-header.is-scrolled .hero-nav-toggle svg,
.hero-header.is-scrolled .hero-nav__toggle svg,
.hero-header.is-scrolled [data-nav-dropdown-toggle] svg {
  width: 0.7rem;
  height: 0.7rem;
}

/* Usuario, pedidos y salir */
.hero-header.is-scrolled .hero-account,
.hero-header.is-scrolled .hero-user,
.hero-header.is-scrolled .hero-user-menu,
.hero-header.is-scrolled .hero-logout,
.hero-header.is-scrolled a[href="/auth/logout"],
.hero-header.is-scrolled form[action="/auth/logout"] button {
  font-size: 0.78rem;
  line-height: 1;
  padding-block: 0.2rem;
}

/* ═══════════════════════════════════════════════
   Panel 3: Services Circular Carousel
   ═══════════════════════════════════════════════ */

.home-panel--services {
  position: relative;
  background: radial-gradient(ellipse at 50% 55%, rgba(124, 240, 61, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.25rem) var(--home-panel-padding) clamp(1.5rem, 3vw, 2.25rem);
}

.services-container {
  width: min(100%, 1440px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Heading */
.services-heading {
  text-align: center;
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.services-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--home-accent);
  margin: 0 0 0.25rem;
}

.services-title {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: #f6f8f5;
  margin: 0 0 0.3rem;
}

.services-desc {
  font-size: 0.95rem;
  color: rgba(246, 248, 245, 0.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.45;
}

/* Carousel stage */
.services-carousel {
  --service-card-width: 280px;
  --service-card-height: 470px;
  position: relative;
  width: 100%;
  height: clamp(520px, 42vw, 570px);
  min-height: 520px;
  margin: 0 auto;
  outline: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

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

/* Dragging */
.circ-carousel--dragging {
  cursor: grabbing;
}

/* Carousel generated elements */
.circ-carousel__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.circ-carousel__track {
  position: absolute;
  inset: 0;
}

/* Service card */
.circ-carousel__card {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  width: var(--service-card-width);
  height: var(--service-card-height);
  padding: 1.6rem;
  border-radius: 1rem;
  background: rgba(17, 21, 19, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 320ms ease, border-color 320ms ease;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  will-change: transform, opacity;
  pointer-events: auto;
  overflow: hidden;
}

/* Subtle backdrop blur on supporting browsers */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .circ-carousel__card {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.circ-carousel__card.circ-carousel__card--active {
  border-color: rgba(124, 240, 61, 0.45);
  box-shadow:
    0 0 48px rgba(124, 240, 61, 0.1),
    0 20px 50px rgba(0, 0, 0, 0.32);
}

/* Icon badge */
.svc-card__badge {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.65rem;
  background: rgba(124, 240, 61, 0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  flex-shrink: 0;
}

.svc-card__badge-icon {
  width: 1.65rem;
  height: 1.65rem;
  color: var(--home-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.svc-card__badge-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Card title */
.svc-card__title {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.45rem;
  font-weight: 800;
  color: #f6f8f5;
  margin: 0 0 0.9rem;
  line-height: 1.12;
}

/* Card description */
.svc-card__desc {
  font-size: 0.94rem;
  color: rgba(246, 248, 245, 0.68);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex: 1;
  overflow-wrap: anywhere;
}

/* Card CTA */
.svc-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--home-accent);
  margin-top: auto;
  flex-shrink: 0;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.svc-card__cta:hover {
  color: #a4ff72;
}

.svc-card__cta:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 4px;
}

.svc-card__cta svg {
  flex-shrink: 0;
}

.services-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Controls */
.services-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.4rem;
}

.services-control {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(22, 27, 24, 0.85);
  color: #f6f8f5;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
  padding: 0;
}

.services-control:hover:not(:disabled) {
  border-color: var(--home-accent-dim);
  background: rgba(124, 240, 61, 0.08);
}

.services-control:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 2px;
}

.services-control:disabled {
  opacity: 0.3;
  cursor: default;
}

.services-control svg {
  width: 1.1rem;
  height: 1.1rem;
  pointer-events: none;
}

@media (max-width: 1199px) {
  .services-container {
    width: min(100%, 1040px);
  }

  .services-carousel {
    --service-card-width: 250px;
    --service-card-height: 440px;
    height: 500px;
    min-height: 500px;
  }
}

/* Responsive */
@media (max-width: 767px) {
  .home-panel--services {
    padding-inline: 0;
  }

  .services-heading,
  .services-controls {
    padding-inline: var(--home-panel-padding);
  }

  .services-carousel {
    --service-card-width: min(280px, calc(100vw - 64px));
    --service-card-height: 430px;
    height: 470px;
    min-height: 470px;
  }

  .circ-carousel__card {
    border-radius: 0.85rem;
    padding: 1.35rem;
  }

  .svc-card__badge {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }

  .svc-card__badge-icon {
    width: 1.4rem;
    height: 1.4rem;
  }

  .svc-card__title {
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
  }

  .svc-card__desc {
    font-size: 0.86rem;
    margin-bottom: 1rem;
  }

  .svc-card__cta {
    font-size: 0.76rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .circ-carousel__card {
    transition: box-shadow 100ms linear, border-color 100ms linear;
  }
}
