/* ============================================
   VISTA DEVELOPMENTS — Brand Stylesheet
   Colours: Moss #2C3022, Terracotta #A94B29,
            Clay #E1DFDC, Peach #E7A47E
   Font: Halyard Display (Regular + Book)
   ============================================ */

/* Font Faces */
@font-face {
  font-family: 'Halyard Display';
  src: url('../assets/fonts/halyard-display-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Halyard Display';
  src: url('../assets/fonts/HalyardDisBook.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --moss: #2C3022;
  --terracotta: #A94B29;
  --clay: #E1DFDC;
  --peach: #E7A47E;
  --white: #FFFFFF;
  --black: #111111;
  --moss-light: rgba(44, 48, 34, 0.7);
  --font-primary: 'Halyard Display', 'Georgia', serif;
  --transition: 0.3s ease;
  --max-width: 1400px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-weight: 300;
  color: var(--moss);
  background-color: var(--moss);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* White section for contrast */
.section--white {
  background-color: var(--white);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

/* Typography */
.overline {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terracotta);
}

h1, .h1 {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--moss);
}

h2, .h2 {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--moss);
}

h3, .h3 {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.3;
  color: var(--moss);
}

h4, .h4 {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--moss);
}

p {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--moss);
  max-width: 680px;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

.section {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

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

.section--moss {
  background-color: var(--moss);
  color: var(--clay);
}

.section--moss h1,
.section--moss h2,
.section--moss h3,
.section--moss h4,
.section--moss p,
.section--moss .overline {
  color: var(--clay);
}

.section--moss .overline {
  color: var(--peach);
}

/* Grid */
.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
}

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

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

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

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

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

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background-color 0.5s ease, padding 0.4s ease, box-shadow 0.4s ease;
  padding: 1.5rem 0;
}

/* On hero — transparent with light text */
.nav .nav__links a {
  color: var(--clay);
  transition: color 0.4s ease;
}

.nav .nav__links a::after {
  background-color: var(--peach);
}

.nav .nav__links a:hover,
.nav .nav__links a.active {
  color: var(--peach);
}

.nav .nav__toggle span {
  background-color: var(--clay);
  transition: background-color 0.4s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Scrolled — Moss background with Clay text */
.nav--scrolled {
  background-color: rgba(44, 48, 34, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.nav--scrolled .nav__links a {
  color: var(--clay);
}

.nav--scrolled .nav__links a:hover,
.nav--scrolled .nav__links a.active {
  color: var(--peach);
}

.nav--scrolled .nav__links a::after {
  background-color: var(--peach);
}

.nav--scrolled .nav__toggle span {
  background-color: var(--clay);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

.nav__logo img,
.nav__logo svg {
  height: 40px;
  width: auto;
  transition: height var(--transition), opacity var(--transition);
}

.nav--scrolled .nav__logo img,
.nav--scrolled .nav__logo svg {
  height: 32px;
}

/* On hero: show Clay logo (logo-light), hide Moss (logo-dark) */
.nav__logo .logo-dark {
  display: none;
}

.nav__logo .logo-light {
  display: block;
}

/* Scrolled: still show Clay logo on Moss nav — same as hero */
.nav--scrolled .nav__logo .logo-dark {
  display: none;
}

.nav--scrolled .nav__logo .logo-light {
  display: block;
}

.nav__links {
  display: none;
  gap: 2.5rem;
  align-items: center;
}

.nav__links a {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--terracotta);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--terracotta);
}

/* Mobile Menu */
.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: var(--clay);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

.nav__mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--moss);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 999;
}

.nav__mobile.active {
  opacity: 1;
  visibility: visible;
}

.nav__mobile a {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  transition: color var(--transition);
}

.nav__mobile a:hover {
  color: var(--terracotta);
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__toggle {
    display: none;
  }
}

/* Terracotta accent divider */
.accent-bar {
  height: 4px;
  background: var(--terracotta);
  width: 100%;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--moss);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 48, 34, 0.7) 0%,
    rgba(44, 48, 34, 0.3) 40%,
    rgba(44, 48, 34, 0.1) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(1.5rem, 4vw, 4rem);
  padding-right: clamp(1.5rem, 4vw, 4rem);
  width: 100%;
}

.hero__content .overline {
  color: var(--peach);
  margin-bottom: 1rem;
}

.hero__content h1 {
  color: var(--clay);
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.hero__content p {
  color: var(--clay);
  font-size: 1.125rem;
  max-width: 560px;
  opacity: 0.9;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: clamp(1.5rem, 4vw, 4rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--clay);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--clay), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border: 1px solid;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
}

.btn--primary {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.btn--primary:hover {
  background-color: var(--terracotta);
  color: var(--white);
}

.btn--secondary {
  border-color: var(--clay);
  color: var(--clay);
}

.btn--secondary:hover {
  background-color: var(--clay);
  color: var(--moss);
}

.btn--filled {
  background-color: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

.btn--filled:hover {
  background-color: #8a3d20;
  border-color: #8a3d20;
}

.btn--terracotta {
  border-color: var(--terracotta);
  background-color: var(--terracotta);
  color: var(--white);
}

.btn--terracotta:hover {
  background-color: var(--peach);
  border-color: var(--peach);
  color: var(--moss);
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  group: true;
}

.project-card__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card__image {
  transform: scale(1.03);
}

.project-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(44, 48, 34, 0.8) 0%, transparent 100%);
  transition: opacity var(--transition);
}

.project-card__status {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.project-card__title {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--clay);
  margin-bottom: 0.25rem;
}

.project-card__location {
  font-size: 0.85rem;
  color: var(--clay);
  opacity: 0.8;
  font-weight: 300;
}

/* ============================================
   FEATURES / VALUES
   ============================================ */
.feature {
  text-align: center;
  padding: 2rem 1rem;
}

.feature__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  stroke: var(--terracotta);
  fill: none;
  stroke-width: 1.5;
}

.feature h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature p {
  margin: 0 auto;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ============================================
   SPLIT SECTION (50/50)
   ============================================ */
.split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 500px;
}

.split__image {
  height: 400px;
  background-size: cover;
  background-position: center;
  background-color: var(--clay);
}

.split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 5rem);
  background-color: var(--white);
}

.split__content .overline {
  margin-bottom: 1rem;
}

.split__content h2 {
  margin-bottom: 1.5rem;
}

.split__content p {
  margin-bottom: 2rem;
}

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

  .split__image {
    height: auto;
    min-height: 500px;
  }

  .split--reverse .split__image {
    order: 2;
  }

  .split--reverse .split__content {
    order: 1;
  }
}

/* ============================================
   CONTACT FORM
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 1rem;
  color: var(--moss);
  background-color: var(--white);
  border: 1px solid var(--clay);
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--terracotta);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: var(--moss);
  color: var(--clay);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer__logo img,
.footer__logo svg {
  height: 36px;
  width: auto;
  margin-bottom: 1.5rem;
}

.footer__text {
  font-size: 0.9rem;
  color: var(--clay);
  opacity: 0.7;
  max-width: 320px;
  line-height: 1.7;
}

.footer__heading {
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 1.25rem;
}

.footer__links a {
  display: block;
  font-size: 0.9rem;
  color: var(--clay);
  opacity: 0.7;
  margin-bottom: 0.75rem;
  transition: opacity var(--transition);
}

.footer__links a:hover {
  opacity: 1;
  color: var(--peach);
}

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

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(225, 223, 220, 0.2);
  color: var(--clay);
  font-size: 0.85rem;
  transition: all var(--transition);
}

.footer__social a:hover {
  border-color: var(--peach);
  color: var(--peach);
}

.footer__divider {
  height: 1px;
  background-color: rgba(225, 223, 220, 0.15);
  margin-bottom: 2rem;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--clay);
  opacity: 0.5;
}

.footer__bottom a {
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer__bottom a:hover {
  opacity: 1;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   ANIMATIONS — Fade in on scroll
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ============================================
   PAGE-SPECIFIC: About
   ============================================ */
.stat {
  text-align: center;
  padding: 2rem 0;
}

.stat__number {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ============================================
   PAGE-SPECIFIC: Contact
   ============================================ */
.contact-info {
  margin-bottom: 2rem;
}

.contact-info__item {
  margin-bottom: 1.5rem;
}

.contact-info__label {
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.25rem;
}

.contact-info__value {
  font-size: 1rem;
  font-weight: 300;
}

.contact-info__value a:hover {
  color: var(--terracotta);
}

/* Map placeholder */
.map-placeholder {
  width: 100%;
  height: 400px;
  background-color: var(--clay);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--moss);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ============================================
   PAGE HEADER (for interior pages)
   ============================================ */
.page-header {
  padding-top: clamp(8rem, 15vw, 12rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background-color: var(--moss);
  text-align: center;
}

.page-header .overline {
  color: var(--peach);
  margin-bottom: 1rem;
}

.page-header h1 {
  color: var(--clay);
}

.page-header p {
  color: var(--clay);
  opacity: 0.8;
  margin: 1rem auto 0;
  text-align: center;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

.text-center p {
  margin-left: auto;
  margin-right: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* ============================================
   TEAM SECTION
   ============================================ */
.team-card {
  text-align: center;
}

.team-card__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background-color: var(--clay);
  margin-bottom: 1.25rem;
}

.team-card__name {
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-card__role {
  font-size: 0.85rem;
  opacity: 0.7;
  font-weight: 300;
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.cta-banner h2 {
  margin-bottom: 1.5rem;
}

.cta-banner p {
  margin: 0 auto 2.5rem;
  text-align: center;
}

/* ============================================
   PROJECT FILTER
   ============================================ */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
  opacity: 0.65;
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  opacity: 1;
  border-bottom-color: var(--terracotta);
  color: var(--terracotta);
}
