/* ============================================================
   Daniel Hodgins — Property Landing Page Styles
   Clean, fast, mobile-first for residential listings in Nevada
   Brand: Gold #A48F59 · Black #141414 · White · Louis George Cafe
   ============================================================ */

/* --- Self-Hosted Brand Fonts: Louis George Cafe --- */
@font-face {
  font-family: 'Louis George Cafe';
  src: url('../fonts/LouisGeorgeCafe-Light.woff2') format('woff2'),
       url('../fonts/LouisGeorgeCafe-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Louis George Cafe';
  src: url('../fonts/LouisGeorgeCafe.woff2') format('woff2'),
       url('../fonts/LouisGeorgeCafe.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Louis George Cafe';
  src: url('../fonts/LouisGeorgeCafe-Italic.woff2') format('woff2'),
       url('../fonts/LouisGeorgeCafe-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Louis George Cafe';
  src: url('../fonts/LouisGeorgeCafe-Bold.woff2') format('woff2'),
       url('../fonts/LouisGeorgeCafe-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  /* Type Scale (fluid) */
  --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);

  /* Spacing (4px base) */
  --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;

  /* Fonts — Daniel Hodgins Brand */
  --font-display: 'Louis George Cafe', 'Josefin Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Louis George Cafe', 'Josefin Sans', 'Helvetica Neue', sans-serif;

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

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

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

/* --- Light Mode (Default) — DH Brand Colors --- */
:root, [data-theme="light"] {
  --color-bg:             #faf9f6;
  --color-surface:        #ffffff;
  --color-surface-offset: #f5f3ef;
  --color-divider:        #e5e2dc;
  --color-border:         #d4d0c9;
  --color-text:           #141414;
  --color-text-muted:     #6a6560;
  --color-text-faint:     #B4B4B4;
  --color-text-inverse:   #ffffff;
  --color-primary:        #A48F59;
  --color-primary-hover:  #8c7a4c;
  --color-primary-active: #746540;
  --color-primary-light:  #f5f0e4;
  --color-accent:         #A48F59;
  --color-accent-hover:   #8c7a4c;
  --shadow-sm: 0 1px 3px rgba(20, 20, 20, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 20, 20, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 20, 20, 0.12);
}

/* --- Dark Mode — DH Brand Colors --- */
[data-theme="dark"] {
  --color-bg:             #141414;
  --color-surface:        #1e1e1e;
  --color-surface-offset: #262626;
  --color-divider:        #333333;
  --color-border:         #444444;
  --color-text:           #f0ede8;
  --color-text-muted:     #B4B4B4;
  --color-text-faint:     #6a6560;
  --color-text-inverse:   #141414;
  --color-primary:        #c4aa6a;
  --color-primary-hover:  #d4bc7e;
  --color-primary-active: #A48F59;
  --color-primary-light:  #2a2520;
  --color-accent:         #c4aa6a;
  --color-accent-hover:   #d4bc7e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141414;
    --color-surface:        #1e1e1e;
    --color-surface-offset: #262626;
    --color-divider:        #333333;
    --color-border:         #444444;
    --color-text:           #f0ede8;
    --color-text-muted:     #B4B4B4;
    --color-text-faint:     #6a6560;
    --color-text-inverse:   #141414;
    --color-primary:        #c4aa6a;
    --color-primary-hover:  #d4bc7e;
    --color-primary-active: #A48F59;
    --color-primary-light:  #2a2520;
    --color-accent:         #c4aa6a;
    --color-accent-hover:   #d4bc7e;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

/* --- 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; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.2; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }

a, button, input, textarea, select {
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

::selection {
  background: rgba(164, 143, 89, 0.25);
  color: var(--color-text);
}

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

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

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

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

.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-4);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo img {
  height: 66px;
  width: auto;
}

/* Theme-aware logo switching: gold-on-black for light, gold-on-white for dark */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-text-muted);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.05) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: var(--space-12) var(--space-6) var(--space-10);
  max-width: var(--content-wide);
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: #fff;
  margin-bottom: var(--space-3);
}

.hero-address {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-6);
}

.hero-price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: #fff;
  margin-bottom: var(--space-6);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.hero-stat {
  color: rgba(255,255,255,0.9);
  font-size: var(--text-sm);
}

.hero-stat strong {
  display: block;
  font-size: var(--text-lg);
  color: #fff;
  font-weight: 600;
}

/* --- Quick Facts Bar --- */
.quick-facts {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-6);
}

.quick-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  text-align: center;
}

.quick-fact {
  padding: var(--space-3);
}

.quick-fact-icon {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

.quick-fact-value {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
}

.quick-fact-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Description Section --- */
.description {
  background: var(--color-bg);
}

.description-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

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

.description-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}

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

.description-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.detail-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

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

.detail-list li {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.detail-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-list li span:first-child {
  color: var(--color-text-muted);
}

.detail-list li span:last-child {
  font-weight: 600;
}

/* --- Photo Gallery --- */
.gallery {
  background: var(--color-surface-offset);
}

.gallery h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
}

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

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: #fff;
  font-size: var(--text-xl);
  padding: var(--space-2);
  z-index: 101;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: var(--text-xl);
  padding: var(--space-4);
  z-index: 101;
}

.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }

/* --- Video Section --- */
.video-section {
  background: var(--color-bg);
}

.video-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}

.video-wrapper iframe,
.video-wrapper stream {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Features Section --- */
.features {
  background: var(--color-surface-offset);
}

.features h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Neighborhood Section --- */
.neighborhood {
  background: var(--color-bg);
}

.neighborhood h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
}

.neighborhood-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

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

.neighborhood-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.neighborhood-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
}

.neighborhood-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
}

.neighborhood-item h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.neighborhood-item p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --- Map Section --- */
.map-section {
  background: var(--color-surface-offset);
}

.map-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
}

.map-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  min-height: 300px;
}

/* --- Contact / Lead Capture --- */
.contact {
  background: var(--color-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.agent-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
}

.agent-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-offset);
  flex-shrink: 0;
}

.agent-details h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.agent-details p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.agent-details a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.agent-details a:hover {
  color: var(--color-primary-hover);
}

/* --- Form --- */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.contact-form h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(164, 143, 89, 0.2);
}

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

.form-submit {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: var(--space-4);
}

.form-submit:hover {
  background: var(--color-primary-hover);
}

.form-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
  text-align: center;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-8);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-brand img {
  height: 54px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-legal {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
  z-index: 40;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-hover);
}
