:root {
  --bg: #f5f5f5;
  --paper: #ffffff;
  --paper-soft: #f7fbfc;
  --ink: #333333;
  --ink-strong: #1a1a1a;
  --brand: #144e9c;
  --accent: #36deb8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  line-height: 1.55;
}

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

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

.page {
  min-height: 100vh;
}

.topbar {
  background: #144e9c;
  color: #fff;
  font-size: 0.84rem;
}

.topbar-inner,
.header-inner,
.section-inner,
.footer-inner,
.hero-inner,
.subfooter-inner {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.logo img {
  width: 180px;
  height: auto;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.nav > a,
.nav-toggle {
  padding: 10px 12px;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-family: "Rubik", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 8px;
  cursor: pointer;
}

.nav > a:hover,
.nav > a:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(20, 78, 156, 0.08);
}

.nav-group {
  position: relative;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  display: none;
  flex-direction: column;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.nav-dropdown a {
  padding: 10px 12px;
  color: var(--brand);
  font-family: "Rubik", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 10px;
}

.nav-subgroup {
  display: flex;
  flex-direction: column;
}

.nav-subtoggle {
  padding: 10px 12px;
  color: var(--brand);
  font-family: "Rubik", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 10px;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible,
.nav-subtoggle:hover,
.nav-subtoggle:focus-visible {
  background: rgba(20, 78, 156, 0.08);
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 6px 18px;
  padding-left: 12px;
  border-left: 2px solid rgba(20, 78, 156, 0.14);
}

.nav-submenu a {
  padding: 8px 10px;
  font-size: 0.74rem;
}

.nav-group:hover .nav-dropdown,
.nav-group.open .nav-dropdown {
  display: flex;
}

.hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background-color: #08121f;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-inner {
  padding: 82px 0 60px;
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-family: "Rubik", sans-serif;
  font-size: clamp(2.3rem, 4vw, 4rem);
  font-weight: 300;
  text-shadow: 2px 2px 9px #000;
}

.section {
  padding: 70px 0;
  background: var(--paper);
}

.section.surface {
  background:
    url("../remote-qartia/wp-content/uploads/2022/11/fondo-home.jpg") top left / cover no-repeat,
    var(--paper-soft);
}

.section.alt {
  background: #e8faf9;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 49px;
  height: 50px;
  margin-right: 10px;
  vertical-align: middle;
  background: url("../remote-qartia/wp-content/uploads/2022/11/before-titulares.png") no-repeat center/contain;
}

.lead-title {
  margin: 0 0 24px 58px;
  color: var(--ink-strong);
  font-family: "Rubik", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
}

.copy p {
  margin: 0 0 16px;
}

.split-layout,
.cta-grid,
.footer-inner,
.stack-split {
  display: grid;
  gap: 36px;
}

.split-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: center;
}

.stack-split {
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  align-items: start;
}

.copy-card,
.visual-card,
.info-card,
.phase-card,
.photo-card,
.cta-copy {
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.copy-card,
.info-card,
.phase-card,
.cta-copy {
  padding: 28px 30px;
}

.copy-card,
.cta-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visual-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.visual-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
}

.visual-card.landscape img {
  aspect-ratio: 16 / 10;
}

.visual-card p {
  margin: 18px 4px 0;
  color: #5a6670;
  font-size: 0.95rem;
}

.stack-grid,
.photo-stack,
.feature-grid,
.phase-grid,
.cta-stack {
  display: grid;
  gap: 24px;
}

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

.feature-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.phase-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.info-card h3,
.phase-card h3 {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-family: "Rubik", sans-serif;
  font-size: 1.34rem;
  font-weight: 500;
  line-height: 1.15;
}

.info-card p,
.phase-card p {
  margin: 0;
}

.info-card strong,
.phase-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-family: "Rubik", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.feature-list li {
  position: relative;
  padding-left: 18px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.photo-stack {
  grid-template-columns: 1fr;
}

.photo-card {
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 16px 18px 18px;
  color: #5a6670;
  font-size: 0.94rem;
}

.cta-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: stretch;
}

.cta-copy h2 {
  margin: 0 0 14px;
  color: var(--ink-strong);
  font-family: "Rubik", sans-serif;
  font-size: clamp(1.9rem, 2.5vw, 2.6rem);
  font-weight: 300;
}

.cta-copy p {
  margin: 0;
}

.cta-image {
  margin: 0;
  min-height: 100%;
  border-radius: 22px;
  background:
    linear-gradient(rgba(20, 78, 156, 0.16), rgba(20, 78, 156, 0.16)),
    var(--cta-image) center/cover no-repeat;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cta-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.cta-image.contain-image {
  background-color: #f7fbfc;
  background:
    linear-gradient(rgba(20, 78, 156, 0.08), rgba(20, 78, 156, 0.08)),
    var(--cta-image) center/contain no-repeat;
}

.cta-image.contain-image img {
  object-fit: contain;
  background: #f7fbfc;
}

.qartia-shortcuts-section {
  background: #eef8f7;
}

.qartia-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.qartia-shortcut-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 24px 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #144e9c, #2a6aba);
  color: #fff;
  text-align: center;
  font-family: "Rubik", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.qartia-shortcut-card:hover,
.qartia-shortcut-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
  filter: brightness(1.04);
}

@media (max-width: 900px) {
  .qartia-shortcuts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .qartia-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .qartia-shortcut-card {
    min-height: 120px;
    font-size: 1.02rem;
  }
}

.footer {
  background:
    url("../remote-qartia/wp-content/uploads/2022/11/fondo-footer.jpg") left top / cover no-repeat,
    #222;
  color: #ccc;
}

.footer-inner {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  padding: 56px 0 28px;
}

.footer-logo img {
  width: 180px;
}

.footer h4 {
  margin: 0 0 16px;
  color: #ccc;
  font-family: "Rubik", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.footer p {
  margin: 0 0 10px;
}

.subfooter {
  background: #333;
  color: #f9f9f9;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.subfooter-inner {
  padding: 14px 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .header-inner,
  .split-layout,
  .stack-split,
  .cta-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .header-inner {
    display: grid;
    gap: 12px;
  }

  .logo {
    justify-self: center;
    transform: none;
  }

  .nav {
    justify-content: center;
  }

  .nav-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .feature-grid.cols-4,
  .feature-grid.cols-3,
  .phase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    justify-content: center;
  }

  .nav {
    gap: 8px;
  }

  .nav-group {
    width: 100%;
    display: grid;
    justify-items: center;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    min-width: min(320px, 100%);
    width: min(320px, 100%);
    margin-top: 6px;
  }

  .hero-inner {
    padding-top: 72px;
  }

  .eyebrow::before {
    display: none;
  }

  .lead-title {
    margin-left: 0;
  }

  .feature-grid.cols-4,
  .feature-grid.cols-3,
  .phase-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding-top: 40px;
  }
}
