/* ==========================================================================
   MONTEMOR ARQUITETURA E ENGENHARIA — Styles
   Based on Fluid Glass Design System
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --size: 1600;
  --color-black: #0b0b0b;
  --color-white: #fff;
  --color-gold: #c9a84c;
  --color-gold-light: #e2c97e;
  --color-grey: #1a1a1a;
  --color-grey-light: #2a2a2a;
  --color-cream: #f5f2ed;
  --color-text: #e8e8e8;
  --color-text-muted: #999;

  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);

  --font-s: calc((100vw / var(--size)) * 10);
  --font-f-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-f-mono: 'JetBrains Mono', monospace;
}

@media (max-width: 600px) {
  :root { --size: 375; }
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-s);
  scroll-behavior: smooth;
}

body {
  background: var(--color-black);
  color: var(--color-text);
  font-family: var(--font-f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; color: inherit; cursor: pointer; font: inherit; }
img, video { display: block; max-width: 100%; }
ul, ol { list-style: none; }

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

/* --- Typography --- */
.heading-xl {
  font-family: var(--font-f-sans);
  font-size: 11rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.heading-l {
  font-family: var(--font-f-sans);
  font-size: 6rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.heading-m {
  font-family: var(--font-f-sans);
  font-size: 3.6rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.heading-s {
  font-family: var(--font-f-sans);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.2;
}

.body-l {
  font-family: var(--font-f-sans);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.6;
}

.body-m {
  font-family: var(--font-f-sans);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
}

.caption {
  font-family: var(--font-f-mono);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.text-muted { color: var(--color-text-muted); }

@media (max-width: 600px) {
  .heading-xl { font-size: 5.5rem; }
  .heading-l { font-size: 3.6rem; }
  .heading-m { font-size: 2.8rem; }
  .heading-s { font-size: 2rem; }
  .body-l { font-size: 1.6rem; }
}

/* --- Components --- */
.base-title {
  align-items: center;
  color: var(--color-gold);
  display: flex;
  font-family: var(--font-f-mono);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.base-title::before {
  background: var(--color-gold);
  content: "";
  display: block;
  height: 0.6rem;
  margin-right: 1.2rem;
  transform: rotate(45deg) translateY(-0.2rem);
  width: 0.6rem;
}

.base-button {
  align-items: center;
  display: inline-flex;
  font-family: var(--font-f-mono);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.3s var(--ease-out-cubic);
}

.base-button.is-gold {
  background: var(--color-gold);
  color: var(--color-black);
  padding: 1.8rem 3.2rem;
}

.base-button.is-gold:hover {
  background: var(--color-gold-light);
  transform: translateY(-2px);
}

/* --- Glass Panel --- */
.glass-panel {
  backdrop-filter: blur(2rem);
  background: color-mix(in srgb, var(--color-black) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-gold) 15%, transparent);
}

/* --- Header --- */
.header {
  align-items: center;
  display: flex;
  height: 5.5rem;
  justify-content: center;
  left: 50%;
  position: fixed;
  transform: translateX(-50%);
  width: 30rem;
  z-index: 200;
  border-radius: 0.4rem;
}

@media (max-width: 600px) {
  .header { bottom: 2.5rem; width: 90%; }
}
@media (min-width: 601px) {
  .header { bottom: 3rem; }
}

.header__nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 2.4rem;
  width: 100%;
}

.header__logo {
  font-family: var(--font-f-mono);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--color-gold);
}

.header__menu-btn {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
}

.header__menu-btn span {
  background: var(--color-white);
  display: block;
  height: 1px;
  transition: all 0.3s var(--ease-in-out-cubic);
  width: 2rem;
}

.header__menu-btn.is-active span:first-child {
  transform: rotate(45deg) translate(0.3rem, 0.3rem);
}
.header__menu-btn.is-active span:last-child {
  transform: rotate(-45deg) translate(0.3rem, -0.3rem);
}

/* --- Menu Overlay --- */
.menu {
  color: var(--color-white);
  left: 50%;
  padding: 5rem 4rem;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out-cubic), visibility 0.4s;
  z-index: 199;
  border-radius: 0.4rem;
  bottom: 10rem;
  width: 30rem;
}

@media (max-width: 600px) {
  .menu { width: 90%; bottom: 9rem; }
}

.menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.menu__nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.menu__link {
  font-family: var(--font-f-sans);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.menu__link:hover {
  color: var(--color-gold);
}

/* --- Hero Section --- */
.section-hero {
  position: relative;
  color: var(--color-white);
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-layer {
  inset: 0;
  overflow: hidden;
  position: absolute;
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, color-mix(in srgb, var(--color-gold) 6%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, color-mix(in srgb, var(--color-gold) 4%, transparent) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--color-gold) 2%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--color-black) 70%, transparent) 0%, color-mix(in srgb, var(--color-black) 85%, transparent) 50%, var(--color-black) 100%);
}

.section-hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12rem 4rem 8rem;
  max-width: 90rem;
  width: 100%;
}

@media (max-width: 600px) {
  .section-hero__content { padding: 10rem 2rem 6rem; }
}

.hero__logo {
  margin-bottom: 6rem;
  width: 100%;
  max-width: 70rem;
}

.hero__logo-img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

@media (max-width: 600px) {
  .hero__logo { max-width: 34rem; margin-bottom: 4rem; }
}

.hero__subtitle {
  color: var(--color-text-muted);
  max-width: 54rem;
  margin-bottom: 5rem;
}

.hero__cta {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8rem;
}

@media (max-width: 600px) {
  .hero__cta { flex-direction: column; gap: 1.5rem; margin-bottom: 6rem; }
}

.base-button.is-outline {
  background: none;
  border: 1px solid color-mix(in srgb, var(--color-gold) 50%, transparent);
  color: var(--color-gold);
  padding: 1.8rem 3.2rem;
}

.base-button.is-outline:hover {
  border-color: var(--color-gold);
  background: color-mix(in srgb, var(--color-gold) 8%, transparent);
}

.hero__scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  color: var(--color-gold);
  opacity: 0.6;
}

.hero__scroll-line {
  width: 1px;
  height: 4rem;
  background: linear-gradient(180deg, var(--color-gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Sections --- */
.section {
  position: relative;
  padding: 12rem 0;
}

@media (max-width: 600px) {
  .section { padding: 8rem 0; }
}

.section--dark {
  background: var(--color-grey);
}

.container {
  position: relative;
  margin: 0 4rem;
}

@media (max-width: 600px) {
  .container { margin: 0 2rem; }
}

.section-header {
  border-top: 1px solid color-mix(in srgb, var(--color-gold) 30%, transparent);
  margin-bottom: 6rem;
  padding-top: 2rem;
}

.section__label {
  margin-bottom: 4rem;
}

.section__grid {
  display: grid;
  gap: 4rem;
}

@media (min-width: 601px) {
  .section__grid {
    grid-template-columns: 1fr 2fr;
    gap: 8rem;
  }
}

.section__content p {
  margin-top: 2.5rem;
  color: var(--color-text-muted);
}

.section__content p:first-of-type {
  margin-top: 4rem;
}

/* --- Areas Grid --- */
.areas-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 601px) {
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
  }
}

.area-card {
  background: var(--color-grey);
  border: 1px solid color-mix(in srgb, var(--color-gold) 15%, transparent);
  border-radius: 0.4rem;
  padding: 4rem 3rem;
  transition: border-color 0.3s var(--ease-out-cubic), transform 0.3s var(--ease-out-cubic);
}

.area-card:hover {
  border-color: color-mix(in srgb, var(--color-gold) 40%, transparent);
  transform: translateY(-4px);
}

.area-card__icon {
  color: var(--color-gold);
  height: 4.8rem;
  margin-bottom: 2.5rem;
  width: 4.8rem;
}

.area-card__icon svg {
  height: 100%;
  width: 100%;
}

.area-card .heading-s {
  margin-bottom: 1.5rem;
  color: var(--color-white);
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  gap: 1px;
  background: color-mix(in srgb, var(--color-gold) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-gold) 15%, transparent);
  border-radius: 0.4rem;
  overflow: hidden;
}

@media (min-width: 601px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-item {
  background: var(--color-grey);
  padding: 4rem 3.5rem;
  transition: background 0.3s;
}

.service-item:hover {
  background: var(--color-grey-light);
}

.service-item__number {
  color: var(--color-gold);
  display: block;
  margin-bottom: 1.5rem;
}

.service-item .heading-s {
  color: var(--color-white);
  margin-bottom: 1.2rem;
}

/* --- Values Grid --- */
.values-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 601px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
  }
}

.value-card {
  border-left: 2px solid var(--color-gold);
  padding-left: 3rem;
}

.value-card .heading-m {
  color: var(--color-white);
  margin-bottom: 2rem;
}

.value-card .body-l {
  color: var(--color-text-muted);
}

.values-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-white) 10%, transparent);
  color: var(--color-text-muted);
}

.values-list li:last-child {
  border-bottom: none;
}

/* --- Footer --- */
.footer {
  background: var(--color-black);
  border-top: 1px solid color-mix(in srgb, var(--color-gold) 20%, transparent);
  color: var(--color-white);
  padding: 12rem 0 6rem;
  position: relative;
}

@media (max-width: 600px) {
  .footer { padding: 8rem 0 4rem; }
}

.footer__content {
  margin: 0 4rem;
}

@media (max-width: 600px) {
  .footer__content { margin: 0 2rem; }
}

.footer__top {
  margin-bottom: 8rem;
}

.footer__top .heading-l {
  margin-top: 3rem;
}

.footer__info {
  display: grid;
  gap: 4rem;
  margin-bottom: 8rem;
}

@media (min-width: 601px) {
  .footer__info {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer__col .caption {
  color: var(--color-gold);
  display: block;
  margin-bottom: 1rem;
}

.footer__col .body-l,
.footer__col .body-m {
  color: var(--color-text-muted);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4rem;
  border-top: 1px solid color-mix(in srgb, var(--color-white) 10%, transparent);
}

@media (max-width: 600px) {
  .footer__bottom {
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
  }
}

.footer__social {
  display: flex;
  gap: 2.5rem;
}

.footer__link {
  font-size: 1.4rem;
  color: var(--color-text-muted);
  position: relative;
  transition: color 0.3s;
}

.footer__link:hover {
  color: var(--color-gold);
}

.footer-text {
  font-size: 1.3rem;
  color: color-mix(in srgb, var(--color-white) 40%, transparent);
}

/* --- Animations --- */
.anim-text-reveal .line-mask {
  position: relative;
  display: block;
  overflow: clip;
  margin: -1rem 0;
  padding: 1rem 0;
}

.anim-text-reveal .line {
  position: relative;
  display: block;
  transform: translate(0%, 120%);
  will-change: transform;
  transition: transform 0.8s var(--ease-out-quart);
}

.anim-text-reveal .line:nth-child(1) { transition-delay: 0s; }
.anim-text-reveal .line:nth-child(2) { transition-delay: 0.1s; }
.anim-text-reveal .line:nth-child(3) { transition-delay: 0.2s; }

.anim-text-reveal.is-visible .line {
  transform: translate(0%, 0%);
}

.anim-fade-up {
  opacity: 0;
  transform: translateY(3rem);
  transition: opacity 0.8s var(--ease-out-cubic), transform 0.8s var(--ease-out-cubic);
}

.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-border-reveal {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s var(--ease-in-out-quart);
}

.anim-border-reveal.is-visible {
  transform: scaleX(1);
}

.anim-link-underline {
  position: relative;
}

.anim-link-underline::after {
  background: var(--color-gold);
  content: "";
  height: 1px;
  inset: auto auto 0 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s cubic-bezier(1, 0, 0, 1);
  width: 100%;
}

@media (hover: hover) {
  .anim-link-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

/* --- Stats Section --- */
.section--stats {
  padding: 8rem 0;
  border-top: 1px solid color-mix(in srgb, var(--color-gold) 15%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-gold) 15%, transparent);
}

.stats-grid {
  display: grid;
  gap: 4rem;
}

@media (min-width: 601px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
}

.stat-item {
  text-align: center;
  padding: 2rem;
  position: relative;
}

@media (min-width: 601px) {
  .stat-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 5rem;
    width: 1px;
    background: color-mix(in srgb, var(--color-gold) 30%, transparent);
  }
}

.stat-item__number {
  font-family: var(--font-f-sans);
  font-size: 6rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--color-white);
  line-height: 1;
}

.stat-item__suffix {
  font-family: var(--font-f-sans);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--color-gold);
  margin-left: 0.3rem;
}

.stat-item__label {
  margin-top: 1.2rem;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .stat-item__number { font-size: 4.5rem; }
  .stat-item__suffix { font-size: 2rem; }
}

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 601px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 28rem);
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.4rem;
  min-height: 22rem;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

.portfolio-card__bg {
  position: absolute;
  inset: 0;
  transition: transform 0.6s var(--ease-out-cubic);
}

.portfolio-card:hover .portfolio-card__bg {
  transform: scale(1.05);
}

.portfolio-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-card__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--color-black) 85%, transparent) 100%);
}

.portfolio-card__content {
  position: relative;
  z-index: 1;
  padding: 3rem;
  color: var(--color-white);
}

.portfolio-card__content .caption {
  color: var(--color-gold);
  display: block;
  margin-bottom: 0.8rem;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 601px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
  }
}

.testimonial-card {
  background: color-mix(in srgb, var(--color-white) 3%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-gold) 12%, transparent);
  border-radius: 0.4rem;
  padding: 4rem 3rem 3rem;
  position: relative;
}

.testimonial-card__quote {
  font-family: var(--font-f-sans);
  font-size: 8rem;
  font-weight: 300;
  color: var(--color-gold);
  line-height: 0.5;
  margin-bottom: 2rem;
  opacity: 0.6;
}

.testimonial-card .body-l {
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

.testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.testimonial-card__author .heading-s {
  color: var(--color-white);
  font-size: 1.8rem;
}

/* --- Contact Form --- */
.contact-form {
  margin-bottom: 8rem;
  padding-top: 4rem;
}

.contact-form__row {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 601px) {
  .contact-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.contact-form__field label {
  color: var(--color-gold);
}

.contact-form__field input,
.contact-form__field textarea {
  background: color-mix(in srgb, var(--color-white) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-gold) 20%, transparent);
  border-radius: 0.4rem;
  color: var(--color-white);
  font-family: var(--font-f-sans);
  font-size: 1.5rem;
  padding: 1.5rem 2rem;
  transition: border-color 0.3s var(--ease-out-cubic), background 0.3s;
  outline: none;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: color-mix(in srgb, var(--color-white) 30%, transparent);
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--color-gold);
  background: color-mix(in srgb, var(--color-white) 8%, transparent);
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 12rem;
}

.contact-form .base-button {
  margin-top: 2rem;
  transition: all 0.3s var(--ease-out-cubic);
}

.contact-form .base-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.contact-form__status {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  border-radius: 0.4rem;
  display: none;
}

.contact-form__status.is-success {
  display: block;
  background: color-mix(in srgb, #25d366 10%, transparent);
  border: 1px solid color-mix(in srgb, #25d366 30%, transparent);
  color: #25d366;
}

.contact-form__status.is-error {
  display: block;
  background: color-mix(in srgb, #e74c3c 10%, transparent);
  border: 1px solid color-mix(in srgb, #e74c3c 30%, transparent);
  color: #e74c3c;
}

/* --- Custom Cursor --- */
.glass-cursor {
  align-items: center;
  backdrop-filter: blur(1.5rem);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-gold) 20%, transparent), color-mix(in srgb, var(--color-gold) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--color-gold) 30%, transparent);
  border-radius: 50%;
  color: var(--color-white);
  display: flex;
  height: 5rem;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.2s, transform 0.2s var(--ease-out-cubic);
  width: 5rem;
  z-index: 999;
}

.glass-cursor.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cursor__label {
  font-size: 1rem;
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .glass-cursor { display: none; }
}

/* --- Header Scroll Behavior --- */
.header {
  transition: transform 0.4s var(--ease-out-cubic), background 0.3s;
}

.header.is-hidden {
  transform: translateX(-50%) translateY(150%);
}

.header.is-scrolled {
  background: color-mix(in srgb, var(--color-black) 95%, transparent);
}

/* --- Project Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out-cubic), visibility 0.4s;
}

.modal.is-open {
  pointer-events: all;
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--color-black) 85%, transparent);
  backdrop-filter: blur(0.8rem);
}

.modal__container {
  position: relative;
  display: grid;
  max-width: 90rem;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  border-radius: 0.6rem;
  transform: scale(0.9) translateY(3rem);
  transition: transform 0.5s var(--ease-out-quart);
}

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

@media (min-width: 601px) {
  .modal__container {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (max-width: 600px) {
  .modal__container {
    grid-template-rows: 25rem 1fr;
    max-height: 90vh;
    width: 95%;
  }
}

.modal__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: var(--color-white);
  background: color-mix(in srgb, var(--color-black) 50%, transparent);
  border-radius: 50%;
  backdrop-filter: blur(1rem);
  transition: background 0.3s, transform 0.3s;
}

.modal__close:hover {
  background: color-mix(in srgb, var(--color-gold) 20%, transparent);
  transform: rotate(90deg);
}

.modal__close svg {
  width: 2rem;
  height: 2rem;
}

.modal__image {
  position: relative;
  overflow: hidden;
  background: var(--color-grey);
}

.modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__body {
  padding: 4rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 600px) {
  .modal__body { padding: 3rem 2.5rem; }
}

.modal__category {
  color: var(--color-gold);
}

.modal__title {
  color: var(--color-white);
}

.modal__description {
  color: var(--color-text-muted);
}

.modal__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--color-gold) 15%, transparent);
}

.modal__detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal__detail .caption {
  color: var(--color-gold);
}

.modal__detail .body-m {
  color: var(--color-text);
}

/* --- WhatsApp Float --- */
.whatsapp {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  z-index: 150;
}

@media (max-width: 600px) {
  .whatsapp { bottom: 2rem; right: 2rem; }
}

.whatsapp__btn {
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px color-mix(in srgb, #25d366 40%, transparent);
  transition: transform 0.3s var(--ease-out-cubic), box-shadow 0.3s;
}

.whatsapp__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px color-mix(in srgb, #25d366 50%, transparent);
}

.whatsapp__popup {
  position: absolute;
  bottom: 7.5rem;
  right: 0;
  width: 32rem;
  background: var(--color-grey);
  border: 1px solid color-mix(in srgb, #25d366 20%, transparent);
  border-radius: 1rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.3s var(--ease-out-cubic), transform 0.3s var(--ease-out-cubic), visibility 0.3s;
  box-shadow: 0 10px 40px color-mix(in srgb, var(--color-black) 60%, transparent);
}

@media (max-width: 600px) {
  .whatsapp__popup { width: 28rem; right: -1rem; }
}

.whatsapp__popup.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.whatsapp__popup-header {
  background: #075e54;
  color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.whatsapp__popup-header .body-m {
  flex: 1;
  font-weight: 500;
}

.whatsapp__popup-close {
  color: color-mix(in srgb, #fff 70%, transparent);
  transition: color 0.2s;
}

.whatsapp__popup-close:hover {
  color: #fff;
}

.whatsapp__popup-body {
  padding: 2rem;
  background: color-mix(in srgb, var(--color-grey-light) 50%, var(--color-grey));
}

.whatsapp__popup-body p {
  color: var(--color-text-muted);
  background: var(--color-grey);
  padding: 1.5rem;
  border-radius: 0.6rem;
  border-top-left-radius: 0;
  position: relative;
}

.whatsapp__popup-cta {
  display: block;
  text-align: center;
  padding: 1.5rem;
  background: #25d366;
  color: #fff;
  font-family: var(--font-f-mono);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.3s;
}

.whatsapp__popup-cta:hover {
  background: #20bd5a;
}
