/* =====================================================================
   Avalon 9 — Modern UI layer
   Adds a contemporary design system on top of the base template:
   design tokens, glassmorphism, bento grids, gradient accents,
   credential chips and scroll-reveal animations.
   ===================================================================== */

:root {
  --av-navy: #1b2a4a;
  --av-navy-2: #233a5e;
  --av-blue: #3b82f6;
  --av-blue-soft: #a5c7ff;
  --av-cyan: #38bdf8;
  --av-ink: #1e293b;
  --av-muted: #5b6b85;
  --av-bg-soft: #f5f8ff;
  --av-line: rgba(35, 58, 94, 0.12);
  --av-radius: 18px;
  --av-radius-lg: 26px;
  --av-shadow-sm: 0 4px 18px rgba(27, 42, 74, 0.08);
  --av-shadow-md: 0 14px 40px rgba(27, 42, 74, 0.14);
  --av-shadow-lg: 0 28px 70px rgba(27, 42, 74, 0.22);
  --av-gradient: linear-gradient(135deg, #233a5e 0%, #3b82f6 60%, #38bdf8 100%);
  --av-gradient-soft: linear-gradient(135deg, #eef4ff 0%, #f7fbff 100%);
}

/* ---------- Utilities ---------- */
.av-gradient-text {
  background: var(--av-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.av-section {
  padding: 5.5em 0;
  background-color: #fff;
  color: var(--av-ink);
}

/* Override template's white strong/b so emphasis is legible on light sections */
.av-section strong,
.av-section b {
  color: var(--av-navy);
  font-weight: 700;
}

/* Keep emphasis white inside dark boxes */
.av-cta strong,
.av-cta b,
.av-quote strong,
.av-quote b {
  color: #fff;
}

.av-container {
  width: 90%;
  max-width: 1180px;
  margin: 0 auto;
}

.av-center {
  text-align: center;
}

.av-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--av-blue);
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 0.35em;
}

.av-eyebrow::before,
.av-eyebrow::after {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--av-blue));
}

.av-eyebrow::after {
  background: linear-gradient(90deg, var(--av-blue), transparent);
}

.av-section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin: 0.7em 0 0.4em;
  font-weight: 800;
  color: var(--av-navy);
}

.av-section-lead {
  font-size: 1.1rem;
  color: var(--av-muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Credential / standard chips ---------- */
.av-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  justify-content: center;
  margin: 2.4em auto 0;
  max-width: 880px;
}

.av-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.62em 1.15em;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--av-line);
  box-shadow: var(--av-shadow-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--av-navy-2);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.av-chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--av-shadow-md);
}

.av-chip .av-chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--av-gradient);
}

/* ---------- Trust / stats bar ---------- */
.av-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5em;
  margin-top: 3em;
}

.av-stat {
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  padding: 1.8em 1.4em;
  text-align: center;
  box-shadow: var(--av-shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.av-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--av-shadow-md);
}

.av-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--av-gradient-soft);
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: var(--av-blue);
}

.av-stat-icon svg {
  width: 24px;
  height: 24px;
}

.av-stat-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--av-navy);
  line-height: 1.2;
}

.av-stat-label {
  font-size: 0.86rem;
  color: var(--av-muted);
  font-weight: 600;
  line-height: 1.45;
}

/* ---------- Bento grid of cards ---------- */
.av-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  margin-top: 3em;
}

.av-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius-lg);
  padding: 2em 1.9em;
  box-shadow: var(--av-shadow-sm);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.av-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--av-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.av-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--av-shadow-md);
  border-color: rgba(59, 130, 246, 0.35);
}

.av-card:hover::before {
  opacity: 1;
}

.av-card.av-span-2 {
  grid-column: span 2;
}

/* Two-column bento (e.g. vision & mission) */
.av-bento-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Framed product/app screenshot */
.av-screenshot {
  margin: 3.2em auto 0;
  max-width: 1040px;
  border-radius: var(--av-radius-lg);
  background: var(--av-gradient-soft);
  border: 1px solid var(--av-line);
  box-shadow: var(--av-shadow-lg);
  padding: 1.1em;
}

.av-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--av-shadow-md);
}

.av-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--av-gradient-soft);
  border: 1px solid rgba(59, 130, 246, 0.18);
  margin-bottom: 1.1em;
  color: var(--av-blue);
}

.av-card-icon svg {
  width: 27px;
  height: 27px;
}

.av-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--av-navy);
  margin: 0 0 0.5em;
}

.av-card p {
  color: var(--av-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
}

/* ---------- Tag pills (sector use-cases) ---------- */
.av-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55em;
  margin-top: 1.3em;
}

.av-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.42em 0.9em;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--av-navy);
  background: var(--av-gradient-soft);
  border: 1px solid var(--av-line);
  border-radius: 999px;
  line-height: 1.2;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.av-card:hover .av-tag {
  border-color: rgba(59, 130, 246, 0.28);
}

/* ---------- Sector cards with photo ---------- */
.av-sector {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.av-sector-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.av-sector-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.av-card:hover .av-sector-media img {
  transform: scale(1.05);
}

.av-sector-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.7em 1.8em 1.9em;
}

/* ---------- Page density (casos de uso) ---------- */
.av-compact .av-section {
  padding: 4em 0;
}

/* ---------- Split hero (text + image) ---------- */
.av-hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.2em;
  align-items: center;
  text-align: left;
}

.av-hero-split .av-chips {
  justify-content: flex-start;
}

.av-hero-media,
.av-feature-media {
  border-radius: var(--av-radius-lg);
  overflow: hidden;
  box-shadow: var(--av-shadow-lg);
  border: 1px solid var(--av-line);
}

.av-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* ---------- Feature split (image + text) ---------- */
.av-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3em;
  align-items: center;
}

.av-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 11;
}

@media (max-width: 980px) {
  .av-hero-split,
  .av-feature {
    grid-template-columns: 1fr;
  }

  .av-hero-split {
    text-align: center;
  }

  .av-hero-split .av-chips {
    justify-content: center;
  }

  .av-feature-media {
    order: -1;
  }
}

/* ---------- Quality policy quote ---------- */
.av-quote {
  position: relative;
  background: var(--av-navy);
  color: #fff;
  border-radius: var(--av-radius-lg);
  padding: 3em 2.6em;
  box-shadow: var(--av-shadow-md);
  overflow: hidden;
}

.av-quote::after {
  content: "\201D";
  position: absolute;
  top: -0.25em;
  right: 0.35em;
  font-size: 9rem;
  line-height: 1;
  color: rgba(165, 199, 255, 0.18);
  font-family: Georgia, serif;
}

.av-quote p {
  font-size: 1.3rem;
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
  position: relative;
  z-index: 1;
}

.av-quote .av-quote-mark {
  display: inline-block;
  margin-top: 1.4em;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--av-blue-soft);
  font-weight: 700;
}

/* ---------- Process / V-model timeline ---------- */
.av-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3em;
  margin-top: 3em;
  counter-reset: avstep;
}

.av-step {
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  padding: 1.7em 1.4em;
  box-shadow: var(--av-shadow-sm);
  position: relative;
}

.av-step::before {
  counter-increment: avstep;
  content: counter(avstep, decimal-leading-zero);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--av-blue);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  padding: 0.25em 0.6em;
  display: inline-block;
  margin-bottom: 0.8em;
}

.av-step h4 {
  font-size: 1.05rem;
  color: var(--av-navy);
  margin: 0 0 0.35em;
  font-weight: 700;
}

.av-step p {
  color: var(--av-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* ---------- ALCOA+ pill list ---------- */
.av-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1em;
  margin-top: 3em;
}

.av-pill-item {
  display: flex;
  gap: 0.9em;
  align-items: flex-start;
  background: var(--av-gradient-soft);
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: var(--av-radius);
  padding: 1.3em 1.4em;
}

.av-pill-item .av-pill-key {
  font-weight: 800;
  color: var(--av-blue);
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.av-pill-item span.av-pill-val {
  color: var(--av-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* ---------- Section backgrounds ---------- */
.av-bg-soft {
  background: var(--av-bg-soft);
}

.av-bg-mesh {
  position: relative;
  background:
    radial-gradient(
      1200px 500px at 15% -10%,
      rgba(59, 130, 246, 0.16),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 100% 0%,
      rgba(56, 189, 248, 0.14),
      transparent 55%
    ),
    #fbfdff;
}

/* ---------- CTA band ---------- */
.av-cta {
  background: var(--av-gradient);
  border-radius: var(--av-radius-lg);
  padding: 3.4em 2.6em;
  text-align: center;
  color: #fff;
  box-shadow: var(--av-shadow-md);
}

.av-cta h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0 0 0.5em;
  font-weight: 800;
}

.av-cta p {
  color: #e6efff;
  max-width: 640px;
  margin: 0 auto 1.8em;
  font-size: 1.08rem;
  line-height: 1.65;
}

.av-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.9em;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  border: 0;
}

.av-btn-light {
  background: #fff;
  color: var(--av-navy);
}

.av-btn-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  color: var(--av-navy);
}

.av-btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.av-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
  transform: translateY(-3px);
  color: #fff;
}

/* Filled / outline buttons for light backgrounds (do not clip long labels) */
.av-btn-primary {
  background: var(--av-gradient);
  color: #fff;
  box-shadow: var(--av-shadow-sm);
}

.av-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--av-shadow-md);
  color: #fff;
}

.av-btn-outline {
  background: #fff;
  color: var(--av-navy);
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.av-btn-outline:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 2px var(--av-blue),
    var(--av-shadow-sm);
  color: var(--av-navy);
}

.av-btn-row {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.6em;
}

.av-cta-actions {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Made in Argentina badge ---------- */
.av-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  color: var(--av-navy-2);
}

.av-flag .av-flag-stripes {
  width: 26px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(#74acdf 0 33%, #fff 33% 66%, #74acdf 66% 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

/* ---------- Hero enhancement (homepage) ---------- */
.banner-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
  margin-bottom: 1.4em;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #eaf2ff;
  padding: 0.42em 0.95em;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

/* ---------- Home hero (diagonal split) ---------- */
.av-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, #11203c 0%, #1b2a4a 48%, #233a5e 100%);
}

.av-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.av-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.av-hero-blob-1 {
  width: 480px;
  height: 480px;
  top: -150px;
  left: -130px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.85),
    transparent 70%
  );
  opacity: 0.55;
}

.av-hero-blob-2 {
  width: 540px;
  height: 540px;
  bottom: -200px;
  left: 22%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.6), transparent 70%);
  opacity: 0.5;
}

/* Diagonal photo panel on the right */
.av-hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  z-index: 1;
  background: linear-gradient(180deg, #38bdf8 0%, #3b82f6 55%, #7cc4ff 100%);
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
  filter: drop-shadow(-8px 0 26px rgba(56, 189, 248, 0.22));
}

.av-hero-photo {
  position: absolute;
  inset: 0;
  clip-path: polygon(15.7% 0, 100% 0, 100% 100%, 0.7% 100%);
}

.av-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.av-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(17, 32, 60, 0.78) 0%,
    rgba(17, 32, 60, 0.18) 26%,
    transparent 48%
  );
}

/* Floating glass credibility chip over the photo */
.av-hero-chip {
  position: absolute;
  right: 5%;
  bottom: 13%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.85em 1.2em;
  border-radius: 16px;
  background: rgba(11, 22, 45, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 44px rgba(8, 20, 45, 0.4);
  backdrop-filter: blur(10px);
}

.av-hero-chip-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.25);
  animation: avPulse 2s infinite;
}

.av-hero-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.av-hero-chip-text strong {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
}

.av-hero-chip-text span {
  color: #d6e4ff;
  font-size: 0.8rem;
}

@keyframes avPulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.28);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.08);
  }
}

/* Copy column */
.av-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  min-height: clamp(560px, 84vh, 760px);
  display: flex;
  align-items: center;
  padding: 4.5em 0 5.5em clamp(1.5rem, 6vw, 6rem);
}

.av-hero-copy {
  max-width: calc(50vw - 7.5rem);
  text-align: left;
}

.av-hero .banner-badges {
  justify-content: flex-start;
  margin-bottom: 1.3em;
}

.av-hero-title {
  color: #fff;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.07;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  margin: 0 0 0.55em;
}

.av-hero-accent {
  background: linear-gradient(120deg, #7cc4ff 0%, #38bdf8 50%, #a5c7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#banner .av-hero-lead {
  color: #c6d6f0;
  font-size: clamp(1.35rem, 1.6vw, 1.5rem);
  line-height: 1.55;
  letter-spacing: normal;
  text-transform: none;
  margin: 0 0 2em;
}

.av-hero-lead strong {
  color: #eaf2ff;
  font-weight: 700;
}

.av-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 2.3em;
}

/* Scroll cue */
.av-hero-scroll {
  width: fit-content;
  margin: 2.6em auto 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
  color: #cdddf6;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 0;
  text-shadow: 0 1px 10px rgba(8, 18, 40, 0.55);
}

.av-hero-scroll:hover {
  color: #fff;
}

.av-hero-scroll-arrow {
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: avBob 1.6s ease-in-out infinite;
}

@keyframes avBob {
  0%,
  100% {
    transform: translateY(0) rotate(45deg);
  }
  50% {
    transform: translateY(4px) rotate(45deg);
  }
}

@media (max-width: 1000px) {
  .av-hero-visual,
  .av-hero-chip,
  .av-hero-scroll {
    display: none;
  }

  .av-hero {
    background: linear-gradient(150deg, #11203c 0%, #1b2a4a 55%, #233a5e 100%);
  }

  #banner.av-hero {
    height: auto;
    min-height: 0;
    padding: 0;
  }

  .av-hero-inner {
    min-height: auto;
    padding: clamp(3em, 9vw, 4.5em) clamp(1.4rem, 6vw, 2.5rem)
      clamp(3.2em, 9vw, 4.5em);
  }

  .av-hero-copy {
    max-width: 720px;
  }
}

@media (max-width: 520px) {
  .av-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .av-hero-actions .av-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .av-hero-scroll-arrow,
  .av-hero-chip-dot {
    animation: none;
  }
}

/* ---------- Navbar on modern content pages ---------- */
/* The base template header is transparent (.alt) over a dark banner.
   Modern pages use light heroes, so force a solid dark bar for contrast. */
body.av-page #header,
body.av-page #header.alt,
body.landing #header,
body.landing #header.alt {
  background: var(--av-navy);
  box-shadow: 0 2px 20px rgba(27, 42, 74, 0.22);
}

body.av-page #header nav > ul > li > a,
body.landing #header nav > ul > li > a {
  color: #fff;
}

/* Replace the template slate (#2e3842) with the modern navy so the preload
   screen and legacy dark sections stop clashing with the new palette. */
body {
  background: var(--av-navy);
}

.wrapper.style2 {
  background-color: var(--av-navy);
}

body.av-page #footer,
body.landing #footer {
  background: var(--av-navy);
}

/* Index banner preload/fade overlay (was slate #2e3842) */
body.landing #banner:after {
  background: var(--av-navy);
  transition: opacity 0.6s ease;
  transition-delay: 0s;
}

/* Speed up the index banner intro so it matches the snappier reveals */
body.landing #banner h2 {
  transition:
    transform 0.45s ease,
    opacity 0.45s ease;
  transition-delay: 0.1s;
}

body.landing #banner h2:before,
body.landing #banner h2:after {
  transition: width 0.5s ease;
  transition-delay: 0.35s;
}

body.landing #banner .more {
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  transition-delay: 0.6s;
}

/* Clear the fixed header on the first section of modern pages */
body.av-page #main.av-section:first-of-type,
body.av-page .av-page-top {
  padding-top: 7em;
}

/* ---------- Product feature rows ---------- */
.av-product {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.2em;
  align-items: center;
  margin-top: 4.5em;
}

/* ---------- Catalog layout with sticky index ---------- */
.av-catalog-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 3.4em;
  align-items: start;
  margin-top: 3em;
}

.av-catalog-index {
  position: sticky;
  top: 96px;
  align-self: start;
}

.av-catalog-index-title {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--av-blue);
  margin: 0 0 1em 1.1em;
}

.av-catalog-index nav {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--av-line);
}

.av-catalog-index a {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  padding: 0.7em 1.1em;
  margin-left: -2px;
  border-left: 2px solid transparent;
  border-bottom: 0;
  text-decoration: none;
  color: var(--av-muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.av-catalog-index nav a + a {
  border-top: 1px solid var(--av-line);
}

.av-catalog-index a:hover {
  color: var(--av-navy);
}

.av-catalog-index a.is-active {
  border-left-color: var(--av-blue);
  color: var(--av-navy);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent);
}

.av-ci-name {
  font-weight: 800;
  font-size: 1.02rem;
}

.av-ci-sub {
  font-size: 0.8rem;
  color: var(--av-muted);
}

.av-catalog-items .av-product {
  grid-template-columns: 1.15fr 1fr;
  margin-top: 1.6em;
  gap: 2.2em;
  padding: clamp(1.4em, 2.2vw, 2em);
  background: #fff;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius-lg);
  box-shadow: var(--av-shadow-sm);
  align-items: stretch;
  min-height: 700px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  scroll-margin-top: 92px;
}

.av-catalog-items .av-product.av-reverse {
  grid-template-columns: 1fr 1.15fr;
}

.av-catalog-items .av-product:hover {
  transform: translateY(-4px);
  box-shadow: var(--av-shadow-md);
  border-color: var(--av-blue-soft);
}

.av-catalog-items .av-product:first-of-type {
  margin-top: 0;
}

.av-catalog-items .av-product + .av-product {
  padding-top: clamp(1.5em, 2.4vw, 2.4em);
}

.av-catalog-items .av-product-media {
  border: 0;
  box-shadow: none;
  background: none;
  padding: 0;
  min-height: 0;
  display: flex;
}

.av-catalog-items .av-product-media::after {
  display: none;
}

.av-catalog-items .av-product-photo {
  flex: 1;
  width: 100%;
  background: var(--av-gradient-soft);
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius-lg);
  padding: clamp(1.4em, 2.2vw, 2em);
  display: flex;
  flex-direction: column;
  gap: clamp(1.2em, 2vw, 1.6em);
}

.av-catalog-items .av-product-photo img {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 0;
  filter: none;
}

.av-catalog-items .av-product-media .av-spec-list {
  margin: 0;
  padding-top: clamp(1.2em, 2vw, 1.6em);
  border-top: 1px solid var(--av-line);
}

.av-catalog-items .av-product-media .av-spec-list li {
  font-weight: 600;
  color: var(--av-navy);
}

.av-catalog-items .av-product-content {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding: clamp(0.4em, 1vw, 1em) 0;
}

.av-catalog-items .av-product-content .av-product-tags {
  margin-bottom: 1.4em;
}

.av-catalog-items .av-product-content h3 {
  margin-bottom: 0.25em;
}

.av-catalog-items .av-product-content .av-product-sub {
  margin: 0 0 1.3em;
  padding-bottom: 1.3em;
  border-bottom: 1px solid var(--av-line);
}

.av-catalog-items .av-product-content > p:not(.av-product-sub) {
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--av-muted);
  max-width: 48ch;
  margin: 0 0 1.2em;
}

.av-catalog-items .av-product-content > p:not(.av-product-sub):last-of-type {
  margin-bottom: 2em;
}

.av-catalog-items .av-product-content .av-btn {
  margin-top: auto;
  align-self: flex-start;
}

.av-product:first-of-type {
  margin-top: 3.4em;
}

.av-product + .av-product {
  padding-top: 4.5em;
  border-top: 1px solid var(--av-line);
}

.av-product.av-reverse .av-product-media {
  order: 2;
}

.av-product-media {
  position: relative;
  border-radius: var(--av-radius-lg);
  background: var(--av-gradient-soft);
  border: 1px solid var(--av-line);
  box-shadow: var(--av-shadow-md);
  padding: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.av-product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    620px 320px at 85% -15%,
    rgba(59, 130, 246, 0.16),
    transparent 60%
  );
  pointer-events: none;
}

.av-product-media img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 20px 34px rgba(27, 42, 74, 0.24));
}

.av-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55em;
  margin-bottom: 1.1em;
}

.av-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45em 0.9em;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--av-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.av-tag-new {
  background: var(--av-gradient);
  color: #fff;
  border: 0;
}

.av-product-content h3 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--av-navy);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
  margin: 0 0 0.15em;
}

.av-product-sub {
  color: var(--av-blue);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 1em;
}

.av-product-content > p {
  color: var(--av-muted);
  font-size: 1.03rem;
  line-height: 1.7;
  margin: 0 0 1.3em;
}

.av-spec-list {
  list-style: none;
  margin: 0 0 1.7em;
  padding: 0;
  display: grid;
  gap: 0.75em;
}

.av-catalog-items .av-spec-list {
  margin-bottom: 1.4em;
}

.av-spec-list li {
  display: flex;
  gap: 0.7em;
  align-items: flex-start;
  color: var(--av-ink);
  font-size: 0.98rem;
  line-height: 1.5;
  padding: 0;
  border: 0;
}

.av-spec-list li::before {
  display: none;
}

.av-spec-list li svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--av-blue);
  margin-top: 1px;
}

/* ---------- Comparison table ---------- */
.av-compare-wrap {
  margin-top: 3em;
  overflow-x: auto;
  border-radius: var(--av-radius-lg);
  border: 1px solid var(--av-line);
  box-shadow: var(--av-shadow-sm);
  background: #fff;
}

.av-compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
  margin: 0;
}

.av-compare thead th {
  background: var(--av-navy);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 1.1em 1.1em;
  text-align: center;
  border: 0;
}

.av-compare thead th:first-child {
  text-align: left;
}

.av-compare thead th .av-th-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--av-blue-soft);
  letter-spacing: 0.04em;
  text-transform: none;
  margin-top: 0.25em;
}

.av-compare tbody tr {
  border: 0;
  background: #fff;
}

.av-compare tbody tr:nth-child(2n) {
  background: var(--av-bg-soft);
}

.av-compare tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--av-navy);
  font-size: 0.95rem;
  padding: 0.95em 1.1em;
  border: 0;
  border-bottom: 1px solid var(--av-line);
  text-transform: none;
  letter-spacing: 0;
}

.av-compare tbody td {
  text-align: center;
  padding: 0.95em 1.1em;
  border: 0;
  border-bottom: 1px solid var(--av-line);
  color: var(--av-muted);
  font-size: 0.95rem;
}

.av-compare tbody tr:last-child th,
.av-compare tbody tr:last-child td {
  border-bottom: 0;
}

.av-compare .av-yes {
  color: #16a34a;
}

.av-compare .av-no {
  color: #94a3b8;
}

.av-compare svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

@media screen and (max-width: 980px) {
  .av-catalog-layout {
    grid-template-columns: 1fr;
    gap: 1.6em;
  }

  .av-catalog-index {
    position: sticky;
    top: 60px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    margin: 0 -5vw;
    padding: 0.6em 5vw;
    border-bottom: 1px solid var(--av-line);
  }

  .av-catalog-index-title {
    display: none;
  }

  .av-catalog-index nav {
    flex-direction: row;
    gap: 0.3em;
    border-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .av-catalog-index nav a + a {
    border-top: 0;
  }

  .av-catalog-index a {
    flex: 0 0 auto;
    margin-left: 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 0.5em 0.9em;
    white-space: nowrap;
  }

  .av-catalog-index a.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--av-blue);
    background: none;
  }

  .av-ci-sub {
    display: none;
  }
}

@media screen and (max-width: 860px) {
  .av-product {
    grid-template-columns: 1fr;
    gap: 1.8em;
  }

  .av-catalog-items .av-product,
  .av-catalog-items .av-product.av-reverse {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 1.8em;
  }

  .av-catalog-items .av-product-photo img {
    max-width: 240px;
  }

  .av-catalog-items .av-product-content {
    align-self: stretch;
    padding: 0;
  }

  .av-catalog-items .av-product-content > p:not(.av-product-sub) {
    max-width: none;
  }

  .av-product.av-reverse .av-product-media {
    order: 0;
  }
}

/* ---------- Scroll reveal ---------- */
.av-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}

.av-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .av-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 980px) {
  .av-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .av-card.av-span-2 {
    grid-column: span 2;
  }

  .av-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .av-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 640px) {
  .av-section {
    padding: 4em 0;
  }

  .av-bento,
  .av-steps {
    grid-template-columns: 1fr;
  }

  .av-card.av-span-2 {
    grid-column: span 1;
  }

  .av-quote {
    padding: 2.2em 1.6em;
  }

  .av-quote p {
    font-size: 1.12rem;
  }
}
