/* ========================================
   430 VIRGINIA — DESIGN TOKENS
   ======================================== */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3.5rem,   0.5rem  + 8vw,    9rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* Brand Colors */
  --gold: #C9A84C;
  --gold-dim: #A08838;
  --gold-bright: #E0C068;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Transition */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content */
  --content-wide: 1200px;
  --content-default: 960px;
}

/* ========================================
   DARK MODE (Default)
   ======================================== */
:root, [data-theme="dark"] {
  --color-bg: #111111;
  --color-surface: #181818;
  --color-surface-2: #1e1e1e;
  --color-surface-3: #252525;
  --color-border: #2a2a2a;
  --color-border-light: #333333;
  --color-text: #e8e6e1;
  --color-text-muted: #9a9890;
  --color-text-faint: #5e5d58;
  --color-text-inverse: #111111;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

/* ========================================
   LIGHT MODE
   ======================================== */
[data-theme="light"] {
  --color-bg: #f5f3ee;
  --color-surface: #eeece7;
  --color-surface-2: #e6e4df;
  --color-surface-3: #dddbd6;
  --color-border: #d0cec9;
  --color-border-light: #c5c3be;
  --color-text: #1a1916;
  --color-text-muted: #65635e;
  --color-text-faint: #9e9c97;
  --color-text-inverse: #f5f3ee;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg: #f5f3ee;
    --color-surface: #eeece7;
    --color-surface-2: #e6e4df;
    --color-surface-3: #dddbd6;
    --color-border: #d0cec9;
    --color-border-light: #c5c3be;
    --color-text: #1a1916;
    --color-text-muted: #65635e;
    --color-text-faint: #9e9c97;
    --color-text-inverse: #f5f3ee;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }

a, button, [role="button"] {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section__label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.section__intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-12);
  line-height: 1.7;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav--scrolled {
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .nav--scrolled {
  background: rgba(245, 243, 238, 0.85);
}

.nav__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--gold);
}

.nav__logo-sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link--cta {
  color: var(--gold);
  font-weight: 500;
}

.nav__link--cta:hover {
  color: var(--gold-bright);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav__toggle-theme {
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.nav__toggle-theme:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-8);
    background: var(--color-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    font-size: var(--text-lg);
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--gold);
  color: #111111;
  border-color: var(--gold);
}

.btn--primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn--outline:hover {
  background: var(--gold);
  color: #111111;
}

.btn--large {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-sm);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.4) 40%,
    rgba(0,0,0,0.6) 100%
  );
}

[data-theme="light"] .hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0.25) 40%,
    rgba(0,0,0,0.5) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-6);
}

.hero__accent-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto var(--space-6);
}

.hero__accent-line--bottom {
  margin: var(--space-6) auto var(--space-8);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__cta {
  font-size: var(--text-sm);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
  z-index: 2;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   RESIDENCE
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stat {
  text-align: center;
}

.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat__label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.residence__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: center;
}

.residence__h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.residence__text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.residence__image {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.residence__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/10;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ========================================
   AMENITIES
   ======================================== */
.amenities {
  background: var(--color-surface);
}

.amenities__primary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}

.amenity-card {
  padding: var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.amenity-card:hover {
  border-color: var(--gold-dim);
  box-shadow: var(--shadow-md);
}

.amenity-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--gold);
}

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

.amenity-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.amenity-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.amenities__secondary {
  text-align: center;
}

.amenities__secondary-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.amenities__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.tag svg {
  flex-shrink: 0;
  color: var(--gold-dim);
}

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

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

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

/* ========================================
   COMPARISON
   ======================================== */
.compare__image {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.compare__image img {
  width: 100%;
  height: auto;
}

/* ========================================
   LOCATION
   ======================================== */
.location__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: start;
}

.location__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.location__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.location__list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.location__list li strong {
  color: var(--color-text);
  font-weight: 500;
}

.location__map {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.location__map iframe {
  width: 100%;
  height: 100%;
}

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

  .location__map {
    aspect-ratio: 16/10;
  }
}

/* ========================================
   IMAGE BREAK
   ======================================== */
.section--image-break {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 300px;
  overflow: hidden;
}

.section--image-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section--image-break__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    transparent 20%,
    transparent 80%,
    var(--color-bg) 100%
  );
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
  text-align: center;
}

.contact .section__intro {
  margin-left: auto;
  margin-right: auto;
}

.contact__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.contact__note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding-block: var(--space-12);
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--gold);
}

.footer__address {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.footer__bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer__bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 640px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
