/* ==========================================================================
   Dr. Viktor Nelson — Cirurgia do Joelho
   Nova Identidade Visual: Columbia-Serial + Paleta Oficial (#28344B, #F2EEEA,
   #ACA299, #000100) + Imagens WebP otimizadas + SEO Técnico.
   ========================================================================== */

@font-face {
  font-family: 'Columbia-Serial';
  src:
    url('../assets/fonts/columbia-serial-regular.woff2') format('woff2'),
    url('../assets/fonts/columbia-serial-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Columbia-Serial';
  src:
    url('../assets/fonts/columbia-serial-bold.woff2') format('woff2'),
    url('../assets/fonts/columbia-serial-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 4 Brand Colors (Official Spec) */
  --blue-primary: #28344b;
  --off-white: #f2eeea;
  --taupe: #aca299;
  --black: #000100;

  /* Derived Surfaces & Opacities */
  --white: #ffffff;
  --surface-black: #000000;
  --surface-xray: #141d28;
  --text-body: rgba(0, 1, 0, 0.72);
  --text-light-muted: rgba(242, 238, 234, 0.78);
  --border-dark: rgba(172, 162, 153, 0.34);
  --border-light: rgba(40, 52, 75, 0.1);

  /* Typography */
  --font-main: 'Columbia-Serial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container-max: 1160px;
  --header-height: 82px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  background-color: var(--white);
  color: var(--black);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

/* Accessibility Helpers */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: 9999px;
  background-color: var(--blue-primary);
  color: var(--off-white);
  font-size: 14px;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

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

/* Container & Shared Typography */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.section-header {
  max-width: 660px;
  margin-bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-primary);
}

.eyebrow--light {
  color: var(--taupe);
}

.section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--black);
}

.section-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
}

/* ==================== PILL BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 26px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease-out),
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--blue-primary);
  color: var(--off-white);
  border: 1px solid var(--blue-primary);
}

.btn-primary:hover {
  background-color: #1e283b;
  border-color: #1e283b;
  box-shadow: 0 10px 24px rgba(40, 52, 75, 0.24);
}

.btn-light {
  background-color: var(--off-white);
  color: var(--blue-primary);
  border: 1px solid var(--off-white);
}

.btn-light:hover {
  background-color: var(--white);
  border-color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--off-white);
  border: 1px solid var(--taupe);
}

.btn-outline-light:hover {
  background-color: rgba(242, 238, 234, 0.1);
  border-color: var(--off-white);
}

.btn-sm {
  min-height: 40px;
  padding: 9px 22px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* ==================== HEADER ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: var(--white);
  border-bottom: 1px solid rgba(40, 52, 75, 0.08);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(40, 52, 75, 0.08);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  width: 168px;
  height: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  padding-block: 6px;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background-color: var(--blue-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s var(--ease-out);
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid rgba(40, 52, 75, 0.2);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: background-color 0.2s ease;
}

.menu-toggle:hover {
  background-color: var(--off-white);
}

.menu-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--blue-primary);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  border-top: 1px solid rgba(40, 52, 75, 0.08);
  box-shadow: 0 20px 40px rgba(40, 52, 75, 0.14);
  padding: 20px 24px 28px;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  font-size: 16px;
  color: var(--black);
  transition: background-color 0.2s ease;
}

.mobile-nav-link:hover {
  background-color: var(--off-white);
  color: var(--blue-primary);
}

/* ==================== SEC 1: HERO ==================== */
.hero-section {
  background-color: var(--blue-primary);
  color: var(--off-white);
  padding-block: 64px 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(172, 162, 153, 0.55);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--off-white);
}

.hero-title {
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--off-white);
}

.hero-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-light-muted);
  max-width: 470px;
}

.hero-crm {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

/* 3-Photo Bento Grid matching mockup */
.hero-bento {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  grid-template-rows: 224px 224px;
  gap: 14px;
}

.bento-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background-color: #1f293c;
}

.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.bento-card:hover img {
  transform: scale(1.03);
}

.bento-card--tall {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.bento-card--tall img {
  object-position: center 20%;
}

.bento-card--top {
  grid-column: 2;
  grid-row: 1;
}

.bento-card--top img {
  object-position: center 26%;
}

.bento-card--bottom {
  grid-column: 2;
  grid-row: 2;
}

.bento-card--bottom img {
  object-position: center 18%;
}

/* ==================== SEC 2: PAIN POINTS ==================== */
.pain-section {
  background-color: var(--off-white);
  padding-block: 88px;
}

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

.pain-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(40, 52, 75, 0.06);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(40, 52, 75, 0.08);
}

.pain-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--blue-primary);
}

.pain-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
}

/* ==================== SEC 3: TRANSFORMATION BANNER ==================== */
.transform-section {
  background-color: var(--white);
  padding-block: 72px 44px;
}

.transform-banner {
  position: relative;
  background-color: var(--surface-black);
  border-radius: 24px;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

.transform-content {
  position: relative;
  z-index: 2;
  padding: 52px 32px 52px 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.transform-title {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--off-white);
}

.transform-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light-muted);
  max-width: 420px;
}

.transform-media {
  position: relative;
  height: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.transform-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ==================== SEC 4: A TRINDADE DA ORTOPEDIA ==================== */
.trindade-section {
  background-color: var(--white);
  padding-block: 56px 96px;
}

.trindade-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 56px;
}

.trindade-media {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--off-white);
}

.trindade-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.trindade-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.trindade-pillars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-block: 10px 8px;
}

.pillar-item {
  background-color: var(--off-white);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  border: 1px solid rgba(40, 52, 75, 0.05);
}

.trindade-cta {
  margin-top: 6px;
}

/* ==================== SEC 5: 3-STEP JOURNEY (X-RAY) ==================== */
.steps-section {
  position: relative;
  background-color: var(--surface-xray);
  color: var(--off-white);
  padding-block: 96px;
  overflow: hidden;
}

.steps-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.steps-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.steps-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(20, 29, 40, 0.14) 0%,
    rgba(20, 29, 40, 0.62) 38%,
    rgba(20, 29, 40, 0.9) 70%,
    rgba(20, 29, 40, 0.96) 100%
  );
}

.steps-layout {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
}

.steps-panel {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.steps-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--off-white);
  max-width: 580px;
}

.steps-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-block: 10px 8px;
}

.step-card {
  background-color: rgba(20, 29, 40, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-dark);
  border-radius: 14px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-badge {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background-color: var(--off-white);
  color: var(--blue-primary);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--off-white);
}

.step-card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-light-muted);
}

.steps-cta {
  margin-top: 6px;
}

/* ==================== SEC 6: CONDITIONS TREATED ==================== */
.conditions-section {
  background-color: var(--white);
  padding-block: 96px;
}

.conditions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.condition-card {
  background-color: var(--off-white);
  border-radius: 14px;
  padding: 22px 20px 24px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(40, 52, 75, 0.05);
  transition: transform 0.22s var(--ease-out), border-color 0.22s ease, box-shadow 0.22s ease;
}

.condition-card:hover {
  transform: translateY(-3px);
  border-color: rgba(40, 52, 75, 0.2);
  box-shadow: 0 10px 26px rgba(40, 52, 75, 0.07);
}

.condition-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue-primary);
}

.condition-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--black);
}

/* ==================== SEC 7: TESTIMONIALS CAROUSEL ==================== */
.testimonials-section {
  position: relative;
  background-color: var(--off-white);
  padding-block: 96px;
  overflow: hidden;
}

.testimonials-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
}

.testimonials-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.testimonials-inner {
  position: relative;
  z-index: 1;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel-viewport {
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  transition: transform 0.42s var(--ease-out);
}

.testimonial-card {
  background-color: var(--white);
  border-radius: 18px;
  padding: 32px 28px;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(40, 52, 75, 0.07);
  box-shadow: 0 12px 32px rgba(40, 52, 75, 0.06);
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.testimonial-card.is-highlighted {
  border-color: rgba(40, 52, 75, 0.28);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  font-size: 16px;
  color: var(--blue-primary);
  letter-spacing: 1px;
}

.testimonial-quote {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-body);
  flex: 1;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(40, 52, 75, 0.08);
}

.testimonial-author {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
}

.testimonial-badge {
  font-size: 12px;
  color: var(--taupe);
}

.carousel-arrow {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background-color: var(--white);
  border: 1px solid rgba(40, 52, 75, 0.14);
  color: var(--blue-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(40, 52, 75, 0.08);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.carousel-arrow:hover {
  background-color: var(--blue-primary);
  border-color: var(--blue-primary);
  color: var(--off-white);
  transform: scale(1.06);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--taupe);
  opacity: 0.55;
  transition: width 0.25s var(--ease-out), background-color 0.2s ease, opacity 0.2s ease;
}

.carousel-dot.is-active {
  width: 24px;
  background-color: var(--blue-primary);
  opacity: 1;
}

/* ==================== SEC 8: DOCTOR BIO ==================== */
.bio-section {
  background-color: var(--white);
  padding-block: 96px 104px;
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 56px;
}

.bio-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.bio-crm {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-primary);
}

.bio-cta {
  margin-top: 8px;
}

.bio-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.bio-photo {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background-color: var(--off-white);
}

.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.6s var(--ease-out);
}

.bio-photo:hover img {
  transform: scale(1.03);
}

.bio-photo--right {
  margin-top: 44px;
}

/* ==================== FOOTER ==================== */
.site-footer {
  background-color: var(--blue-primary);
  color: var(--off-white);
  padding-block: 68px 36px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-seal {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
}

.footer-specialty {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--off-white);
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
}

.footer-address {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--off-white);
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--off-white);
  transition: color 0.2s ease;
}

.footer-instagram:hover {
  color: var(--taupe);
}

.footer-col--contact .btn {
  margin-top: 6px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(172, 162, 153, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--taupe);
}

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(15, 22, 34, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background-color: var(--off-white);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.38);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s var(--ease-out);
}

.modal-backdrop.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-primary);
  transition: background-color 0.15s ease;
}

.modal-close:hover {
  background-color: rgba(40, 52, 75, 0.08);
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-body);
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue-primary);
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(40, 52, 75, 0.18);
  background-color: var(--white);
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--black);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: var(--taupe);
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(40, 52, 75, 0.12);
}

.form-input.is-invalid {
  border-color: #c5221f;
}

.form-error {
  font-size: 12px;
  color: #c5221f;
  min-height: 14px;
}

.form-feedback {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.form-feedback.is-success {
  background-color: #e6f4ea;
  color: #137333;
  border: 1px solid #b7e1c4;
}

.form-feedback.is-error {
  background-color: #fce8e6;
  color: #c5221f;
  border: 1px solid #f6aea9;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet & Below (<= 1023px) */
@media (max-width: 1023px) {
  :root {
    --header-height: 74px;
  }

  .main-nav,
  .header-actions .btn-primary {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-section {
    padding-block: 48px 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-bento {
    grid-template-rows: 200px 200px;
  }

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

  .transform-banner {
    grid-template-columns: 1fr;
  }

  .transform-content {
    padding: 40px 28px 24px;
  }

  .transform-media {
    min-height: 260px;
  }

  .trindade-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .trindade-media {
    max-width: 480px;
    width: 100%;
    margin-inline: auto;
  }

  .steps-scrim {
    background: linear-gradient(
      180deg,
      rgba(20, 29, 40, 0.72) 0%,
      rgba(20, 29, 40, 0.9) 55%,
      rgba(20, 29, 40, 0.96) 100%
    );
  }

  .steps-layout {
    justify-content: center;
  }

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

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

  /* Carousel becomes 1-card horizontal slider on Tablet & Mobile */
  .carousel-track {
    display: flex;
    gap: 0;
  }

  .testimonial-card {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .bio-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

/* Mobile (<= 767px) */
@media (max-width: 767px) {
  .container {
    padding-inline: 18px;
  }

  .brand-logo img {
    width: 146px;
  }

  .hero-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 170px;
    gap: 10px;
  }

  .bento-card--tall {
    grid-column: 1 / span 2;
    grid-row: 1;
  }

  .bento-card--top {
    grid-column: 1;
    grid-row: 2;
  }

  .bento-card--bottom {
    grid-column: 2;
    grid-row: 2;
  }

  .hero-cta-group {
    width: 100%;
  }

  .hero-cta-group .btn {
    flex: 1 1 auto;
  }

  .pain-section,
  .trindade-section,
  .steps-section,
  .conditions-section,
  .testimonials-section,
  .bio-section {
    padding-block: 64px;
  }

  .transform-section {
    padding-block: 48px 24px;
  }

  .trindade-pillars {
    grid-template-columns: 1fr;
  }

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

  .condition-card {
    min-height: 92px;
    gap: 12px;
  }

  .carousel {
    gap: 8px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
  }

  .testimonial-card {
    padding: 24px 20px;
    min-height: 240px;
  }

  .bio-gallery {
    gap: 12px;
  }

  .bio-photo--right {
    margin-top: 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
