:root {
  --bg: #f6f8fc;
  --bg-alt: #e9eef6;
  --ink: #0f172a;
  --ink-muted: #475569;
  --accent: #0e7490;
  --accent-hover: #0f5c6e;
  --line: rgba(15, 23, 42, 0.1);
  --radius: 12px;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --space: clamp(1rem, 3vw, 2rem);
  --max: 72rem;
  /* Cabecera sticky: hueco mínimo para que el título no quede bajo la barra al usar #anclas */
  --header-scroll-offset: clamp(5rem, 5.5vw + 3rem, 8rem);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(100% - var(--space) * 2, var(--max));
  margin-inline: auto;
}

.wrap.wrap-narrow {
  width: min(100% - var(--space) * 2, 40rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  --logo-opacity: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(0.85rem, 2vw, 1.35rem);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
  min-height: 2.75rem;
  border-radius: 10px;
}

.logo img {
  display: block;
  height: clamp(3.5rem, 2.75vw + 2rem, 6rem);
  width: auto;
  max-width: min(38rem, 94vw);
  object-fit: contain;
  opacity: var(--logo-opacity, 1);
  transition:
    opacity 0.45s ease-out,
    transform 0.28s ease,
    filter 0.28s ease;
}

.logo:hover img {
  opacity: 1;
  transform: scale(1.045);
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--accent) 28%, transparent));
}

.logo:focus-visible img {
  opacity: 1;
  transform: scale(1.03);
}

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

@media (max-width: 720px) {
  .logo img {
    height: clamp(3rem, 9vw + 1.25rem, 4.75rem);
    max-width: calc(100vw - 5.5rem - var(--space) * 2);
  }

  .logo:hover img {
    transform: scale(1.03);
  }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 0.48rem 1rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    color 0.26s ease,
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.26s ease,
    border-color 0.26s ease,
    box-shadow 0.26s ease;
}

.nav-list a:hover {
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent) 78%, #0369a1) 100%
  );
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px color-mix(in srgb, var(--accent) 32%, transparent),
    0 2px 6px color-mix(in srgb, var(--ink) 12%, transparent);
}

.nav-list a:focus-visible {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .logo img {
    transition: opacity 0.2s ease;
  }

  .logo:hover img,
  .logo:focus-visible img {
    transform: none;
    filter: none;
  }

  .nav-list a {
    transition: color 0.15s ease, background 0.15s ease;
  }

  .nav-list a:hover,
  .nav-list a:focus-visible {
    transform: none;
    box-shadow: none;
  }

  .nav-list a:hover {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: transparent;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--space);
    display: none;
  }

  .nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .nav-list a {
    width: 100%;
    text-align: center;
  }
}

.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3.5rem, 10vw, 6rem);
  overflow: hidden;
  background: radial-gradient(
    ellipse 120% 80% at 85% 20%,
    color-mix(in srgb, var(--accent) 9%, var(--bg)),
    var(--bg) 55%
  );
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 5vw, 3.25rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1.38fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: stretch;
  }
}

.hero-inner {
  position: relative;
  max-width: 40rem;
  align-self: center;
}

@media (min-width: 900px) {
  .hero-inner {
    max-width: min(36rem, 100%);
    padding-right: 0.5rem;
  }
}

.hero-media {
  margin: 0;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--bg-alt), color-mix(in srgb, var(--bg-alt) 70%, #fff));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(260px, 52vw, 420px);
}

@media (min-width: 900px) {
  .hero-media {
    min-height: clamp(340px, 52vh, 560px);
  }
}

.hero-media-still {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(280px, 58vmin, 620px);
  margin: 0 auto;
  vertical-align: middle;
  object-fit: contain;
  object-position: center;
}

.hero-media--brand {
  position: relative;
  padding: clamp(1.35rem, 4vw, 3rem);
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--bg-alt) 88%, #fff),
    color-mix(in srgb, var(--bg) 92%, var(--accent) 6%)
  );
}

.hero-media--brand .hero-brand-video {
  display: block;
  position: relative;
  z-index: 1;
  width: auto;
  max-width: min(92%, 36rem);
  max-height: clamp(240px, min(48vh, 52vw), 520px);
  margin: 0 auto;
  object-fit: contain;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  border-radius: 10px;
  filter: drop-shadow(0 14px 28px color-mix(in srgb, var(--ink) 16%, transparent));
  transition: filter 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-media.hero-media--brand {
  overflow: visible;
  min-height: clamp(220px, 36vw, 400px);
}

@media (min-width: 900px) {
  .hero-media.hero-media--brand {
    min-height: clamp(280px, 42vh, 480px);
  }
}

@keyframes hero-brand-shine {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.65;
    transform: scale(1);
  }
}

.hero-media--brand::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    color-mix(in srgb, var(--accent) 28%, transparent) 0%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-media--brand::before {
    animation: hero-brand-shine 6s ease-in-out infinite;
  }

  .hero-media--brand:hover .hero-brand-video,
  .hero-media--brand:focus-within .hero-brand-video {
    transform: translateY(-4px) scale(1.02);
    filter:
      drop-shadow(0 22px 44px color-mix(in srgb, var(--accent) 32%, transparent))
      drop-shadow(0 8px 18px color-mix(in srgb, var(--ink) 12%, transparent));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media--brand::before {
    opacity: 0.4;
  }

  .hero-media--brand .hero-brand-video {
    transition: filter 0.25s ease;
  }

  .hero-media--brand:hover .hero-brand-video,
  .hero-media--brand:focus-within .hero-brand-video {
    filter: drop-shadow(0 18px 32px color-mix(in srgb, var(--accent) 22%, transparent));
  }
}

.hero-video {
  display: block;
  width: 100%;
  max-height: min(85vh, 900px);
  height: auto;
  object-fit: contain;
  background: var(--bg-alt);
  vertical-align: middle;
}

.hero-video:focus-visible,
.hero-brand-video:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 1.125rem;
  max-width: 42ch;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

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

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  right: -15%;
  top: 10%;
  width: min(55vw, 420px);
  aspect-ratio: 1;
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
  background: linear-gradient(155deg, #38bdf8 0%, #6366f1 42%, #0e7490 100%);
  opacity: 0.35;
  filter: blur(0);
}

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-text {
  margin: 0;
  color: var(--ink-muted);
  max-width: 52ch;
}

.section-intro {
  margin: 0 0 2rem;
  color: var(--ink-muted);
}

#contenido,
#servicios,
#tematicas,
#trabajos,
#ventajas,
#proceso,
#faq,
#contacto,
#formulario-contacto {
  scroll-margin-top: var(--header-scroll-offset);
}

.trabajos-section .section-intro {
  max-width: 52ch;
}

.trabajos-video-frame {
  margin: 0 auto;
  max-width: 56rem;
}

.trabajos-video-inner {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--ink);
  line-height: 0;
}

.trabajos-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(75vh, 820px);
  margin: 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

.trabajos-video:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.trabajos-video-caption {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.grid-2 {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.servicios-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .servicios-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "copy photo"
      "stats stats";
    gap: 2rem 2.5rem;
  }

  .servicios-copy {
    grid-area: copy;
  }

  .servicios-photo {
    grid-area: photo;
  }

  .servicios-stats {
    grid-area: stats;
  }
}

.servicios-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.servicios-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats.servicios-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .stats.servicios-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stats li {
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.cards {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.cards-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
}

.card-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-title {
  margin: 0;
  padding: 1rem 1.25rem 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-meta {
  margin: 0;
  padding: 0.5rem 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 40rem;
}

.steps > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}

.step-num {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.step-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
}

.trust-strip {
  background: var(--ink);
  color: #e2e8f0;
  padding: 0.85rem var(--space);
  text-align: center;
  font-size: 0.9rem;
}

.trust-strip p {
  margin: 0;
  line-height: 1.5;
}

.trust-strip strong {
  color: #fff;
  font-weight: 600;
}

.trust-sep {
  margin: 0 0.35rem;
  opacity: 0.55;
}

.features-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  padding: 1.35rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.feature-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.includes-block {
  padding: 2rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px dashed var(--line);
  background: color-mix(in srgb, var(--bg) 70%, var(--bg-alt));
  max-width: 42rem;
}

.includes-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.includes-lead {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.checklist li:last-child {
  margin-bottom: 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.faq-list {
  margin-top: 0.5rem;
}

.faq-item {
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  background: var(--ink-muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-answer {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.cta-band {
  background: linear-gradient(135deg, var(--accent) 0%, #0f5c6e 100%);
  color: #fff;
  padding: 2.25rem var(--space);
}

.cta-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .cta-band-inner {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
}

.cta-band-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  max-width: 28ch;
}

.btn-on-dark {
  background: #fff;
  color: var(--accent-hover);
  border: 2px solid #fff;
}

.btn-on-dark:hover,
.btn-on-dark:focus-visible {
  background: transparent;
  color: #fff;
}

.section-contact {
  position: relative;
  padding-bottom: clamp(4rem, 10vw, 6rem);
  overflow: hidden;
  background: linear-gradient(
    165deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg-alt) 92%, var(--accent) 8%) 48%,
    var(--bg) 100%
  );
}

.section-contact::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: -20% -10% auto auto;
  width: min(52vw, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%);
  opacity: 0.55;
}

.contact-box {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: min(40rem, 100%);
}

.contact-box .section-title {
  margin-inline: auto;
  margin-bottom: 0.85rem;
}

.contact-box .section-text {
  margin-inline: auto;
  margin-bottom: 0.25rem;
  line-height: 1.65;
}

.contact-success {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.75rem auto 0;
  max-width: 40rem;
  padding: 1rem 1.15rem 1rem 1.25rem;
  text-align: left;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 14%, transparent);
}

.contact-success[hidden] {
  display: none !important;
}

.contact-success-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}

.contact-success-text strong {
  color: var(--accent-hover);
}

.contact-success-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.2rem -0.15rem 0 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink-muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.contact-success-close:hover,
.contact-success-close:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.contact-success-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form-card {
  margin-top: 2.25rem;
  padding: clamp(1.5rem, 4.5vw, 2.35rem);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

.contact-form-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.contact-form-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-form-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.contact-form-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.contact-form {
  width: 100%;
}

.form-grid {
  display: grid;
  gap: 1.35rem;
}

@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.35rem;
  }

  .form-field-full {
    grid-column: 1 / -1;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.form-optional {
  font-weight: 500;
  color: var(--ink-muted);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--ink) 12%);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  background: color-mix(in srgb, var(--bg) 55%, #fff);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: color-mix(in srgb, var(--ink-muted) 75%, transparent);
}

.form-textarea {
  min-height: 8.5rem;
  line-height: 1.55;
  resize: vertical;
}

.form-input:hover,
.form-textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: #fff;
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.form-submit {
  min-width: min(100%, 14rem);
  padding-inline: 1.75rem;
}

.contact-details {
  margin: 2rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-style: normal;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.contact-pill:hover,
.contact-pill:focus-visible {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.contact-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sep {
  color: var(--ink-muted);
  margin: 0 0.35rem;
}

.contact-note {
  margin: 1.15rem auto 0;
  max-width: 38ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .form-input,
  .form-textarea,
  .contact-pill {
    transition: none;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.footer-brand {
  margin: 0;
  line-height: 0;
}

.footer-brand img {
  display: block;
  height: clamp(5rem, 4vw + 3rem, 9rem);
  width: auto;
  max-width: min(34rem, 92vw);
  object-fit: contain;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
