:root {
  --terracotta: #D36A2E;
  --fuchsia: #D64B78;
  --sage: #7A8F3A;
  --gold: #F2B84B;
  --bg: #FBF5EC;
  --white: #FFFFFF;
  --text: #2F2722;
  --muted: #4a5568;
  /* Darker for better contrast (was #6B7280) */
  --overlay-dark: rgba(0, 0, 0, 0.55);

  --font-head: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --radius: 18px;
  --nav-height: 60px;
  /* Premium smooth shadow (multi-layer) */
  --shadow:
    0 1px 2px rgba(47, 39, 34, 0.04),
    0 4px 8px rgba(47, 39, 34, 0.04),
    0 12px 24px rgba(47, 39, 34, 0.04),
    0 24px 48px rgba(47, 39, 34, 0.03);
  --shadow-hover:
    0 2px 4px rgba(47, 39, 34, 0.04),
    0 8px 16px rgba(47, 39, 34, 0.04),
    0 24px 48px rgba(47, 39, 34, 0.05),
    0 48px 96px rgba(47, 39, 34, 0.06);

  --transition-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);

}



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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

body {
  padding-top: var(--nav-height);
}

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

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--text);
  color: var(--white);
  border-radius: 10px;
  z-index: 10000;
  text-decoration: none;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  margin: 0 0 0.5em;
  font-weight: 600;
}

p {
  margin: 0.6em 0;
}

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

a:hover {
  text-decoration: underline;
}

/* HEADER */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(251, 245, 236, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: transform 0.45s ease, opacity 0.45s ease;
  border-bottom: 1px solid rgba(231, 221, 206, 0.9);
  will-change: transform;
}

.auto-hide.hide {
  transform: translateY(-120%);
  opacity: 0;
}

/* Center nav links */
.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  /* logo | centered menu | toggle */
  align-items: center;
  width: 100%;
  gap: 10px;
}

.nav-logo {
  height: 48px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 500;
}

.nav-menu .nav-link {
  color: var(--terracotta);
  transition: color 0.35s ease;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link:focus {
  color: var(--fuchsia);
}

.nav-menu .nav-link.active {
  color: var(--fuchsia) !important;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
}

/* HERO */
.hero {
  padding: 52px 0 34px;
  text-align: center;
  overflow: hidden;
}

@keyframes heroFloat {
  0% {
    transform: translateX(-10%);
  }

  50% {
    transform: translateX(10%);
  }

  100% {
    transform: translateX(-10%);
  }
}

.hero-animate {
  display: inline-block;
  animation: heroFloat 9.33s ease-in-out infinite;
  animation-delay: 120ms;
  will-change: transform;
}


.hero-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.hero-logo {
  width: min(420px, 80vw);
  /* Reduced from 520px to tighten layout */
  height: auto;
  /* Removed aspect-ratio: 1/1 to use natural image dimensions */
}

.hero-slogan {
  color: var(--sage);
  font-size: 1.2rem;
  font-family: var(--font-head);
  font-weight: 600;
  margin-top: 6px;
}

.hero-lead {
  max-width: 70ch;
  margin: 0.7rem auto;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .hero-animate {
    transform: translateX(0);
  }
}

@media (max-width: 900px) {

  .service-card,
  .service-front,
  .service-back {
    height: auto;
    max-height: none;
  }
}

.trust-strip {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.trust-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(231, 221, 206, 0.9);
  background: rgba(255, 255, 255, 0.75);
  font-family: var(--font-head);
  font-weight: 550;
  color: var(--terracotta);
  font-size: 0.8rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  padding: 0.72rem 1.15rem;
}

.btn--primary {
  background: var(--fuchsia);
  color: var(--white);
  border: 1px solid var(--fuchsia);
  transition: background 0.35s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.btn--primary:hover {
  background: #b03d6a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(214, 75, 120, 0.3);
}

.btn--link {
  border: 1px solid rgba(214, 75, 120, 0.35);
  color: var(--fuchsia);
  background: rgba(255, 255, 255, 0.6);
}

/* SECTIONS */
.section {
  padding: 40px 0;
}

.section--alt {
  background: var(--white);
  border-top: 1px solid rgba(231, 221, 206, 0.9);
  border-bottom: 1px solid rgba(231, 221, 206, 0.9);
}

.section__head h2 {
  color: var(--terracotta);
}

.section__head p {
  color: var(--muted);
  max-width: 72ch;
  margin-top: 0.3em;
}

/* Center heading + lead in Who We Are section */
#equipo .section__head {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Trust cards */
.trust-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.trust-card {
  background: var(--white);
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.trust-card h3 {
  color: var(--terracotta);
  margin-bottom: 8px;
}

/* Mesh Gradient Animation — COMPOSITED VERSION */
@keyframes meshMove {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-25%);
  }

  100% {
    transform: translateX(0);
  }
}

#servicios {
  position: relative;
  overflow: hidden;
}

#servicios::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 200%;
  height: 100%;
  background:
    radial-gradient(at 0% 0%, rgba(214, 75, 120, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(211, 106, 46, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(122, 143, 58, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(242, 184, 75, 0.08) 0px, transparent 50%);
  animation: meshMove 20s ease infinite;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
}

/* Limit CPU usage on low-power devices */
@media (prefers-reduced-motion: reduce) {
  #servicios {
    background: radial-gradient(circle at center, rgba(214, 75, 120, 0.03), transparent 70%);
    animation: none;
  }
}

/* =========================================================
   SERVICES GRID — FULL RESPONSIVE DROP-IN (CORRECTED)
   ========================================================= */

/* ========================
   GRID BASE
   ======================== */

.services-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

/* Tablet */
@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(300px, auto);
  }

  .services-expand {
    grid-auto-flow: dense;
  }
}

/* Ultra-wide guard */
@media (min-width: 1400px) {
  .services-grid {
    max-width: 1200px;
    margin-inline: auto;
  }
}

/* ========================
   SERVICE CARD BASE
   ======================== */

.service-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  aspect-ratio: 1 / 1;
  transition: box-shadow 0.25s ease;
  outline: none;
}

.service-card:hover {
  box-shadow: 0 18px 36px rgba(47, 39, 34, 0.14);
}

/* Click / hit layer */
.service-hit {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  color: transparent;
  font-size: 0;
}

/* ========================
   FRONT / MEDIA (FIXED)
   ======================== */

.service-front {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-front>* {
  margin-top: auto;
}

.service-front h3,
.service-front p {
  color: #fff;
}

/* 🔧 FIX: end-aligned text */
.service-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: stretch;
  padding: 8px;
}

.service-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* ⬅ forces bottom alignment */
  height: 100%;
}

.service-front h3,
.service-front p {
  margin-top: 0;
}

/* Overlay */
.service-shade {
  position: absolute;
  inset: 0;
  background: var(--overlay-dark);
  transition: background 0.25s ease;
}

.service-card:hover .service-shade {
  background: rgba(0, 0, 0, 0.65);
}

/* ========================
   DETAIL PANEL
   ======================== */

.service-detail {
  position: absolute;
  inset: 0;
  padding: 16px;
  background: rgba(251, 245, 236, 0.98);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  z-index: 3;
  overflow-y: auto;
}

.service-detail h3 {
  color: var(--terracotta);
  margin-bottom: 8px;
}

.service-detail ul {
  margin: 0.3rem 0 0.6rem;
  padding-left: 1.2rem;
}

.service-detail li {
  margin: 0.35rem 0;
}

/* ========================
   EXPANDED STATE
   ======================== */

.service-card.is-expanded .service-front {
  opacity: 0;
  pointer-events: none;
}

.service-card.is-expanded {
  z-index: 10;
}

.service-card.is-expanded .service-detail {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.service-card.is-expanded .service-shade {
  background: rgba(0, 0, 0, 0.80);
}

.service-card {
  isolation: isolate;
}

/* ========================
   MOBILE — INLINE EXPANSION
   ======================== */

@media (max-width: 599px) {
  .service-card {
    aspect-ratio: 16 / 12;
  }

  .service-card.is-expanded {
    aspect-ratio: auto;
    height: auto;
    position: relative;
  }

  .service-detail {
    position: static;
    transform: none;
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Force single-column stack */
  .services-grid,
  .services-expand {
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
  }

  /* Disable ALL grid spanning on mobile */
  .service-card,
  .service-card.is-expanded {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
}

@media (max-width: 520px) {
  .team-bio img {
    width: 84px;
    height: 84px;
    object-position: center 28%;
  }
}

/* ========================
   TABLET — INLINE EXPANSION
   ======================== */

@media (min-width: 600px) and (max-width: 991px) {
  .service-card {
    aspect-ratio: 16 / 12;
  }

  .service-card.is-expanded {
    grid-column: auto;
    /* ⬅ no grid spanning */
    aspect-ratio: auto;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .service-card.is-expanded {
    height: auto;
  }

  .service-card.is-expanded .service-detail {
    position: static;
    transform: none;
    max-height: 70vh;
    overflow-y: auto;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .service-card.is-expanded .service-shade {
    opacity: 0;
    pointer-events: none;
  }
}

@media (min-width: 600px) and (max-width: 991px) {
  .service-card.is-expanded {
    min-height: 360px;
  }
}

/* ========================
   TABLET — PREVENT IMAGE BLEED
   ======================== */

@media (min-width: 600px) and (max-width: 991px) {

  /* Expanded card grows — front must grow with it */
  .service-card.is-expanded .service-front {
    height: 100%;
    overflow: hidden;
  }

  /* Ensure detail fully covers the card */
  .service-card.is-expanded .service-detail {
    inset: 0;
    height: 100%;
  }
}


/* ========================
   DESKTOP — 4×2 GRID (NO ROW 3)
   ======================== */

@media (min-width: 992px) {
  .service-card {
    aspect-ratio: auto;
  }


}



/* Expanded card = 2×2 */
.service-card.is-expanded {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* Let content define height */
.service-card.is-expanded .service-detail {
  max-height: none;
}

/* Expanded layout mode */
.services-expand.has-expanded {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  /* ⬅ exactly 2 rows */
}

.services-expand.has-expanded .service-card.is-expanded {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}

/* Remaining cards stay within row 1–2 only */
.services-expand.has-expanded .service-card:not(.is-expanded) {
  aspect-ratio: 1 / 1;
}



/* ========================
   TEAM BIO
   ======================== */

.team-bio {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid rgba(231, 221, 206, 0.9);
}

.team-bio img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  /* 🔑 subtle vertical lift */
  border: 1px solid rgba(231, 221, 206, 0.9);
  box-shadow: 0 10px 22px rgba(47, 39, 34, 0.08);
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.7);
}


.team-name {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--fuchsia);
}

.team-role {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--terracotta);
  margin-top: 2px;
}

.team-text {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Stack bio on very small screens */
@media (max-width: 520px) {
  .team-bio {
    flex-direction: column;
  }

  .team-bio img {
    width: 84px;
    height: 84px;
  }
}

/* ========================
   MOBILE — EXPANDED STACK FIX
   ======================== */

@media (max-width: 599px) {

  /* Force single-column grid ALWAYS */
  .services-grid,
  .services-expand,
  .services-expand.has-expanded {
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
  }

  /* Reset ALL card positioning */
  .services-expand.has-expanded .service-card,
  .services-expand.has-expanded .service-card.is-expanded {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  /* Ensure expanded card stays first */
  .services-expand.has-expanded .service-card.is-expanded {
    order: -1;
  }
}

@media (max-width: 599px) {

  /* Single-column, linear flow */
  .services-grid,
  .services-expand,
  .services-expand.has-expanded {
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
  }

  /* Disable ALL desktop / tablet expansion logic */
  .services-expand.has-expanded .service-card,
  .services-expand.has-expanded .service-card.is-expanded {
    grid-column: auto !important;
    grid-row: auto !important;
    order: initial !important;
  }

  /* Prevent ordering maps from applying */
  .services-expand.has-expanded[class*="expanded-"] .service-card {
    grid-row: auto !important;
  }

  /* Expanded card opens IN PLACE */
  .service-card.is-expanded {
    position: static !important;
    aspect-ratio: auto;
    height: auto;
  }

  .service-card.is-expanded,
  .service-card.is-expanded .service-front,
  .service-card.is-expanded .service-detail {
    height: auto;
    overflow: visible;
  }

  /* Detail flows naturally below the image */
  .service-detail {
    position: static;
    transform: none;
    max-height: none;
    overflow: visible;
  }
}



/* CTA panel */
.cta-panel {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
}

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

/* BLOG preview */
.blog-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.blog-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  background: var(--white);
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 12px;
}

.blog-card img {
  border-radius: 14px;
  width: 100%;
  height: 92px;
  object-fit: cover;
}

/* TIMELINE */
#enfoque.section--alt {
  background:
    var(--white),
    radial-gradient(900px 320px at 105% -10%, rgba(122, 143, 58, 0.08), transparent 60%),
    radial-gradient(900px 320px at -5% 110%, rgba(242, 184, 75, 0.08), transparent 60%);
  background-blend-mode: normal;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-titles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.timeline-title {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(231, 221, 206, 0.9);
  background: rgba(251, 245, 236, 0.9);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  font-family: var(--font-head);
}

.timeline-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(214, 75, 120, 0.12);
  color: var(--fuchsia);
  font-weight: 800;
}

.timeline-label {
  color: var(--terracotta);
  font-weight: 800;
}

.timeline-title:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 75, 120, 0.35);
}

.timeline-title.is-active {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(214, 75, 120, 0.55);
  transform: scale(1.03);
}

.timeline-panel {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
  min-height: 190px;
}

.timeline-content h3 {
  color: var(--terracotta);
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--muted);
  max-width: 75ch;
}

.timeline-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
}

.timeline-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(231, 221, 206, 0.9);
  background: rgba(251, 245, 236, 0.95);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-arrow:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 75, 120, 0.45);
}

.timeline-progress {
  margin-top: 14px;
  height: 8px;
  background: rgba(231, 221, 206, 0.65);
  border-radius: 999px;
  overflow: hidden;
}

.timeline-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(214, 75, 120, 0.55);
  border-radius: 999px;
  transform-origin: left;
}

@media (min-width: 992px) {
  .timeline {
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
  }

  .timeline-titles {
    position: sticky;
    top: calc(var(--nav-height) + 16px);
  }
}

/* INSTAGRAM */
.insta-embeds {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* CONTACT FORM */
.form {
  background: var(--white);
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}

label {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 6px;
}

input,
textarea {
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: var(--radius);
  padding: 0.72rem 0.85rem;
  font-family: var(--font-body);
}

textarea {
  resize: vertical;
}

#contact-success {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  margin-top: 12px;
}

#contact-success.show {
  opacity: 1;
  transform: translateY(0);
}

/* LEGAL FOOTER (compact) */
.legal-footer {
  padding: 22px 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(231, 221, 206, 0.9);
}

.legal-footer__inner {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.legal-footer__name {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--terracotta);
  font-size: 1.05rem;
}

.legal-footer__label {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.legal-footer__link {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--fuchsia);
}

@media (min-width: 900px) {
  .legal-footer__inner {
    grid-template-columns: 1.1fr 0.9fr 1.6fr;
    align-items: start;
  }
}

/* FOOTER */
.site-footer {
  padding: 16px 0;
  background: rgba(251, 245, 236, 0.95);
  border-top: 1px solid rgba(231, 221, 206, 0.9);
}

/* MOBILE NAV */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    justify-content: start;
    /* mobile left aligned */
    background: rgba(251, 245, 236, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(231, 221, 206, 0.9);
    display: grid;
    gap: 10px;
    padding: 12px 16px;

    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      transform 0.25s ease;
    z-index: 1000;
  }

  .nav-menu.open {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-menu .nav-link {
    padding: 10px 6px;
  }
}

/* ===================== LANGUAGE SWITCHER (i18n layer) ===================== */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lang-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(231, 221, 206, 0.9);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--terracotta);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 75, 120, 0.35);
}

.lang-btn.active {
  color: var(--white);
  border-color: var(--fuchsia);
}

.lang-btn.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fuchsia);
  border-radius: inherit;
  z-index: -1;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lang-flag {
  width: 22px;
  height: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  overflow: hidden;

  line-height: 1;
  font-size: 15px;
  /* normalize emoji size */

  background: rgba(255, 255, 255, 0.35);

  /* polish */
  box-sizing: border-box;
  flex-shrink: 0;
}


.lang-flag.ca {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  transform: scale(0.75);
  transform-origin: center;
  background: linear-gradient(to bottom,
      #FFD400 0%,
      #FFD400 20%,
      #DA121A 20%,
      #DA121A 40%,
      #FFD400 40%,
      #FFD400 60%,
      #DA121A 60%,
      #DA121A 80%,
      #FFD400 80%,
      #FFD400 100%);
  color: transparent;
}

.lang-code {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* small screens: keep switcher compact */
@media (max-width: 900px) {
  .lang-switcher {
    gap: 6px;
  }

  .lang-btn {
    padding: 5px 8px;
  }

  .lang-code {
    font-size: 0.82rem;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* PROJECT MODAL */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal[aria-hidden="true"] {
  display: none;
}

.project-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 39, 34, 0.55);
  backdrop-filter: blur(4px);
}

.project-modal__content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 520px;
  width: calc(100% - 32px);
  z-index: 1;
}

.project-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.project-steps {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.project-step {
  padding: 12px;
  border: 1px solid rgba(231, 221, 206, 0.9);
  border-radius: 12px;
}

.project-step.active {
  border-color: var(--fuchsia);
  background: rgba(214, 75, 120, 0.08);
}

.project-step .status {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.85rem;
  color: var(--fuchsia);
  font-weight: 700;
}

/* Project progress footer button */
.project-progress-btn {
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;

  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(0, 0, 0, 0.12);

  cursor: pointer;
  transition: all 0.2s ease;
}

.project-progress-btn:hover,
.project-progress-btn:focus-visible {
  color: var(--text);
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}


.project-progress-btn:focus-visible {
  outline: none;
}

/* ========================
   SCROLL REVEAL ANIMATIONS
   ======================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========================
   TOAST NOTIFICATIONS
   ======================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  /* Desktop */
  background: var(--white);
  color: var(--terracotta);
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s var(--transition-smooth), opacity 0.4s ease;
  z-index: 2000;
  border: 1px solid rgba(231, 221, 206, 0.9);
  font-weight: 500;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}