/* =============================================
   LAGO RENOVA — Motion & Depth Layer
   Colonial premium · subtle · professional
   ============================================= */

:root {
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 4px 24px rgba(26, 47, 75, 0.07);
  --shadow-card: 0 10px 40px rgba(26, 47, 75, 0.09);
  --shadow-lift: 0 20px 50px rgba(26, 47, 75, 0.14);
  --shadow-bronze: 0 6px 28px rgba(184, 153, 112, 0.28);
  --pattern-colonial: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0l2.5 2.5L20 5l-2.5-2.5L20 0zm0 35l2.5 2.5L20 40l-2.5-2.5L20 35zM0 20l2.5 2.5L5 20l-2.5-2.5L0 20zm35 0l2.5 2.5L40 20l-2.5-2.5L35 20z' fill='%23B89970' fill-opacity='0.06'/%3E%3C/svg%3E");
}

/* ---- Ambient texture ---- */
body {
  background-color: var(--color-cream);
  background-image: var(--pattern-colonial);
  background-size: 40px 40px;
}

.section--stone {
  background: linear-gradient(
    180deg,
    #e8e4dc 0%,
    var(--color-stone) 35%,
    #ddd8cf 100%
  );
  position: relative;
}

.section--stone::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern-colonial);
  background-size: 40px 40px;
  opacity: 0.5;
  pointer-events: none;
}

.section--stone > .container {
  position: relative;
  z-index: 1;
}

.section--dark {
  background: linear-gradient(
    165deg,
    #1e3554 0%,
    var(--color-navy) 45%,
    var(--color-navy-dark) 100%
  );
  position: relative;
  overflow: hidden;
}

.section--dark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    rgba(184, 153, 112, 0.07) 0%,
    transparent 65%
  );
  pointer-events: none;
}

.section--dark > .container {
  position: relative;
  z-index: 1;
}

/* ---- Section headers ---- */
.section-header.revealed .section-label {
  animation: labelReveal 0.7s var(--ease-smooth) both;
}

.section-header.revealed .section-title {
  animation: titleReveal 0.85s var(--ease-smooth) 0.08s both;
}

.section-header.revealed .ornament__diamond {
  animation: diamondPop 0.6s var(--ease-out-expo) 0.2s both;
}

.section-header.revealed .section-subtitle {
  animation: fadeUp 0.8s var(--ease-smooth) 0.25s both;
}

@keyframes labelReveal {
  from {
    opacity: 0;
    letter-spacing: 0.4em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.25em;
  }
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes diamondPop {
  from {
    opacity: 0;
    transform: rotate(45deg) scale(0);
  }
  to {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Buttons ---- */
.btn {
  position: relative;
  transition:
    transform 0.4s var(--ease-smooth),
    box-shadow 0.4s var(--ease-smooth),
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}

.btn--primary {
  box-shadow: var(--shadow-bronze);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(184, 153, 112, 0.38);
}

.btn--navy {
  box-shadow: var(--shadow-soft);
}

.btn--navy:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.btn--outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.header__cta.btn--primary:hover {
  color: var(--color-cream);
  background: var(--color-bronze);
}

/* ---- Hero ---- */
.hero--has-image .hero__bg {
  will-change: transform;
}

.hero--has-image .hero__bg img {
  animation: heroKenBurns 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroKenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

.hero__overlay {
  background: linear-gradient(
    160deg,
    rgba(26, 47, 75, 0.92) 0%,
    rgba(26, 47, 75, 0.55) 45%,
    rgba(18, 34, 52, 0.88) 100%
  );
}

.hero__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 100%,
    rgba(184, 153, 112, 0.12) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.hero__content > .hero__eyebrow {
  animation: heroEnter 0.9s var(--ease-smooth) 0.1s both;
}

.hero__content > .hero__title {
  animation: heroEnter 0.95s var(--ease-smooth) 0.25s both;
}

.hero__content > .hero__subtitle {
  animation: heroEnter 0.9s var(--ease-smooth) 0.4s both;
}

.hero__content > .hero__actions {
  animation: heroEnter 0.9s var(--ease-smooth) 0.55s both;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__title {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25);
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    #1e3554 0%,
    var(--color-navy) 50%,
    var(--color-navy-dark) 100%
  );
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern-colonial);
  background-size: 40px 40px;
  opacity: 0.35;
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(184, 153, 112, 0.45) 50%,
    transparent
  );
}

.page-hero__content {
  position: relative;
  z-index: 1;
  animation: heroEnter 0.85s var(--ease-smooth) 0.15s both;
}

.page-hero__title {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
}

/* ---- Stats ---- */
.stats {
  background: linear-gradient(
    135deg,
    #1a2f4b 0%,
    #152a42 50%,
    var(--color-navy-dark) 100%
  );
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 50%,
    rgba(184, 153, 112, 0.08) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 80% 50%,
    rgba(184, 153, 112, 0.06) 0%,
    transparent 45%
  );
  pointer-events: none;
}

.stats > .container {
  position: relative;
  z-index: 1;
}

.stat {
  transition: transform 0.5s var(--ease-smooth);
}

.stat.revealed:hover {
  transform: translateY(-4px);
}

.stat__number {
  text-shadow: 0 0 48px rgba(184, 153, 112, 0.35);
  transition: text-shadow 0.4s ease;
}

.stat.revealed .stat__number {
  animation: statGlow 2.5s ease-in-out infinite alternate;
}

.stat__number.is-counted {
  animation: none;
}

@keyframes statGlow {
  from {
    text-shadow: 0 0 32px rgba(184, 153, 112, 0.25);
  }
  to {
    text-shadow: 0 0 56px rgba(184, 153, 112, 0.45);
  }
}

/* ---- Cards: services, values, testimonials ---- */
.service-card,
.value-card,
.diff-card,
.testimonial-card,
.working-card {
  transition:
    transform 0.45s var(--ease-smooth),
    box-shadow 0.45s var(--ease-smooth),
    border-color 0.35s ease;
}

.service-card {
  box-shadow: var(--shadow-soft);
}

.service-card:hover,
.value-card:hover,
.diff-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(184, 153, 112, 0.45);
}

.testimonial-card {
  box-shadow: var(--shadow-soft);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: rgba(184, 153, 112, 0.35);
}

.working-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 153, 112, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

.value-card::before,
.diff-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--color-bronze);
  transition: height 0.45s var(--ease-smooth);
}

.value-card,
.diff-card {
  position: relative;
  overflow: hidden;
}

.value-card:hover::before,
.diff-card:hover::before {
  height: 100%;
}

/* ---- Process steps ---- */
.process-step {
  transition: transform 0.45s var(--ease-smooth);
}

.process-step:hover {
  transform: translateY(-4px);
}

.process-step__icon {
  transition: box-shadow 0.4s ease, border-color 0.35s ease;
}

.process-step:hover .process-step__icon {
  box-shadow: 0 0 24px rgba(184, 153, 112, 0.25);
}

/* ---- Portfolio preview ---- */
.portfolio-preview__item {
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.5s var(--ease-smooth),
    box-shadow 0.5s var(--ease-smooth);
}

.portfolio-preview__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.portfolio-preview__overlay {
  transition: opacity 0.45s var(--ease-smooth);
}

/* ---- About image ---- */
.about__image-wrap {
  transition: transform 0.6s var(--ease-smooth);
}

.about__image-wrap.revealed:hover {
  transform: translateY(-4px);
}

.about__image {
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.45s ease;
}

.about__image-wrap:hover .about__image {
  box-shadow: var(--shadow-lift);
}

/* ---- FAQ ---- */
.faq__item {
  box-shadow: var(--shadow-soft);
  transition:
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s var(--ease-smooth);
}

.faq__item:hover {
  box-shadow: var(--shadow-card);
}

.faq__item[open] {
  box-shadow: var(--shadow-card);
  border-color: rgba(184, 153, 112, 0.4);
}

.faq__answer {
  animation: faqOpen 0.4s var(--ease-smooth);
}

@keyframes faqOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Contact form ---- */
.contact-form {
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.45s ease;
}

.contact-form:focus-within {
  box-shadow: var(--shadow-lift);
}

.contact__info-item {
  transition: transform 0.35s var(--ease-smooth);
}

.contact__info-item:hover {
  transform: translateX(4px);
}

/* ---- Header depth ---- */
.header--scrolled {
  box-shadow:
    0 1px 0 rgba(184, 153, 112, 0.18),
    0 8px 32px rgba(18, 34, 52, 0.12);
}

/* ---- Enhanced scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.85s var(--ease-smooth),
    transform 0.85s var(--ease-smooth);
  transition-delay: var(--delay, 0s);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.8s var(--ease-smooth),
    transform 0.8s var(--ease-smooth);
  transition-delay: var(--delay, 0s);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ---- WhatsApp pulse ---- */
.whatsapp-btn {
  animation: waPulse 3s ease-in-out infinite;
}

@keyframes waPulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.2),
      0 0 0 8px rgba(37, 211, 102, 0.15);
  }
}

.whatsapp-btn:hover {
  animation: none;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .hero--has-image .hero__bg img,
  .hero__content > *,
  .page-hero__content,
  .stat.revealed .stat__number,
  .whatsapp-btn {
    animation: none !important;
  }

  .reveal,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .service-card:hover,
  .value-card:hover,
  .diff-card:hover,
  .testimonial-card:hover,
  .btn--primary:hover,
  .btn--navy:hover {
    transform: none;
  }
}
