/* Anchos: toolbar/header 90%, cuerpo 80%, footer 80%. */
:root {
  --orange: #ff5800;
  --orange-dark: #e24e00;
  --navy: #0b3b45;
  --navy-deep: #002329;
  --ink: #14323b;
  --muted: #52656e;
  --line: #e3ebef;
  --paper: #f4f7f8;
  --white: #ffffff;
  --header-w: 90%;
  --body-w: 80%;
  --footer-w: 80%;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gadget-size: 62px;
  --gadget-right: 22px;
  --gadget-bottom: 22px;
  --up-size: 48px;
  --up-gap: 50px;
  --header-h: 108px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

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

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

::selection {
  background: var(--navy);
  color: var(--white);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  background: var(--orange);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.dash {
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: var(--orange);
  margin-bottom: 14px;
}

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

/* Header / toolbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid rgba(11, 59, 69, 0.08);
}

.site-header.is-stuck {
  box-shadow: 0 10px 28px rgba(0, 35, 41, 0.07);
}

.header-inner {
  width: var(--header-w);
  margin-inline: auto;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 86px;
  width: auto;
}

.site-nav ul {
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  text-decoration: none;
  color: #1d3942;
  font-weight: 600;
  font-size: 0.98rem;
}

.site-nav a.is-active {
  color: var(--navy);
  font-weight: 800;
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--orange);
  transform: translateX(-50%);
}

.header-cta {
  justify-self: end;
}

.header-cta .short {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  place-items: center;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  position: relative;
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger::before {
  top: -7px;
}

.burger::after {
  top: 7px;
}

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(255, 88, 0, 0.28);
}

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn-ghost {
  background: rgba(6, 28, 34, 0.28);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.78);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-line {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.82);
}

.btn-line:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-block {
  width: 100%;
}

/* Body */
.page-body {
  width: var(--body-w);
  margin: 22px auto 40px;
}

.hero,
section[id] {
  scroll-margin-top: 104px;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 640px;
  border-radius: 22px;
  overflow: hidden;
  color: var(--white);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 28, 34, 0.92) 0%, rgba(5, 28, 34, 0.78) 36%, rgba(5, 28, 34, 0.28) 64%, rgba(5, 28, 34, 0.12) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 72px clamp(22px, 5vw, 72px);
  max-width: 680px;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4.4vw, 4.15rem);
  line-height: 1.02;
  margin-bottom: 18px;
}

.hero h1 .accent {
  color: var(--orange);
}

.hero-lead {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: 82px 0 8px;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  margin-bottom: 10px;
}

.section-head p,
.lead {
  color: var(--muted);
  font-size: 1.05rem;
}

.services-grid,
.projects-grid,
.about-grid,
.process,
.contact-band {
  display: grid;
  gap: 18px;
}

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

.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 22px 28px;
  box-shadow: 0 8px 24px rgba(11, 59, 69, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11, 59, 69, 0.1);
}

.service-icon {
  display: block;
  width: 42px;
  height: 42px;
  color: var(--orange);
}

.service-icon svg {
  width: 42px;
  height: 42px;
}

.service-card h3 {
  margin: 16px 0 8px;
  font-size: 1.12rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.96rem;
}

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

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 22, 30, 0.78) 0%, rgba(0, 22, 30, 0.05) 52%);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-label {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.15rem;
}

.project-label span {
  color: var(--orange);
  transition: transform 0.2s ease;
}

.project-card:hover .project-label span {
  transform: translateX(4px);
}

.about-grid {
  grid-template-columns: 1.15fr 0.85fr;
  gap: 42px;
  align-items: center;
}

.about-copy p + p {
  margin-top: 14px;
}

.commitments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.commitments li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.commitments strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.commitments span {
  color: var(--muted);
  font-size: 0.95rem;
}

.process {
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.process-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}

.steps h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.steps p {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-band {
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: center;
  margin-top: 78px;
  padding: 52px 48px;
  border-radius: 24px;
  background: linear-gradient(155deg, #134854 0%, #0b3b45 48%, #082f38 100%);
  color: var(--white);
  box-shadow: 0 18px 50px rgba(0, 35, 41, 0.16);
}

.contact-band h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 12px;
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 22px;
  max-width: 34rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

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

.field span {
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: var(--white);
  padding: 12px 14px;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: #ffb088;
}

.field-error {
  color: #ffd0b8;
  font-size: 0.8rem;
}

.field-error:empty {
  display: none;
}

.form-note,
.form-status {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.form-note a,
.form-status a {
  color: var(--white);
}

.form-status:empty {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.86);
  padding: 56px 0 28px;
}

.footer-inner {
  width: var(--footer-w);
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 0.95fr 1.15fr;
  gap: 36px 28px;
}

.site-footer .brand {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 10px 6px;
  margin-bottom: 14px;
  width: fit-content;
}

.site-footer .brand-logo {
  height: 108px;
}

.footer-kicker {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.site-footer h2 {
  color: var(--white);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-menu {
  list-style: disc outside;
  margin: 0;
  padding-left: 1.15rem;
}

.footer-menu li {
  margin: 0.4rem 0;
}

.footer-menu li::marker {
  color: var(--orange);
}

.footer-services,
.contact-list,
.social {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-services li,
.footer-menu li {
  margin: 0.42rem 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: var(--white);
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-list svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--orange);
  margin-top: 2px;
}

.social {
  display: flex;
  gap: 10px;
}

.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
}

.social a:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.social svg {
  width: 16px;
  height: 16px;
}

.copyright {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.copyright a {
  text-decoration: underline;
}

/* Legal */
.legal {
  width: min(760px, 100%);
  margin: 18px auto 48px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 8px;
}

.legal-date {
  color: var(--muted);
  margin-bottom: 18px;
}

.legal h2 {
  font-size: 1.22rem;
  margin: 1.8rem 0 0.55rem;
}

.legal p,
.legal li {
  color: #3d515a;
}

.legal p + p,
.legal ul {
  margin-top: 0.75rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal a {
  color: var(--navy);
  font-weight: 700;
}

/* Gadgets: scroll-up centered 50px above WhatsApp */
.scroll-up,
.wa-gadget {
  position: fixed;
  z-index: 60;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
}

.wa-gadget {
  width: var(--gadget-size);
  height: var(--gadget-size);
  right: var(--gadget-right);
  bottom: calc(var(--gadget-bottom) + env(safe-area-inset-bottom));
  background: #25d366;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(18, 140, 70, 0.35);
}

.wa-gadget svg {
  width: 34px;
  height: 34px;
}

.scroll-up {
  width: var(--up-size);
  height: var(--up-size);
  right: calc(var(--gadget-right) + (var(--gadget-size) - var(--up-size)) / 2);
  bottom: calc(var(--gadget-bottom) + env(safe-area-inset-bottom) + var(--gadget-size) + var(--up-gap));
  border: 0;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 8px 22px rgba(0, 35, 41, 0.18);
  cursor: pointer;
}

.scroll-up svg {
  width: 22px;
  height: 22px;
}

.scroll-up:hover {
  background: var(--orange);
  color: var(--white);
}

.wa-gadget:hover {
  background: #1ebe5d;
}

@keyframes wa-pulse {
  0% {
    box-shadow: 0 10px 24px rgba(18, 140, 70, 0.35);
  }
  70% {
    box-shadow: 0 10px 24px rgba(18, 140, 70, 0.2), 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 10px 24px rgba(18, 140, 70, 0.35);
  }
}

.wa-gadget {
  animation: wa-pulse 2.6s ease-out infinite;
}

@media (max-width: 1140px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
  }

  .header-cta {
    order: 2;
  }

  .nav-toggle {
    order: 3;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    z-index: 5;
    padding: 8px 5% 18px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    box-shadow: 0 16px 30px rgba(0, 35, 41, 0.12);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .projects-grid,
  .about-grid,
  .process,
  .contact-band,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-band {
    padding: 32px 22px;
  }

  .hero {
    min-height: 560px;
    align-items: flex-end;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(5, 28, 34, 0.2) 0%, rgba(5, 28, 34, 0.78) 46%, rgba(5, 28, 34, 0.92) 100%);
  }
}

@media (max-width: 640px) {
  .services-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    height: 64px;
  }

  .header-cta .long {
    display: none;
  }

  .header-cta .short {
    display: inline;
  }

  .header-cta {
    min-height: 42px;
    padding-inline: 14px;
  }

  .section {
    padding-top: 56px;
  }

  .copyright {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .wa-gadget,
  .scroll-up,
  .nav-toggle,
  .header-cta {
    display: none !important;
  }

  .page-body,
  .header-inner,
  .footer-inner {
    width: 100%;
  }

  .site-header {
    position: static;
  }
}
