:root {
  --deep-teal: #6e8c47;
  --cream: #f5efe6;
  --soft-sand: #e6d5c3;
  --accent-beige: #d9c2a8;
  --hero-image: url('hero-parallax.jpg');
  --white: #ffffff;
  --text-dark: #30441c;
  --shadow-soft: 0 16px 40px rgba(11, 36, 37, 0.12);
  --shadow-strong: 0 20px 50px rgba(11, 36, 37, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

.container {
  width: min(1200px, 100% - 64px);
  margin-inline: auto;
}

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-top: 22px;
}

.topbar-inner,
.sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--deep-teal);
  font-weight: 600;
  min-width: 0;
}

.brand-icon {
  font-size: 1.2rem;
}

.brand-logo {
  width: 220px;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 0.95rem;
}

.nav a {
  position: relative;
  opacity: 0.85;
}

.nav a::after,
.footer a::after,
.text-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav a:hover::after,
.footer a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
}

.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.btn:active {
  transform: scale(0.95) !important;
}

.btn-primary {
  background: var(--deep-teal);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(110, 140, 71, 0.4);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #5a7538;
  z-index: -1;
  border-radius: 999px;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}

.btn-primary:hover::before {
  transform: scaleY(1);
}

.btn-primary:hover {
  background: var(--deep-teal);
  box-shadow: 0 12px 24px rgba(110, 140, 71, 0.6);
  color: var(--white);
}

.btn-outline {
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid rgba(15, 61, 62, 0.45);
  background: rgba(255, 255, 255, 0.2);
  color: #000000;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--deep-teal);
  z-index: -1;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}

.btn-outline:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-outline:hover {
  color: var(--white);
  border-color: var(--deep-teal);
}

.btn-pill {
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent-beige);
  color: var(--text-dark);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(217, 194, 168, 0.4);
}

.btn-pill:hover {
  background: #debfa2;
  box-shadow: 0 12px 24px rgba(217, 194, 168, 0.6);
}

.sticky-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  padding: 12px 0;
  background: rgba(245, 239, 230, 0.6);
  backdrop-filter: blur(8px);
  transform: translateY(-115%);
  transition: transform 0.35s ease, background-color 0.35s ease;
}

.sticky-header.is-visible {
  transform: translateY(0);
  background: rgba(245, 239, 230, 0.95);
}

.hero {
  position: relative;
  padding: 180px 0 0;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f2eb 0%, var(--cream) 72%);
}

.hero-parallax-layer {
  position: absolute;
  inset: 0;
  background: var(--hero-image) right center / cover no-repeat;
  opacity: 0.85;
  transform: translateY(0) scale(1.02);
  transform-origin: center top;
  transition: transform 0.16s linear;
  z-index: 0;
  pointer-events: none;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  display: none;
}

.hero::before {
  width: 420px;
  height: 620px;
  right: 110px;
  top: -120px;
  background: linear-gradient(180deg, rgba(230, 213, 195, 0.95) 0%, rgba(217, 194, 168, 0.6) 100%);
  opacity: 0.5;
}

.hero::after {
  width: 300px;
  height: 560px;
  right: -50px;
  top: -70px;
  background: linear-gradient(180deg, rgba(230, 213, 195, 0.8) 0%, rgba(217, 194, 168, 0.45) 100%);
  opacity: 0.42;
}

.hero-shape {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(230, 213, 195, 0.9) 0%, rgba(217, 194, 168, 0.55) 100%);
  opacity: 0.3;
  filter: blur(0.2px);
  z-index: 1;
  display: block;
}

.hero-shape-a {
  width: 300px;
  height: 460px;
  left: 10%;
  top: 10px;
}

.hero-shape-b {
  width: 240px;
  height: 390px;
  left: 5%;
  top: 120px;
  background: var(--accent-beige);
  opacity: 0.28;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 700px;
}

.eyebrow {
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(15, 61, 62, 0.78);
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.35rem, 6vw, 5.1rem);
  line-height: 0.95;
  color: var(--deep-teal);
  margin: 0;
}

.hero-subtitle {
  margin: 24px 0 30px;
  max-width: 50ch;
  font-size: 1.08rem;
}

.stack-mobile {
  display: inline-block;
}

.mobile-title-line {
  color: inherit;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.text-link {
  position: relative;
  font-weight: 500;
  color: var(--deep-teal);
}

.hero-note {
  margin-top: 22px;
  font-size: 0.92rem;
  color: rgba(15, 61, 62, 0.82);
}

.services .hero-note {
  color: rgba(245, 239, 230, 0.92);
  text-align: center;
  margin-top: 28px;
}

.hero-wave {
  margin-top: 40px;
  line-height: 0;
  position: relative;
  z-index: 2;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 170px;
}

.hero-wave path {
  fill: var(--deep-teal);
}

section {
  scroll-margin-top: 94px;
}

.services {
  margin-top: -1px;
  background: var(--deep-teal);
  color: var(--cream);
  padding: 20px 0 90px;
}

.services h2,
.approach h2,
.process h2,
.contact h2 {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 12px;
}

.section-intro {
  text-align: center;
  max-width: 65ch;
  margin: 0 auto 40px;
  opacity: 0.9;
}

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

.service-card {
  background: var(--cream);
  color: var(--deep-teal);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card.sand {
  background: #f1e4d6;
}

.service-icon {
  font-size: 2.2rem;
  color: var(--accent-beige);
  line-height: 1;
  transition: transform 0.3s ease;
}

.service-card h3 {
  font-family: 'Playfair Display', serif;
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2rem);
  line-height: 1.04;
}

.service-card p {
  margin: 0;
}

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.services .btn-pill {
  color: #000000;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.service-card:hover .service-icon {
  transform: rotate(-8deg);
}

.approach,
.process,
.contact {
  padding: 80px 0;
}

.approach {
  background: var(--cream);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  margin: 24px 0 30px;
}

.doc-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 15px;
}

.doc-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(11, 36, 37, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doc-gallery img:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.process {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: #ffffff;
}

.process::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 46, 47, 0.80);
  z-index: 1;
}

.process .container {
  position: relative;
  z-index: 2;
}

.process h2 {
  color: #ffffff;
}

.process-parallax-layer {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background: url('paciente.jpg') center / cover no-repeat;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.process-row {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.step {
  position: relative;
  min-height: 220px;
  background: var(--step-bg) center / cover no-repeat;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.step-content {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
  color: var(--text-dark);
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  color: var(--deep-teal);
}

.step p {
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.contact h2 {
  text-align: left;
}

.contact-form {
  background: #f9f4ec;
  border: 1px solid rgba(15, 61, 62, 0.1);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.contact-form label {
  font-weight: 600;
  color: var(--deep-teal);
}

.contact-form input {
  border: 1px solid rgba(15, 61, 62, 0.2);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus {
  outline: none;
  border-color: var(--deep-teal);
  box-shadow: 0 0 0 4px rgba(15, 61, 62, 0.12);
}

.contact-form small,
.contact-legal {
  color: rgba(15, 61, 62, 0.85);
  font-size: 0.88rem;
}

.footer {
  background: #0b2e2f;
  color: #f0e7db;
  padding: 38px 0 100px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.footer-col-left, .footer-col-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-legal {
  grid-column: 1 / -1;
  text-align: justify;
  text-align-last: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.6;
}

.footer a {
  position: relative;
}

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 12px 30px rgba(15, 61, 62, 0.26);
  animation: pulse 2.6s infinite;
}

.tooltip {
  position: absolute;
  right: 72px;
  background: #143f40;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

.mobile-cta {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: none;
  z-index: 45;
  background: var(--deep-teal);
  color: var(--white);
  text-align: center;
  font-weight: 600;
  padding: 15px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 61, 62, 0.35);
}

/* Reveal classes now managed entirely by GSAP */
.reveal {
  visibility: visible;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 12px 30px rgba(15, 61, 62, 0.22);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 15px 34px rgba(15, 61, 62, 0.33);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 12px 30px rgba(15, 61, 62, 0.22);
  }
}

@media (max-width: 980px) {
  .container {
    width: min(1200px, 100% - 40px);
  }

  .nav {
    display: none;
  }

  .topbar .btn-outline {
    display: none;
  }

  .hero {
    padding-top: 154px;
    background: linear-gradient(180deg, #f7f2eb 0%, var(--cream) 80%);
  }

  .hero-parallax-layer {
    transform: none !important;
    background: var(--hero-image) 70% center / cover no-repeat;
  }

  .hero-grid,
  .approach-grid,
  .contact-grid,
  .process-row,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .doc-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-content {
    order: 1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .btn-primary,
  .btn-pill {
    min-width: 100%;
    text-align: center;
  }

  .sticky-header .btn-primary {
    min-width: auto;
    width: auto;
    padding-inline: 18px;
    white-space: nowrap;
  }

  .hero-wave svg {
    height: 120px;
  }

  .hero::before {
    width: 270px;
    height: 360px;
    right: 10px;
    top: -100px;
    opacity: 0.45;
  }

  .hero::after {
    width: 210px;
    height: 320px;
    right: -60px;
    top: -80px;
    opacity: 0.35;
  }

  .hero-shape-a,
  .hero-shape-b {
    display: none;
  }

  .contact h2 {
    text-align: center;
  }

  .services,
  .approach,
  .process,
  .contact {
    padding: 68px 0;
  }

  .footer {
    padding-bottom: 140px;
  }

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

  .mobile-cta {
    display: block;
  }

  .whatsapp-float {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .tooltip {
    display: none;
  }
}

@media (max-width: 640px) {
  section {
    scroll-margin-top: 76px;
  }

  .topbar .btn-outline,
  .sticky-header .btn-primary {
    display: none;
  }
  
  .doc-gallery {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-top: 14px;
  }

  .sticky-header {
    padding: 10px 0;
  }

  .sticky-inner {
    gap: 10px;
  }

  .brand-logo {
    width: 170px;
  }

  .hero {
    padding-top: 120px;
  }

  .hero h1 {
    line-height: 1.02;
  }

  .hero h1 .mobile-title-line {
    color: #000000;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin: 18px 0 24px;
  }

  .stack-mobile {
    display: block;
  }

  .service-card,
  .legal-box,
  .contact-form,
  .step {
    padding: 22px;
  }

  .process-row {
    gap: 14px;
  }

  .footer {
    padding-bottom: 150px;
  }
}

@media (max-width: 420px) {
  .brand {
    gap: 6px;
  }

  .brand-logo {
    width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
