:root {
  --ink: #1a1a2e;
  --muted: #555566;
  --blue: #0033a8;
  --blue-dark: #002070;
  --red: #d41111;
  --red-soft: #fce8e8;
  --light: #f0f0f0;
  --paper: #f8f8f8;
  --line: rgba(0, 51, 168, 0.10);
  --shadow: 0 24px 70px rgba(0, 51, 168, 0.14);
  --radius: 28px;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

img,
iframe {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.narrow {
  max-width: 820px;
}

.section-pad {
  padding: 72px 0;
}

.section-pad.compact {
  padding-top: 44px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar {
  background: var(--blue);
  color: #fff;
  font-size: 0.94rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 42px;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  opacity: 0.96;
}

.topbar-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.topbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.38);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: fit-content;
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 52px;
  flex-shrink: 0;
}

.brand-text {
  display: grid;
  line-height: 1.08;
}

.brand-text strong {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.brand-text .brand-vitalis {
  color: var(--red);
}

.brand-text .brand-mc {
  color: var(--blue);
}

.brand-text small {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.footer-brand .brand-logo {
  max-height: 42px;
}

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

.nav-link {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  padding: 10px 0;
  position: relative;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-appointment,
.nav-patient {
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
}

.nav-appointment {
  background: var(--red);
}

.nav-patient {
  background: var(--blue);
}

.nav-appointment:hover,
.nav-patient:hover {
  color: #fff;
  opacity: 0.9;
}

.nav-appointment::after,
.nav-patient::after {
  display: none;
}

.lang-switch {
  position: relative;
  display: inline-flex;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.lang-toggle:hover {
  border-color: var(--blue);
}

.lang-arrow {
  font-size: 0.7rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.lang-switch:hover .lang-arrow,
.lang-switch.lang-open .lang-arrow {
  transform: rotate(180deg);
}

.lang-switch::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 110px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

.lang-switch:hover .lang-dropdown,
.lang-switch.lang-open .lang-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-option:hover {
  background: var(--paper);
  color: var(--blue);
}

.lang-option.is-active {
  background: var(--blue);
  color: #fff;
  pointer-events: none;
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-label {
  line-height: 1;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--blue);
}

.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;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  width: 720px;
  height: 720px;
  inset: -280px -160px auto auto;
  border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
  background: radial-gradient(circle, rgba(0, 51, 168, 0.12), transparent 70%);
  animation: blobFloat 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 2;
}

.hero-blob-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  inset: auto auto -180px -100px;
  border-radius: 50% 40% 40% 60% / 60% 50% 50% 40%;
  background: radial-gradient(circle, rgba(212, 17, 17, 0.10), transparent 70%);
  animation: blobFloat 22s ease-in-out infinite alternate-reverse;
  pointer-events: none;
  z-index: 2;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%  { transform: translate(30px, -20px) rotate(5deg) scale(1.05); }
  66%  { transform: translate(-20px, 30px) rotate(-3deg) scale(0.95); }
  100% { transform: translate(10px, -10px) rotate(4deg) scale(1.02); }
}

.hero-slides {
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  min-height: 500px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 52px;
}

.two-column,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px;
}

.align-center {
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.45);
}

.hero-copy,
.hero-card {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 650px;
}

.hero-copy h1 {
  color: #fff;
}

.hero-copy .lead {
  color: rgba(255, 255, 255, 0.78);
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  display: inline-block;
  width: 28px;
  height: 2px;
  content: "";
  background: var(--red);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.06;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
}

h3 {
  font-size: 1.28rem;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
}

.hero-actions,
.center-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 16px 32px rgba(0, 51, 168, 0.24);
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--blue);
}

.btn-light {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-points span,
.values-row span {
  padding: 9px 14px;
  border: 1px solid rgba(212, 17, 17, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--blue);
  font-weight: 800;
}

.hero-card h2 {
  margin-bottom: 14px;
  color: #fff;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.78);
}

.hero-card-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, #fff 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px;
  pointer-events: none;
}

.hero-card-inner {
  position: relative;
  min-height: 530px;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 42px;
  background:
    linear-gradient(160deg, rgba(0, 51, 168, 0.94), rgba(0, 32, 112, 0.92)),
    var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.hero-dot.is-active {
  background: var(--blue);
  transform: scale(1.2);
}

.hero-dot:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.hero-prev,
.hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(0, 51, 168, 0.5);
  font-size: 1.4rem;
  line-height: 0;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(2px);
}

.hero-prev:hover,
.hero-next:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--blue);
}

.hero-prev:focus-visible,
.hero-next:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.hero-prev { left: 12px; }
.hero-next { right: 12px; }

.contact-pill {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.contact-pill strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-grid,
.service-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

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

.feature-card,
.service-card,
.process-card,
.content-card,
.statement-card,
.form-card,
.contact-info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 50px rgba(16, 36, 43, 0.06);
}

.feature-card,
.service-card,
.process-card,
.content-card,
.statement-card {
  padding: 30px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover,
.service-card:hover,
.process-card:hover,
.content-card:hover,
.statement-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0, 51, 168, 0.12);
}

.feature-card p,
.service-card p,
.process-card p,
.content-card p,
.statement-card p,
.section-heading p,
.two-column p,
.form-card p,
.contact-info-card p {
  color: var(--muted);
}

.service-card span,
.process-card span {
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 16px;
  background: var(--red-soft);
  font-size: 1.6rem;
}

.services-preview {
  background: linear-gradient(180deg, var(--paper), var(--light));
}

.section-heading {
  margin-bottom: 34px;
}

.split-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: 36px;
}

.center-action {
  justify-content: center;
}

.soft-section {
  background: var(--light);
}

.dark-card {
  background: var(--blue);
  color: #fff;
}

.dark-card p,
.dark-card .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.team-section {
  background: var(--paper);
}

.providers-hero {
  background:
    radial-gradient(circle at 20% 50%, rgba(212, 17, 17, 0.12), transparent 32%),
    linear-gradient(135deg, var(--paper), var(--light));
}

.providers-section {
  background: var(--paper);
}

.providers-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.team-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.team-photo {
  overflow: hidden;
  border-radius: 16px;
}

.team-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.team-name {
  font-size: 1.35rem;
  color: var(--red);
  margin: 0 0 4px;
}

.team-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  margin: 0 0 16px;
}

.team-summary {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

.cta-band {
  background: linear-gradient(135deg, var(--blue), #041550);
  color: #fff;
}

.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-content p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.78);
}

.page-hero {
  background:
    radial-gradient(circle at 80% 24%, rgba(212, 17, 17, 0.18), transparent 28%),
    linear-gradient(135deg, var(--paper), var(--light));
}

.about-hero .statement-card {
  background: var(--blue);
  color: #fff;
}

.about-hero .statement-card p {
  color: rgba(255, 255, 255, 0.78);
}

.values-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-section {
  background: var(--paper);
}

.contact-grid {
  grid-template-columns: 0.82fr 1.18fr;
  align-items: start;
}

.contact-info-card,
.form-card {
  padding: 34px;
}

.contact-line {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact-line strong {
  color: var(--blue);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notice {
  margin-top: 24px;
  padding: 16px;
  border-radius: 18px;
  background: var(--red-soft);
}

.alert {
  margin: 22px 0;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
}

.alert-success {
  background: #e6f7ee;
  color: #145337;
}

.alert-error {
  background: #fff0ed;
  color: #8a2a18;
}

form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.two-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(212, 17, 17, 0.14);
}

textarea {
  resize: vertical;
}

.check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.captcha-wrap {
  margin-top: 20px;
}

.captcha-wrap .g-recaptcha > div {
  margin: 0 auto;
}

@media (max-width: 360px) {
  .captcha-wrap {
    transform: scale(0.85);
    transform-origin: left center;
  }
}

.map-section {
  background: var(--light);
}

.map-frame {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 430px;
  border: 0;
}

.site-footer {
  background: #041550;
  color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  padding: 62px 0;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 20px;
}

.site-footer h2 {
  margin-bottom: 18px;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0;
}

.site-footer a,
.site-footer span {
  display: block;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    top: 129px;
    right: 20px;
    left: 20px;
    display: grid;
    justify-content: stretch;
    gap: 4px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.nav-open .nav-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link,
  .lang-switch {
    width: 100%;
    justify-content: center;
  }

  .two-column,
  .contact-grid,
  .split-heading {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .service-grid,
  .process-grid,
  .small-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card-inner {
    min-height: auto;
  }

  .team-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team-photo {
    max-width: 280px;
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .section-pad {
    padding: 62px 0;
  }

  .topbar-inner {
    min-height: auto;
    flex-direction: column;
    gap: 0;
    padding: 6px 0;
    text-align: center;
  }

  .topbar-divider {
    display: none;
  }

  .topbar-link {
    min-height: 26px;
    padding: 2px 0;
    font-size: 0.82rem;
  }

  .navbar {
    min-height: 76px;
  }

  .nav-panel {
    top: 126px;
  }

  .brand-logo {
    max-height: 48px;
  }

  .brand-text strong {
    font-size: 1.3rem;
  }

  .brand-text small {
    font-size: 0.82rem;
  }

  .hero-card-inner,
  .feature-card,
  .service-card,
  .process-card,
  .content-card,
  .statement-card,
  .form-card,
  .contact-info-card {
    padding: 24px;
    border-radius: 22px;
  }

  .feature-grid,
  .service-grid,
  .process-grid,
  .small-grid,
  .footer-grid,
  .two-fields {
    grid-template-columns: 1fr;
  }

  .cta-content {
    display: grid;
  }

  .map-frame,
  .map-frame iframe {
    min-height: 360px;
    height: 360px;
  }

  .hero-dots {
    bottom: 18px;
    gap: 8px;
  }

  .hero-dot {
    width: 10px;
    height: 10px;
  }

  .hero-prev,
  .hero-next {
    display: none;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Pre-animation state */
.anim-hidden {
  opacity: 0;
}

.anim-hidden-up {
  opacity: 0;
  transform: translateY(40px);
}

.anim-hidden-left {
  opacity: 0;
  transform: translateX(-40px);
}

.anim-hidden-right {
  opacity: 0;
  transform: translateX(40px);
}

.anim-hidden-scale {
  opacity: 0;
  transform: scale(0.92);
}

/* Animated state */
.anim-visible {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-visible-fade {
  animation: fadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-visible-left {
  animation: fadeInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-visible-right {
  animation: fadeInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-visible-scale {
  animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays for grid items */
.stagger-delay-1 { animation-delay: 0.05s; }
.stagger-delay-2 { animation-delay: 0.10s; }
.stagger-delay-3 { animation-delay: 0.15s; }
.stagger-delay-4 { animation-delay: 0.20s; }
.stagger-delay-5 { animation-delay: 0.25s; }
.stagger-delay-6 { animation-delay: 0.30s; }
.stagger-delay-7 { animation-delay: 0.35s; }
.stagger-delay-8 { animation-delay: 0.40s; }

/* Hover lift effect */
.hover-lift {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0, 51, 168, 0.12);
}

/* Button pulse on hover */
.btn-primary {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 20px 48px rgba(0, 51, 168, 0.30);
}

/* Smooth section transitions */
section {
  transition: background 0.5s ease;
}

/* Hero floating animation for the card */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero-card {
  animation: float 6s ease-in-out infinite;
}

/* Service icon hover */
.service-card span {
  transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.service-card:hover span {
  background: var(--red);
  transform: scale(1.08);
}

/* ===== Flip Cards ===== */
.service-card.flip-card {
  perspective: 1000px;
  padding: 0;
  border: none;
  overflow: hidden;
  background: transparent;
}
.service-card.flip-card:hover {
  transform: none;
  box-shadow: none;
}
.flip-inner {
  position: relative;
  width: 100%;
  height: 300px;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}
.flip-card:hover .flip-inner,
.flip-card.is-flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
}
.flip-front {
  background-size: cover;
  background-position: center;
  color: #fff;
}
.flip-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius);
}
.flip-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
}
.flip-card:hover .flip-icon {
  transform: none;
}
.flip-front h3 {
  position: relative;
  z-index: 1;
  color: #fff;
  margin-bottom: 0;
}
.flip-back {
  transform: rotateY(180deg);
  background: var(--blue);
  color: #fff;
}
.flip-back h3 {
  color: #fff;
  margin-bottom: 12px;
}
.flip-back p {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 680px) {
  .flip-inner {
    height: 260px;
  }
}

/* Process card number */
.process-card span {
  transition: background 0.3s ease, color 0.3s ease;
}

.process-card:hover span {
  background: var(--blue);
  color: #fff;
}

/* Feature card underline effect */
.feature-card h2 {
  position: relative;
  display: inline-block;
}

.feature-card h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover h2::after {
  width: 40px;
}

/* CTA band subtle scale */
.cta-band {
  transition: background 0.5s ease;
}

/* Smooth nav link */
.nav-link::after {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger children in hero — re-triggers on slide change */
.hero-slide.is-active .hero-copy > * {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.hero-slide.is-active .hero-copy > .eyebrow { animation-delay: 0.05s; }
.hero-slide.is-active .hero-copy > h1 { animation-delay: 0.15s; }
.hero-slide.is-active .hero-copy > .lead { animation-delay: 0.25s; }
.hero-slide.is-active .hero-copy > .hero-actions { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-blob,
  .hero-blob-2 {
    animation: none;
  }

  .anim-hidden,
  .anim-hidden-up,
  .anim-hidden-left,
  .anim-hidden-right,
  .anim-hidden-scale {
    opacity: 1;
    transform: none;
  }

  .hero-card {
    animation: none;
  }
}
