@tailwind base;
@tailwind components;
@tailwind utilities;

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reglas de Tipografía Base (Régimen Médico Premium) */
body {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
p  { font-size: 16px; line-height: 1.6; }

/* Header Capsule Styles */
.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 44px), 1400px);
  height: 86px;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(112px, 10vw, 132px) minmax(0, 1fr);
  column-gap: clamp(18px, 2.7vw, 48px);
  align-items: center;
  padding: 0 clamp(30px, 5vw, 74px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 40px rgba(6, 36, 58, 0.10);
  transition: all 0.3s ease;
}

.header-side {
  min-width: 0;
  display: flex;
  align-items: center;
}

.header-side--left {
  justify-content: flex-end;
}

.header-side--right {
  justify-content: flex-start;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 44px);
  min-width: 0;
}

.header-nav--left {
  justify-content: flex-end;
}

.header-nav--right {
  justify-content: flex-start;
}

.site-header a {
  color: #06243A;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 50px rgba(6, 36, 58, 0.14);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
  height: 100%;
}

.logo a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  width: clamp(100px, 8vw, 116px);
  height: auto;
  display: block;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  image-rendering: auto;
  transform: translateY(1px);
}

.mobile-menu-trigger {
  display: none;
}

@media (max-width: 1023px) {
  .site-header {
    height: 84px;
    grid-template-columns: 1fr 108px 1fr;
    column-gap: 16px;
    padding: 0 22px;
  }

  .header-nav {
    gap: 20px;
  }

  .site-header a {
    font-size: 10px;
    letter-spacing: .1em;
  }

  .header-nav .btn-magnetic {
    padding-left: 18px;
    padding-right: 18px;
  }

  .logo img {
    width: 100px;
  }
}

@media (max-width: 767px) {
  .site-header {
    width: min(calc(100% - 28px), 560px);
    height: 76px;
    grid-template-columns: 1fr 96px 1fr;
    padding: 0 18px;
  }

  .header-side--left {
    justify-content: flex-start;
  }

  .header-nav {
    display: none;
  }

  .logo img {
    width: 88px;
  }

  .mobile-menu-trigger {
    display: flex;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Hero Copy Glassmorphism */
.hero-copy {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 64px);
  box-shadow: 0 20px 60px rgba(6, 36, 58, 0.12);
}

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

.hero-copy p {
  color: rgba(6, 36, 58, 0.9);
}

/* Fade Utilities para fusión impecable entre secciones */
.fade-top,
.fade-bottom {
  position: relative;
  isolation: isolate;
}

.fade-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(120px, 16vh, 220px);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    #F7F4EF 0%,
    rgba(247, 244, 239, 0.82) 34%,
    rgba(247, 244, 239, 0) 100%
  );
}

.fade-bottom::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: clamp(150px, 20vh, 280px);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    #F7F4EF 0%,
    rgba(247, 244, 239, 0.86) 38%,
    rgba(247, 244, 239, 0) 100%
  );
}

/* Textos Rotativos del Hero */
#heroText {
  display: inline-block;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.65s ease;
  transform-origin: center;
  will-change: opacity, transform, filter;
}

#heroText.is-changing {
  opacity: 0;
  transform: translateY(-14px) scale(0.985);
  filter: blur(7px);
}

/* Secuencia de diagnóstico */
.diag-visual {
  isolation: isolate;
}

.diag-visual__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(247, 244, 239, 0) 58%, rgba(247, 244, 239, 0.72) 100%),
    linear-gradient(180deg, rgba(6, 36, 58, 0.10), rgba(166, 128, 104, 0.08));
}

.diag-panel {
  position: relative;
  background:
    radial-gradient(circle at 78% 18%, rgba(29, 111, 99, 0.13), transparent 32%),
    linear-gradient(135deg, #FDFBF7 0%, #F3ECE3 52%, #EAD9CB 100%);
}

.diag-panel::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(6, 36, 58, 0.10);
  border-radius: 999px;
  pointer-events: none;
}

.diag-copy {
  position: relative;
  z-index: 2;
}

.diag-kicker {
  margin-bottom: 28px;
  color: #1D6F63;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.diag-step {
  color: #06243A;
}

.diag-step-number {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: #1D6F63;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
}

.diag-step-number::after {
  content: "";
  width: 46px;
  height: 1px;
  margin-left: 14px;
  background: rgba(29, 111, 99, 0.45);
}

.diag-step h2 {
  max-width: 11ch;
  margin-bottom: 24px;
  color: #06243A;
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 4.6vw, 66px);
  font-weight: 400;
  line-height: .98;
}

.diag-step p {
  max-width: 560px;
  color: rgba(6, 36, 58, 0.72);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 400;
  line-height: 1.75;
}

.diag-rule {
  width: min(100%, 460px);
  height: 1px;
  margin-top: 28px;
  background: linear-gradient(90deg, rgba(6, 36, 58, 0.22), rgba(29, 111, 99, 0), transparent);
}

@media (max-width: 767px) {
  .diag-visual__veil {
    background:
      linear-gradient(180deg, rgba(247, 244, 239, 0) 46%, rgba(247, 244, 239, 0.82) 100%),
      linear-gradient(180deg, rgba(6, 36, 58, 0.08), rgba(166, 128, 104, 0.08));
  }

  .diag-panel {
    align-items: flex-start;
  }

  .diag-panel::before {
    inset: 14px;
    border-radius: 28px;
  }

  .diag-kicker {
    margin-bottom: 18px;
  }

  .diag-step h2 {
    max-width: 13ch;
    margin-bottom: 16px;
    font-size: clamp(32px, 10vw, 42px);
  }

  .diag-step p {
    font-size: 15px;
    line-height: 1.55;
  }
}

/* Sobre nosotros */
.about-kicker {
  margin-bottom: 18px;
  color: #1D6F63;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.about-title {
  max-width: 920px;
  color: #06243A;
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 6.4vw, 86px);
  font-weight: 400;
  line-height: .96;
}

.about-lede {
  max-width: 760px;
  margin-top: 32px;
  color: rgba(6, 36, 58, 0.78);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.65;
}

.about-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

.about-primary-cta,
.about-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}

.about-primary-cta {
  background: #06243A;
  color: #fff;
  box-shadow: 0 18px 45px rgba(6, 36, 58, 0.18);
}

.about-primary-cta:hover {
  background: #0A3859;
  color: #fff;
}

.about-secondary-cta {
  background: rgba(255, 255, 255, 0.74);
  color: #06243A;
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.about-secondary-cta:hover {
  background: #fff;
}

.about-portrait {
  position: relative;
  min-height: min(70vh, 680px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 28px 80px rgba(6, 36, 58, 0.16);
}

.about-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(6, 36, 58, 0.62) 100%);
}

.about-portrait figcaption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
}

.about-portrait span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.about-portrait strong {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.about-section {
  padding: clamp(84px, 10vw, 140px) 0;
}

.about-intro-grid,
.about-timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
}

.about-section h2,
.about-cta h2 {
  max-width: 780px;
  color: #06243A;
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 4.8vw, 68px);
  font-weight: 400;
  line-height: 1;
}

.about-copy {
  color: rgba(6, 36, 58, 0.76);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.75;
}

.about-copy p + p {
  margin-top: 24px;
}

.about-credentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 70px;
  background: rgba(6, 36, 58, 0.10);
  border: 1px solid rgba(6, 36, 58, 0.10);
}

.about-credentials article {
  min-height: 250px;
  padding: clamp(28px, 3vw, 42px);
  background: #FDFBF7;
}

.about-credentials span,
.about-method-grid span,
.about-timeline span {
  color: #1D6F63;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.about-credentials h3,
.about-method-grid h3 {
  margin-top: 24px;
  color: #06243A;
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.06;
}

.about-credentials p,
.about-method-grid p,
.about-timeline p {
  margin-top: 18px;
  color: rgba(6, 36, 58, 0.70);
  line-height: 1.65;
}

.about-method {
  background:
    radial-gradient(circle at 12% 18%, rgba(29, 111, 99, 0.12), transparent 28%),
    linear-gradient(135deg, #06243A 0%, #123B50 58%, #1D6F63 100%);
  color: #fff;
}

.about-method .about-kicker,
.about-method-grid span {
  color: #98D8C8;
}

.about-method h2,
.about-method-grid h3 {
  color: #fff;
}

.about-method-header {
  max-width: 880px;
}

.about-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 72px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.about-method-grid article {
  min-height: 320px;
  padding: clamp(28px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.about-method-grid p {
  color: rgba(255, 255, 255, 0.72);
}

.about-timeline {
  border-top: 1px solid rgba(6, 36, 58, 0.16);
}

.about-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
}

.about-list-stack {
  display: grid;
  gap: 18px;
}

.about-list-panel {
  padding: clamp(26px, 3vw, 38px);
  background: #fff;
  border: 1px solid rgba(6, 36, 58, 0.10);
}

.about-list-panel h3 {
  color: #06243A;
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 400;
  line-height: 1.08;
}

.about-list-panel ul {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  color: rgba(6, 36, 58, 0.72);
  line-height: 1.62;
}

.about-list-panel li {
  position: relative;
  padding-left: 20px;
}

.about-list-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1D6F63;
}

.about-timeline div {
  padding: 28px 0;
  border-bottom: 1px solid rgba(6, 36, 58, 0.16);
}

.about-timeline p {
  margin-top: 12px;
  font-size: clamp(16px, 1.5vw, 19px);
}

.about-cta {
  padding: clamp(92px, 12vw, 160px) 0;
  background:
    linear-gradient(rgba(247, 244, 239, 0.84), rgba(247, 244, 239, 0.90)),
    url("../video/video2/frame_036.webp") center / cover no-repeat;
}

.about-cta h2 {
  margin: 0 auto 36px;
}

.case-thumb {
  background:
    radial-gradient(circle at 72% 24%, rgba(29, 111, 99, 0.16), transparent 30%),
    linear-gradient(135deg, #F7F4EF 0%, #E7EDF0 48%, #D8C3B4 100%);
}

.case-eye-mask {
  position: absolute;
  left: var(--mask-left, 50%);
  top: var(--mask-top, 38%);
  width: min(var(--mask-width, 48%), 260px);
  height: var(--mask-height, 12%);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(6, 36, 58, 0.86);
  box-shadow: 0 8px 22px rgba(6, 36, 58, 0.22);
}

@media (max-width: 1023px) {
  .about-hero {
    min-height: auto;
  }

  .about-title {
    max-width: 860px;
    font-size: clamp(40px, 6.4vw, 62px);
  }

  .about-portrait {
    min-height: min(64vh, 590px);
  }

  .about-portrait figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-intro-grid,
  .about-timeline-grid,
  .about-detail-grid,
  .about-credentials,
  .about-method-grid {
    grid-template-columns: 1fr;
  }

  .about-credentials article,
  .about-method-grid article {
    min-height: auto;
  }
}

@media (max-width: 767px) {
  .about-title {
    font-size: clamp(42px, 14vw, 58px);
  }

  .about-hero-actions {
    flex-direction: column;
  }

  .about-primary-cta,
  .about-secondary-cta {
    width: 100%;
  }

  .about-portrait {
    min-height: 470px;
  }

  .about-portrait figcaption {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Hide scrollbar for cleaner look */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0B1E2E; 
}
::-webkit-scrollbar-thumb {
    background: #1A365D; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #06B6D4; 
}

/* Canvas utilities */
canvas {
    image-rendering: optimizeQuality;
}
