/* ===== Tokens ===== */
:root {
  color-scheme: dark;
  --bg: #0c0c0e;
  --bg-2: #121215;
  --panel: #1a1a1f;
  --panel-2: #212128;
  --line: #2c2c34;
  --accent: #e2202e;
  --accent-dark: #b71822;
  --text: #ececef;
  --muted: #9a9aa4;
  --heading-strong: #f4f4f6;
  --header-bg: rgba(12, 12, 14, 0.92);
  --hero-a: #0c0c0e;
  --hero-b: #1c1d22;
  --hero-c: #26272e;
  --hero-tint: rgba(37, 99, 235, 0.16);
  --hero-grid: rgba(255, 255, 255, 0.03);
  --thumb-bg: #17181c;
  --heading: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --display: "Teko", "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1180px;
}

/* ===== Light theme ===== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef0f3;
  --line: #e0e2e8;
  --text: #17181c;
  --muted: #5b5d67;
  --heading-strong: #0f1013;
  --header-bg: rgba(255, 255, 255, 0.9);
  --hero-a: #eef1f6;
  --hero-b: #e2e7f0;
  --hero-c: #d2dae8;
  --hero-tint: rgba(37, 99, 235, 0.12);
  --hero-grid: rgba(0, 0, 0, 0.05);
  --thumb-bg: #e6e8ec;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-dark);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-lg {
  font-size: 15px;
  padding: 17px 34px;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition:
    background 0.45s ease,
    backdrop-filter 0.45s ease,
    border-color 0.45s ease;
}
/* Home page, parked at the very top: the bar dissolves into the hero and the
   logo blows up so it reads as part of the hero art (see mock). The moment the
   page scrolls, `.scrolled` is added (site.js) and it collapses into the bar. */
body.has-hero .site-header:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 2px;
  color: var(--heading-strong);
  border: 3px solid var(--accent);
  padding: 6px 10px 4px;
  line-height: 1;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--heading);
  font-size: 15px;
  letter-spacing: 2px;
}
.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--accent);
}
.brand-logo {
  height: 40px; /* header default: SQC monogram (logo-mark.png, ~3.7:1) */
  width: auto;
  display: block;
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-logo-lg {
  height: 78px; /* footer / error pages: full lockup (logo-stacked.png, ~2.1:1) */
}

/* Header logo swap. The monogram (logo-mark.png) lives in the bar. On the home
   page parked at the very top, the full stacked lockup (logo-stacked.png) takes
   its place, oversized, as part of the hero art (see mock). `.scrolled`
   (added by site.js on scroll) cross-fades + zooms back to the monogram:
   the lockup shrinks toward the bar while the monogram grows down into place. */
.brand--dual {
  position: relative;
}
.brand--dual .brand-logo--mark {
  transform-origin: left center;
}
.brand--dual .brand-logo--stacked {
  position: absolute;
  left: 0;
  top: 4px;
  height: 180px; /* logo-stacked.png ~2.14:1 -> ~385px wide */
  max-width: none; /* escape the global img{max-width:100%} + narrow .brand box */
  width: auto;
  transform-origin: left top;
  transform: scale(0.5); /* collapsed: shrunk down toward the bar */
  opacity: 0;
  pointer-events: none;
}
body.has-hero .site-header:not(.scrolled) .brand--dual .brand-logo--mark {
  opacity: 0;
  transform: scale(1.85); /* balloons outward as it fades */
}
body.has-hero .site-header:not(.scrolled) .brand--dual .brand-logo--stacked {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
/* Between the mobile-nav breakpoint (1100px) and ~1180px the horizontal nav is
   present but tight, so keep the lockup from running into it. */
@media (min-width: 1101px) and (max-width: 1180px) {
  .brand--dual .brand-logo--stacked {
    height: 132px;
  }
}
/* Transparent PNG. On the light theme the silver metal can wash out, so give it
   a small dark backing for contrast; on the dark theme it just floats. */
:root[data-theme="light"] .brand-logo {
  background: #14141a;
  padding: 5px 10px;
  border-radius: 5px;
}
@media (max-width: 560px) {
  .brand-logo {
    height: 34px;
  }
  .brand-logo-lg {
    height: 58px;
  }
  /* Smaller lockup so it doesn't crowd the hamburger on phones. */
  .brand--dual .brand-logo--stacked {
    height: 112px;
  }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  font-family: var(--heading);
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.16s ease;
}
.main-nav a:not(.nav-cta):hover {
  color: var(--accent);
}
.main-nav a.nav-cta {
  padding: 16px 24px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.footer-theme-toggle {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 14px;
  font-family: var(--heading);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.footer-theme-toggle #themeIcon {
  font-size: 15px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 40%, var(--hero-tint), transparent 55%),
    linear-gradient(
      115deg,
      var(--hero-a) 0%,
      var(--hero-a) 42%,
      var(--hero-b) 42%,
      var(--hero-c) 100%
    );
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(115deg, transparent 45%, #000 70%);
}
/* Optional admin-uploaded hero photo. The photo sits on the right; the ::before
   overlay fades from solid background on the left (under the text) to clear on
   the right, plus a soft band at the top so the nav stays readable. Without a
   photo none of this applies and the gradient + grid above is used. */
.hero-media--photo {
  background: var(--hero-a);
  /* Keeps the overlay's z-index inside this layer so it never covers the text. */
  isolation: isolate;
}
.hero-media--photo::after {
  display: none;
}
.hero-media--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
.hero-media--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--hero-a) 78%, transparent) 0,
      transparent 220px
    ),
    linear-gradient(
      90deg,
      var(--hero-a) 0%,
      color-mix(in srgb, var(--hero-a) 92%, transparent) 30%,
      color-mix(in srgb, var(--hero-a) 50%, transparent) 55%,
      transparent 82%
    );
}
@media (max-width: 960px) {
  /* Text spans the full width on tablets/phones, so darken evenly instead. */
  .hero-media--photo::before {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--hero-a) 88%, transparent) 0,
      color-mix(in srgb, var(--hero-a) 78%, transparent) 100%
    );
  }
}
.hero-inner {
  position: relative;
  /* top: clears the fixed header + the oversized hero lockup */
  padding: 224px 24px 90px;
  max-width: var(--maxw);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heading);
  letter-spacing: 3px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}
.tick {
  width: 34px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  /* Teko is tall + tightly condensed, so it can run large with a snug leading. */
  font-size: clamp(46px, 9vw, 104px);
  line-height: 0.98;
  letter-spacing: 0.5px;
}
.hero-lead {
  max-width: 420px;
  color: var(--muted);
  margin: 26px 0 34px;
  font-size: 17px;
}
.hero-social {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}
.hero-social a,
.footer-social div a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
}
.hero-social a:hover,
.footer-social div a:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== Section base ===== */
.section {
  padding: 78px 0;
}
.section-kicker {
  text-align: center;
  font-family: var(--heading);
  letter-spacing: 4px;
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 42px;
  position: relative;
}
.section-kicker::before,
.section-kicker::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 90px;
  height: 1px;
  background: var(--line);
}
.section-kicker::before {
  right: calc(50% + 130px);
}
.section-kicker::after {
  left: calc(50% + 130px);
}
.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}
.section-head-row .section-kicker {
  margin: 0;
  text-align: left;
}
.section-head-row .section-kicker::before,
.section-head-row .section-kicker::after {
  display: none;
}

/* ===== Servicios ===== */
.services {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.service {
  text-align: center;
  padding: 8px 22px;
  border-left: 1px solid var(--line);
}
.service:first-child {
  border-left: 0;
}
.service-icon {
  font-size: 34px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1;
}
.service h3 {
  font-size: 17px;
  margin-bottom: 4px;
  padding-bottom: 12px;
  position: relative;
}
.service h3::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 26px;
  height: 2px;
  background: var(--accent);
}
.service p {
  color: var(--muted);
  font-size: 14px;
}

/* ===== Proyectos ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.project h4 {
  font-size: 15px;
  margin: 14px 0 2px;
}
.project span {
  font-family: var(--heading);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.project-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: var(--thumb-bg);
  overflow: hidden;
  transition: transform 0.25s ease;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.project:hover .project-thumb {
  transform: translateY(-4px);
}
.project:hover .project-thumb img {
  transform: scale(1.05);
}
/* The thumb is a <button> when a project has media to open in the lightbox —
   reset the browser's default button chrome back to a plain, clickable card. */
button.project-thumb {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.project-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Play badge overlaid on video thumbnails. */
.project-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.project-play::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition:
    transform 0.25s ease,
    background 0.25s ease;
}
.project-play::after {
  content: "";
  position: absolute;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px; /* optical centering of the triangle in the circle */
}
.project:hover .project-play::before {
  transform: scale(1.08);
  background: var(--accent);
}

/* ===== Lightbox ===== */
body.lightbox-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 60px 24px;
  background: rgba(6, 6, 8, 0.88);
  backdrop-filter: blur(3px);
}
.lightbox[hidden] {
  display: none;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 100%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-media {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-media img,
.lightbox-media video {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border: 1px solid var(--line);
  background: #000;
}
.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-caption {
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--heading);
  font-size: 13px;
  letter-spacing: 1px;
  text-align: center;
}
.lightbox-caption[hidden] {
  display: none;
}
@media (max-width: 560px) {
  .lightbox {
    padding: 48px 16px;
  }
  .lightbox-close {
    top: -40px;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
}

/* ===== Nosotros ===== */
.about {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.about-copy h2 {
  font-size: clamp(32px, 4.5vw, 50px);
  margin-bottom: 22px;
}
.about-copy p {
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 34px;
}
.about-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 26px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heading);
  font-size: 14px;
  letter-spacing: 1px;
}
.badge-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 18px;
}
.about-media {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(140deg, var(--hero-c), var(--hero-a)),
    repeating-linear-gradient(
      45deg,
      var(--hero-grid) 0 12px,
      transparent 12px 24px
    );
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Reviews ===== */
.reviews {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 26px;
}
.stars {
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.review p {
  font-size: 15px;
  margin-bottom: 14px;
}
.review cite {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--heading);
  letter-spacing: 1px;
}

/* ===== Contacto ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 18px;
}
.contact-copy p {
  color: var(--muted);
  margin-bottom: 26px;
}
.contact-list {
  list-style: none;
  display: grid;
  gap: 14px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}
.contact-list span {
  color: var(--accent);
  font-size: 18px;
}
.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 30px;
  display: grid;
  gap: 16px;
}
.form-title {
  font-family: var(--heading);
  letter-spacing: 2px;
  font-size: 20px;
}
.contact-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 13px 14px;
  font-family: var(--body);
  font-size: 15px;
  border-radius: 2px;
  width: 100%;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
}
.form-status {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 2px;
}
.form-status.is-success {
  background: rgba(34, 165, 91, 0.14);
  border-color: #22a55b;
}
.form-status.is-success::before {
  content: "\2713\00a0\00a0";
  color: #22a55b;
  font-weight: 700;
}
.form-status.is-error {
  background: rgba(226, 32, 46, 0.12);
  border-color: var(--accent);
}

/* Sending state: dimmed form + an indeterminate progress bar along the bottom
   edge of the submit button. */
.contact-form.is-sending {
  cursor: progress;
}
.contact-form.is-sending input,
.contact-form.is-sending select,
.contact-form.is-sending textarea {
  opacity: 0.6;
  pointer-events: none;
}
.btn.is-loading {
  position: relative;
  overflow: hidden;
  cursor: progress;
  pointer-events: none;
  transform: none;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  height: 4px;
  background: rgba(255, 255, 255, 0.9);
  animation: gcr-progress 1.05s ease-in-out infinite;
}
@keyframes gcr-progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(263%);
  }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 46px 0 26px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.footer-contact p,
.footer-social p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.footer-contact span {
  color: var(--accent);
  margin-right: 8px;
}
.footer-social p {
  font-family: var(--heading);
  letter-spacing: 2px;
  color: var(--text);
}
.footer-social div {
  display: flex;
  gap: 10px;
}
.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ===== Responsive ===== */
/* Six links plus the "SCHEDULE A VISIT" button need ~1100px of header, so the
   nav collapses into the hamburger menu earlier than the rest of the layout. */
@media (max-width: 1100px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 24px;
    transform: translateY(-140%);
    transition: transform 0.28s ease;
  }
  .main-nav.open {
    transform: translateY(0);
  }
  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta {
    text-align: center;
    margin-top: 12px;
    border-bottom: 0 !important;
  }
  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 26px 16px;
  }
  .service:first-child {
    border-top: 0;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: -1;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-kicker::before {
    right: calc(50% + 110px);
  }
  .section-kicker::after {
    left: calc(50% + 110px);
  }
}

@media (max-width: 520px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .about-badges {
    grid-template-columns: 1fr;
  }
  .contact-form .row {
    grid-template-columns: 1fr;
  }
  .section-kicker::before,
  .section-kicker::after {
    display: none;
  }
  .hero-inner {
    padding: 152px 24px 60px;
  }
}

/* ============================================================
   Projects page (projects.html)
   ============================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 82% 0%, var(--hero-tint), transparent 55%),
    linear-gradient(
      115deg,
      var(--hero-a) 0%,
      var(--hero-a) 46%,
      var(--hero-b) 46%,
      var(--hero-c) 100%
    );
}
.page-hero .container {
  position: relative;
  padding-top: 142px; /* fixed header (76px) + original 66px */
  padding-bottom: 58px;
}
.page-hero h1 {
  font-size: clamp(38px, 6.5vw, 68px);
  line-height: 1.05;
  margin-bottom: 18px;
}
.page-hero p {
  color: var(--muted);
  max-width: 56ch;
}
.breadcrumb {
  font-family: var(--heading);
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}

.proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  font-family: var(--heading);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.chip:hover {
  color: var(--text);
  border-color: var(--accent);
}
.chip.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.projects-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.projects-page-grid .project-thumb {
  aspect-ratio: 4 / 3;
}
.projects-page-grid .project h4 {
  font-size: 16px;
}
.project.is-hidden {
  display: none;
}

.cta-band {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 22px;
}

/* Squarish, condensed display face (Teko) for the big headline moments — it
   echoes the geometry of the SQC logo. Denser/smaller headings stay on Oswald.
   Placed after the individual heading rules so it wins the cascade. */
.hero h1,
.page-hero h1,
.section-kicker,
.about-copy h2,
.contact-copy h2,
.cta-band h2 {
  font-family: var(--display);
}
.section-kicker {
  font-weight: 600; /* Teko 400 reads thin at label size */
}

@media (max-width: 960px) {
  .projects-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .projects-page-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Animaciones
   ============================================================ */

/* Micro-interacciones (hover) */
.btn {
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-accent:hover {
  box-shadow: 0 10px 26px -10px var(--accent);
}
.main-nav a {
  position: relative;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}
.main-nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}
.service {
  transition: transform 0.25s ease;
}
.service:hover {
  transform: translateY(-5px);
}
.service h3::after {
  transition: width 0.25s ease;
}
.service:hover h3::after {
  width: 48px;
}
.badge-icon {
  transition: transform 0.3s ease;
}
.badge:hover .badge-icon {
  transform: rotate(-8deg) scale(1.06);
}
.theme-toggle #themeIcon {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gcr-hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Scroll reveal — the .js class is added by the <head> script */
  html.js .section-kicker,
  html.js .section-head-row,
  html.js .services-grid > .service,
  html.js .projects-grid > .project,
  html.js .projects-page-grid > .project,
  html.js .reviews-grid > .review,
  html.js .about-copy,
  html.js .about-media,
  html.js .about-badges > .badge,
  html.js .contact-copy,
  html.js .contact-form,
  html.js .page-hero .container > *,
  html.js .cta-band .container > * {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0ms);
  }
  /* El estado revelado debe igualar (o superar) la especificidad de los
     selectores de arriba, de lo contrario `opacity: 0` seguiria ganando. */
  html.js .is-visible,
  html.js .services-grid > .service.is-visible,
  html.js .projects-grid > .project.is-visible,
  html.js .projects-page-grid > .project.is-visible,
  html.js .reviews-grid > .review.is-visible,
  html.js .about-badges > .badge.is-visible,
  html.js .page-hero .container > .is-visible,
  html.js .cta-band .container > .is-visible {
    opacity: 1;
    transform: none;
  }

  /* The hero animates in on page load */
  html.js .hero-inner > * {
    opacity: 0;
    animation: gcr-hero-in 0.7s ease forwards;
  }
  html.js .hero-inner > :nth-child(1) {
    animation-delay: 0.05s;
  }
  html.js .hero-inner > :nth-child(2) {
    animation-delay: 0.16s;
  }
  html.js .hero-inner > :nth-child(3) {
    animation-delay: 0.3s;
  }
  html.js .hero-inner > :nth-child(4) {
    animation-delay: 0.42s;
  }
  html.js .hero-inner > :nth-child(5) {
    animation-delay: 0.54s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
