/* Design tokens */
:root {
  --ocean: #004259;
  --night: #171744;
  --night-deep: #0d0d2e;
  --night-2: #24245e;
  --night-3: #323477;
  --aqua: #41d9bd;
  --orchid: #d45bce;
  --ink: #ffffff;
  --muted: #c3c8e6;
  --line: rgba(255, 255, 255, 0.16);
  --radius: 8px;
  --title: "Archivo", sans-serif;
  --body: "IBM Plex Mono", monospace;
  color-scheme: dark;
}

/* Base */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: var(--night);
}
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orchid);
  outline-offset: 4px;
}
img {
  display: block;
  height: auto;
  max-width: 100%;
}
.container {
  width: min(1120px, 90vw);
  margin-inline: auto;
}

/* Header and navigation */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(23, 23, 68, 0.97);
  border-bottom: 1px solid var(--line);
  transition:
    background-color 0.22s ease,
    box-shadow 0.22s ease;
}
.nav {
  min-height: 93px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  transition: min-height 0.22s ease;
}
.brand img {
  width: 132px;
  transition: width 0.22s ease;
}
.site-header.is-compact {
  box-shadow: 0 8px 24px rgba(9, 9, 35, 0.2);
}
.site-header.is-compact .nav {
  min-height: 62px;
}
.site-header.is-compact .brand img {
  width: 104px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.nav-links a:not(.nav-cta):hover {
  color: var(--aqua);
}
.nav-cta {
  white-space: nowrap;
}
.site-header.is-compact .nav-cta {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 0.74rem;
}
.language-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.language-selector [aria-current="page"] {
  color: var(--aqua);
}
.language-selector a {
  padding: 4px 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
}
.language-selector a:hover {
  color: white;
}
.language-separator {
  opacity: 0.45;
}
.menu-toggle {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 92px;
}
.shape {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transform-origin: center;
}
.shape-a {
  width: 440px;
  height: 440px;
  top: -230px;
  right: -60px;
  background: var(--night-3);
  border: 1px solid rgba(65, 217, 189, 0.2);
  transform: translate3d(0, var(--parallax-a, 0), 0) rotate(24deg);
}
.shape-b {
  width: 250px;
  height: 250px;
  right: 15%;
  bottom: -180px;
  background: var(--ocean);
  border: 1px solid rgba(212, 91, 206, 0.3);
  transform: translate3d(0, var(--parallax-b, 0), 0) rotate(42deg);
}
.shape-c {
  width: 110px;
  height: 110px;
  top: 24%;
  right: 9%;
  background: transparent;
  border: 2px solid var(--orchid);
  opacity: 0.38;
  transform: rotate(14deg);
}
.hero.hero-square-motion-active .shape-c {
  top: 0;
  left: 0;
  right: auto;
  will-change: transform;
}
.kicker,
.eyebrow {
  display: inline-block;
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.kicker span {
  padding-inline: 0.35rem;
  color: var(--orchid);
}
h1,
h2,
h3 {
  font-family: var(--title);
  line-height: 1.04;
}
h1 {
  max-width: 1120px;
  margin: 22px 0 24px;
  font-size: clamp(3rem, 5.2vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}
h2 {
  font-weight: 600;
}
h3 {
  font-weight: 500;
}
h1 em {
  display: block;
  color: var(--aqua);
  font-style: normal;
}
.hero-title > span,
.hero-title em > span {
  display: block;
}
.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

/* Buttons */
.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid var(--aqua);
  border-radius: 3px;
  color: var(--aqua);
  font-size: 0.88rem;
  font-weight: 500;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    min-height 0.22s ease,
    padding 0.22s ease,
    font-size 0.22s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--night-2);
}
.btn.primary {
  color: var(--night);
  background: var(--aqua);
}
.btn.primary:hover {
  background: #79e8d3;
}
.btn.dark {
  color: white;
  background: var(--night);
  border-color: var(--night);
}
.btn.dark:hover {
  color: white;
  background: var(--night-2);
}

/* Shared sections */
.section {
  padding-block: clamp(72px, 9vw, 126px);
  scroll-margin-top: 62px;
}
.section-head {
  margin-bottom: 44px;
}
.section h2 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  letter-spacing: -0.04em;
}
.section-head p,
.contact-card > p {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.card {
  position: relative;
  min-height: 320px;
  grid-column: span 2;
  padding: 34px;
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.card:nth-child(4),
.card:nth-child(5) {
  grid-column: span 3;
}
.tile-square {
  position: absolute;
  width: 90px;
  height: 90px;
  right: -54px;
  bottom: -54px;
  border: 1px solid var(--aqua);
  transform: rotate(24deg);
  opacity: 0.4;
  pointer-events: none;
}
.card.accent-orchid .tile-square {
  border-color: var(--orchid);
}
.services.tile-motion-active .tile-square {
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  will-change: transform;
}
.card > :not(.tile-square) {
  position: relative;
  z-index: 1;
}
.card:hover {
  border-color: rgba(65, 217, 189, 0.55);
  transform: translateY(-3px);
}
.card.accent-orchid:hover {
  border-color: rgba(212, 91, 206, 0.55);
}
.service-visual {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  margin-bottom: 34px;
  color: var(--aqua);
}
.service-visual::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.22;
}
.service-visual::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  top: 4px;
  right: 5px;
  background: currentColor;
  border-radius: 50%;
}
.accent-orchid .service-visual {
  color: var(--orchid);
}
.service-visual svg {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 {
  max-width: 360px;
  margin: 0 0 12px;
  font-size: 1.3rem;
}
.card p,
.about p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Agency partnerships */
.agency-partnership {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 90px);
  margin-top: 18px;
  padding: clamp(40px, 6vw, 72px);
  overflow: hidden;
  color: var(--night);
  background: var(--aqua);
  border-radius: var(--radius);
}
.agency-partnership::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -110px;
  top: -110px;
  background: var(--orchid);
  transform: rotate(24deg);
}
.agency-intro,
.agency-benefits {
  position: relative;
  z-index: 1;
}
.agency-partnership .eyebrow {
  color: var(--night);
  opacity: 0.68;
}
.agency-partnership h2 {
  max-width: 620px;
  margin: 16px 0 22px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}
.agency-intro > p {
  max-width: 600px;
  margin: 0;
  font-size: 1rem;
}
.agency-cta {
  margin-top: 30px;
}
.agency-benefits {
  align-self: center;
  border-top: 1px solid rgba(23, 23, 68, 0.28);
}
.agency-benefits article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(23, 23, 68, 0.28);
}
.agency-benefits article > span {
  padding-top: 3px;
  font-size: 0.78rem;
  opacity: 0.62;
}
.agency-benefits h3 {
  margin: 0 0 7px;
  font-size: 1.12rem;
}
.agency-benefits p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* About */
.about-section {
  background: var(--night-2);
}
.about {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(50px, 9vw, 130px);
  align-items: center;
}
.about h2 {
  margin: 14px 0 24px;
}
.about p + p {
  margin-top: 14px;
}
.about aside {
  position: relative;
  padding: 34px;
  color: var(--night);
  background: var(--aqua);
  border-radius: var(--radius);
}
.about aside::after {
  content: "";
  position: absolute;
  width: 54px;
  height: 54px;
  top: -18px;
  right: -18px;
  background: var(--orchid);
  transform: rotate(18deg);
}
.about aside span {
  font-size: 0.82rem;
}
.about aside h3 {
  margin: 8px 0 28px;
  font-size: 2.1rem;
}
/* Contact */
.contact-card {
  position: relative;
  padding: clamp(40px, 7vw, 80px);
  background: var(--ocean);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -48px;
  bottom: -48px;
  background: transparent;
  border: 1px solid var(--orchid);
  transform: rotate(32deg);
}
.contact-card > * {
  position: relative;
  z-index: 1;
}
.contact-card .eyebrow {
  color: white;
  opacity: 0.75;
}
.contact-card .btn {
  color: white;
  border-color: white;
}
.contact-card .btn.primary {
  color: var(--night);
  background: white;
}

/* Footer */
footer {
  padding-block: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-row img {
  width: 68px;
}

/* Responsive layout and motion preferences */
@media (max-width: 900px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
  .card,
  .card:nth-child(4),
  .card:nth-child(5) {
    grid-column: span 1;
  }
  .agency-partnership,
  .about {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .shape {
    will-change: auto;
  }
  .shape-a {
    right: -260px;
    transform: rotate(24deg);
  }
  .shape-b {
    transform: rotate(42deg);
  }
  .shape-c {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  header,
  .nav,
  .brand img {
    transition: none;
  }
  .nav-right,
  .menu-toggle span {
    transition: none;
  }
  .shape {
    will-change: auto;
  }
  .shape-a {
    transform: rotate(24deg);
  }
  .shape-b {
    transform: rotate(42deg);
  }
  .shape-c {
    transform: rotate(14deg);
  }
}
@media (max-width: 600px) {
  html.menu-open,
  body.menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  .nav {
    gap: 12px;
  }
  .brand,
  .menu-toggle {
    position: relative;
    z-index: 30;
  }
  .nav-right {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-height: 100dvh;
    padding: 110px 24px 96px;
    background: var(--night-deep);
    visibility: hidden;
    pointer-events: none;
    touch-action: none;
    transition: visibility 0s linear 0.24s;
  }
  .site-header.menu-open .nav-right {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .site-header.menu-open .brand {
    position: fixed;
    top: 27px;
    left: 5vw;
    z-index: 40;
  }
  .site-header.menu-open .menu-toggle {
    position: fixed;
    top: 24px;
    right: 5vw;
    z-index: 40;
  }
  .site-header.is-compact.menu-open .brand {
    top: 15px;
  }
  .site-header.is-compact.menu-open .menu-toggle {
    top: 9px;
  }
  .nav-links {
    flex-direction: column;
    gap: 24px;
    color: white;
    text-align: center;
  }
  .nav-links,
  .language-selector {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 0.2s ease 0.04s,
      transform 0.2s ease 0.04s;
  }
  .site-header.menu-open .nav-links,
  .site-header.menu-open .language-selector {
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links a,
  .site-header .nav-links .nav-cta {
    min-height: auto;
    padding: 4px 8px;
    color: white;
    background: transparent;
    border: 0;
    font-family: var(--title);
    font-size: clamp(2.25rem, 12vw, 3.6rem);
    font-weight: 500;
    line-height: 1.05;
  }
  .nav-links a:hover,
  .nav-links a:not(.nav-cta):hover,
  .site-header .nav-links .nav-cta:hover {
    color: var(--aqua);
    background: transparent;
    transform: none;
  }
  .language-selector {
    position: absolute;
    right: 0;
    bottom: max(34px, env(safe-area-inset-bottom));
    left: 0;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
  }
  .menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-content: center;
    gap: 7px;
    padding: 0;
    color: white;
    background: transparent;
    border: 0;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    transform-origin: center;
    transition:
      transform 0.24s ease,
      background-color 0.18s ease;
  }
  .menu-toggle:hover {
    color: var(--aqua);
  }
  .site-header.menu-open .menu-toggle span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }
  .site-header.menu-open .menu-toggle span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }
  .brand img {
    width: 108px;
  }
  .site-header.is-compact .brand img {
    width: 88px;
  }
  .hero {
    min-height: 580px;
  }
  .hero-inner {
    padding-block: 70px;
  }
  h1 {
    font-size: clamp(2.45rem, 11vw, 3.4rem);
    letter-spacing: -0.035em;
  }
  .services {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: auto;
  }
  .service-visual {
    margin-bottom: 26px;
  }
  .agency-partnership {
    padding: 34px 26px;
  }
  .agency-benefits article {
    grid-template-columns: 34px 1fr;
    gap: 12px;
  }
  .hero-actions .btn,
  .contact-actions .btn,
  .agency-cta {
    width: 100%;
  }
  .footer-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .nav-right,
  .nav-links,
  .language-selector,
  .menu-toggle span {
    transition: none;
  }
}
