/* =========================================
   01. DESIGN SYSTEM
========================================= */

:root {
  --p-bg: #f7f6f2;
  --p-panel: #eeede7;
  --p-visual: #e8e6dd;
  --p-ink: #272a25;
  --p-muted: #85867d;
  --p-line: #d7d5cb;
  --p-gold: #b39460;
  --p-blue: #52758a;
  --p-white: #fff;
}

* {
  box-sizing: border-box;
}

.approach-section,
.approach-section * {
  font-family: "DM Sans", sans-serif;
}

.approach-section {
  overflow: hidden;
  padding: 72px 0 65px;
  background:
    radial-gradient(ellipse at 50% 0%, #e9e6de 0%, transparent 43%),
    var(--p-bg);
  color: var(--p-ink);
}

.approach-container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

/* =========================================
   02. INTRO
========================================= */

.approach-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
  color: var(--p-muted);
  font-size: 10px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.approach-eyebrow::before {
  width: 26px;
  height: 1px;
  background: var(--p-gold);
  content: "";
}

.approach-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  align-items: end;
  gap: 35px;
  margin-bottom: 43px;
}

.approach-heading {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 60px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -3.6px;
}

.approach-heading span {
  display: block;
  color: #83847b;
}

.approach-intro-copy p {
  margin: 0 0 18px;
  color: var(--p-muted);
  font-size: 12px;
  line-height: 1.9;
}

.approach-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.approach-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--p-gold);
}

/* =========================================
   03. FIVE-STEP NAVIGATION
========================================= */

.approach-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 30px;
}

.approach-nav::before {
  position: absolute;
  top: 18px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: var(--p-line);
  content: "";
}

.approach-tab {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--p-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.approach-tab-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--p-line);
  border-radius: 50%;
  background: var(--p-bg);
  font-size: 10px;
  transition: background .3s, color .3s, border-color .3s;
}

.approach-tab-label {
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.approach-tab:hover .approach-tab-number {
  border-color: var(--p-gold);
}

.approach-tab[aria-selected="true"] .approach-tab-number {
  border-color: var(--p-ink);
  background: var(--p-ink);
  color: white;
}

.approach-tab[aria-selected="true"] .approach-tab-label {
  color: var(--p-ink);
}

/* =========================================
   04. MAIN WORKSPACE
========================================= */

.approach-workspace {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  align-items: stretch;
  min-width: 0;
  border: 1px solid rgba(39, 42, 37, .05);
  background: var(--p-panel);
}

/* =========================================
   05. LEFT INFORMATION PANEL
========================================= */

.approach-information {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 35px 36px 27px;
  background-color: var(--p-panel);
  background-image:
    linear-gradient(rgba(94, 94, 80, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 94, 80, .035) 1px, transparent 1px);
  background-size: 37px 37px;
}

.approach-information-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 38px;
  color: var(--p-muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.approach-counter {
  color: var(--p-ink);
  white-space: nowrap;
}

.approach-counter span {
  color: var(--p-gold);
}

.approach-step-content {
  animation: approachFade .45s ease both;
}

.approach-kicker {
  margin-bottom: 17px;
  color: var(--p-gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.approach-step-title {
  max-width: 440px;
  margin: 0 0 17px;
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -1.7px;
  line-height: 1.15;
}

.approach-step-title span {
  display: block;
  color: var(--p-muted);
}

.approach-description {
  max-width: 390px;
  margin: 0 0 23px;
  color: var(--p-muted);
  font-size: 11px;
  line-height: 1.9;
}

.approach-details {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.approach-details li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: #505149;
  font-size: 10px;
  line-height: 1.6;
}

.approach-details li::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-top: 4px;
  border: 1px solid var(--p-gold);
  content: "";
  transform: rotate(45deg);
}

.approach-bottom-controls {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
}

.approach-arrow {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--p-line);
  border-radius: 50%;
  background: transparent;
  color: var(--p-ink);
  font-size: 17px;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}

.approach-arrow:hover:not(:disabled) {
  border-color: var(--p-ink);
  background: var(--p-ink);
  color: white;
}

.approach-arrow:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.approach-explore {
  color: var(--p-muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

/* =========================================
   06. RIGHT VISUAL PANEL
========================================= */

.approach-visual {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 25px 23px 20px;
  background: var(--p-visual);
}

.approach-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--p-blue);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.approach-built-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.approach-built-caption .approach-dot {
  background: var(--p-gold);
}

/* =========================================
   07. VILLA CAROUSEL
========================================= */

.villa-carousel {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 330px;
  flex: 1;
  min-height: 290px;
  overflow: hidden;
  margin: 16px 0;
  background: #deddd5;
}

.villa-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity .8s ease,
    transform 1.1s ease,
    visibility .8s;
}

.villa-slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.villa-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.78) contrast(.97);
  transition: transform 6s ease;
}

.villa-slide.is-active img {
  transform: scale(1.045);
}

/* Blueprint slide */

.villa-slide.blueprint-slide {
  background: #164985;
}

.villa-slide.blueprint-slide img {
  object-fit: contain;
  padding: 5px;
  background: #164985;
  filter: none;
  transform: none;
}

.villa-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(25, 35, 35, .27) 0%,
    transparent 34%,
    rgba(22, 29, 27, .08) 58%,
    rgba(22, 29, 27, .60) 100%
  );
}

.villa-blueprint-overlay {
  background: linear-gradient(
    to bottom,
    rgba(15, 42, 78, .13),
    transparent 55%,
    rgba(15, 42, 78, .32)
  );
}

.villa-image-tag {
  position: absolute;
  top: 51px;
  left: 15px;
  z-index: 2;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(25, 32, 29, .2);
  color: white;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 1.15px;
  backdrop-filter: blur(8px);
}

.villa-measurement {
  position: absolute;
  z-index: 3;
  right: 15px;
  left: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: white;
  font-size: 7px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .4);
  pointer-events: none;
}

.villa-measurement-top {
  top: 15px;
}

.villa-measurement-bottom {
  bottom: 59px;
  justify-content: flex-start;
}

.villa-measurement-line {
  width: 23px;
  height: 1px;
  flex: 0 0 23px;
  background: var(--p-gold);
}

/* Image controls */

.villa-controls {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.villa-control-button {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(30, 35, 32, .2);
  color: white;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .25s, color .25s;
}

.villa-control-button:hover {
  background: white;
  color: var(--p-ink);
}

.villa-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.villa-dot-button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .65);
  cursor: pointer;
  transition: width .3s, background .3s;
}

.villa-dot-button.is-active {
  width: 20px;
  background: var(--p-gold);
}

.villa-pause-button {
  position: absolute;
  top: 43px;
  right: 12px;
  z-index: 6;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(25, 32, 29, .23);
  color: white;
  font-size: 10px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

/* =========================================
   08. VISUAL FOOTER AND PROGRESS
========================================= */

.approach-visual-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(97, 98, 87, .3);
}

.approach-footer-number {
  color: var(--p-gold);
  font-size: 9px;
}

.approach-footer-copy {
  display: grid;
  gap: 7px;
}

.approach-footer-label {
  color: var(--p-blue);
  font-size: 8px;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.approach-footer-title {
  color: var(--p-ink);
  font-size: 11px;
  line-height: 1.6;
}

.approach-footer-estimate {
  padding-top: 2px;
  color: var(--p-muted);
  font-size: 7px;
  letter-spacing: .5px;
  white-space: nowrap;
}

.approach-progress-track {
  height: 2px;
  overflow: hidden;
  margin-top: 15px;
  background: rgba(39, 42, 37, .08);
}

.approach-progress-fill {
  width: 20%;
  height: 100%;
  background: var(--p-gold);
  transition: width .5s ease;
}

/* =========================================
   09. ANIMATION AND ACCESSIBILITY
========================================= */

@keyframes approachFade {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.approach-section button:focus-visible {
  outline: 2px solid var(--p-gold);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .approach-section *,
  .approach-section *::before,
  .approach-section *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   10. TABLET RESPONSIVENESS
========================================= */

@media (max-width: 900px) {
  .approach-container {
    width: calc(100% - 40px);
  }

  .approach-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .approach-intro-copy {
    max-width: 430px;
  }

  .approach-workspace {
    grid-template-columns: 1fr 1fr;
  }

  .approach-information {
    padding: 27px 22px 23px;
  }

  .approach-visual {
    padding: 21px 15px 19px;
  }

  .approach-step-title {
    font-size: clamp(27px, 3.8vw, 34px);
  }

  .villa-carousel {
    min-height: 290px;
  }

  .approach-tab-label {
    max-width: 100px;
    font-size: 9px;
  }
}

/* =========================================
   11. MOBILE — IMAGE FIRST
========================================= */

@media (max-width: 600px) {
  .approach-section {
    padding: 48px 0 42px;
  }

  .approach-container {
    width: calc(100% - 28px);
  }

  .approach-heading {
    font-size: clamp(36px, 9vw, 47px);
    letter-spacing: -2.5px;
    line-height: 1.08;
  }

  .approach-intro {
    gap: 16px;
    margin-bottom: 27px;
  }

  .approach-intro-copy p {
    font-size: 11px;
  }

  .approach-nav {
    margin-bottom: 22px;
  }

  .approach-nav::before {
    top: 15px;
    right: 8%;
    left: 8%;
  }

  .approach-tab {
    gap: 8px;
    padding: 0 1px;
  }

  .approach-tab-number {
    width: 31px;
    height: 31px;
    font-size: 9px;
  }

  .approach-tab-label {
    max-width: 62px;
    font-size: 7.5px;
    line-height: 1.4;
  }

  .approach-workspace {
    display: flex;
    flex-direction: column;
  }

  /* Put the entire visual above the description on mobile. */
  .approach-visual {
    order: 1;
    min-height: 0;
    padding: 19px 13px 17px;
  }

  .approach-information {
    order: 2;
    min-height: 365px;
    padding: 24px 21px 21px;
  }

  .approach-visual-top {
    order: 0;
  }

  .villa-carousel {
    order: 1;
    width: 100%;
    height: clamp(260px, 76vw, 390px);
    flex: none;
    min-height: 260px;
    margin: 14px 0 16px;
  }

  .villa-slide img {
    object-position: center;
  }

  .villa-image-tag {
    top: 48px;
    left: 11px;
    padding: 7px 8px;
    font-size: 6.5px;
  }

  .villa-measurement {
    right: 10px;
    left: 10px;
    font-size: 6.5px;
  }

  .villa-controls {
    right: 9px;
    bottom: 9px;
    left: 9px;
  }

  .villa-control-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .villa-dots {
    gap: 6px;
  }

  .approach-visual-footer {
    order: 2;
  }

  .approach-progress-track {
    order: 3;
  }

  .approach-information-top {
    margin-bottom: 28px;
  }

  .approach-step-title {
    font-size: clamp(29px, 7.5vw, 36px);
    letter-spacing: -1.5px;
  }

  .approach-description {
    max-width: none;
    font-size: 11px;
  }

  .approach-details {
    gap: 10px;
  }

  .approach-bottom-controls {
    padding-top: 26px;
  }
}

/* =========================================
   12. SMALL MOBILE
========================================= */

@media (max-width: 360px) {
  .approach-container {
    width: calc(100% - 22px);
  }

  .approach-tab-number {
    width: 28px;
    height: 28px;
  }

  .approach-nav::before {
    top: 14px;
  }

  .approach-tab-label {
    max-width: 53px;
    font-size: 7px;
  }

  .approach-information {
    padding-right: 17px;
    padding-left: 17px;
  }

  .approach-visual {
    padding-right: 10px;
    padding-left: 10px;
  }

  .villa-carousel {
    height: 265px;
  }

  .villa-measurement {
    font-size: 6px;
    letter-spacing: .6px;
  }

  .villa-dots {
    gap: 5px;
  }

  .villa-dot-button.is-active {
    width: 16px;
  }

  .approach-footer-title {
    font-size: 10px;
  }
}