/* =========================================
   Wyoming Barndominium Builders — Main CSS
   ========================================= */

:root {
  --brown-dark: #2C1810;
  --brown-mid: #5C3317;
  --brown-warm: #8B4513;
  --gold: #C8860A;
  --gold-light: #E8A020;
  --cream: #FAF6EF;
  --cream-dark: #F0E8D8;
  --steel: #4A5568;
  --sky: #2B6CB0;
  --green-wyoming: #2D5A27;
  --text-dark: #1A1008;
  --text-mid: #3D2B1A;
  --text-light: #6B5B4E;
  --white: #FFFFFF;
  --shadow: 0 4px 24px rgba(44,24,16,0.12);
  --shadow-lg: 0 12px 48px rgba(44,24,16,0.18);
  --radius: 8px;
  --radius-lg: 16px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--brown-dark);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }

p { margin-bottom: 1rem; color: var(--text-mid); }
p:last-child { margin-bottom: 0; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(200,134,10,0.35);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,134,10,0.45);
}
.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.6);
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.12);
}
.btn-secondary {
  display: inline-block;
  background: var(--brown-dark);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--brown-mid); }

/* ---- LAYOUT ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.section-alt { background: var(--cream-dark); }
.section-dark {
  background: var(--brown-dark);
  color: var(--cream);
}
.section-dark h2, .section-dark h3 { color: var(--cream); }
.section-dark p { color: rgba(250,246,239,0.8); }

/* ---- HEADER / NAV ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brown-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  height: var(--nav-height);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}
.logo-main {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}
.logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links .nav-cta {
  background: var(--gold);
  color: var(--white);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  margin-left: 0.5rem;
}
.nav-links .nav-cta:hover { background: var(--gold-light); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--brown-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 0.5rem 0;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0;
}
.dropdown li a:hover { background: rgba(255,255,255,0.08); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a3a1a 0%, #2c4a2c 30%, #4a3010 65%, #2c1810 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(200,134,10,0.15) 0%, transparent 60%);
}
.hero-mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200'%3E%3Cpolygon points='0,200 0,140 120,60 260,130 380,40 520,120 640,30 760,110 900,20 1040,100 1160,35 1300,95 1440,50 1440,200' fill='rgba(44,24,16,0.6)'/%3E%3Cpolygon points='0,200 0,160 100,100 220,150 340,80 480,140 600,70 720,130 860,50 980,120 1100,65 1220,110 1360,75 1440,95 1440,200' fill='rgba(26,16,8,0.8)'/%3E%3C/svg%3E") no-repeat bottom center / cover;
  opacity: 0.85;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(200,134,10,0.2);
  border: 1px solid rgba(200,134,10,0.5);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.stat span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

/* ---- WHY US ---- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  transition: transform 0.2s, box-shadow 0.2s;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.why-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
.why-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* ---- SERVICES PREVIEW ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-img {
  height: 180px;
  background: linear-gradient(135deg, var(--brown-mid), var(--brown-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.service-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.3));
}
.service-body { padding: 1.5rem; }
.service-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.service-body p { font-size: 0.9rem; margin-bottom: 1rem; }

/* ---- CITIES GRID ---- */
.cities-section { background: var(--cream-dark); }
.cities-intro {
  max-width: 640px;
  margin-bottom: 3rem;
}
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.city-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  border: 1px solid rgba(92,51,23,0.1);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.city-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 6px 24px rgba(200,134,10,0.15);
}
.city-card .city-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-dark);
}
.city-card .city-region {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.city-card .city-arrow {
  margin-top: 0.75rem;
  color: var(--gold);
  font-size: 1rem;
}

/* ---- PROCESS ---- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 1.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
}
.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.4;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  line-height: 1;
}
.process-step h4 { color: var(--cream); margin-bottom: 0.5rem; font-size: 1.05rem; }
.process-step p { font-size: 0.9rem; color: rgba(250,246,239,0.7); }

/* ---- TESTIMONIALS ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
}
.testimonial::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.2;
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
  line-height: 1;
}
.testimonial p { font-style: italic; margin-bottom: 1.25rem; padding-top: 1.5rem; }
.testimonial-author strong { display: block; font-weight: 600; color: var(--brown-dark); }
.testimonial-author span { font-size: 0.85rem; color: var(--text-light); }
.stars { color: var(--gold); font-size: 1rem; margin-bottom: 0.75rem; display: block; }

/* ---- CTA BAND ---- */
.cta-band {
  background: linear-gradient(135deg, var(--gold) 0%, var(--brown-warm) 100%);
  padding: 4rem 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,0.88); max-width: 560px; margin: 0 auto 2rem; }
.cta-band .btn-outline { border-color: rgba(255,255,255,0.8); }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--brown-dark);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; color: rgba(255,255,255,0.6); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul a { font-size: 0.875rem; color: rgba(255,255,255,0.65); transition: color 0.15s; }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--brown-dark), var(--brown-mid));
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(200,134,10,0.15)'/%3E%3C/svg%3E");
}
.page-hero h1 { color: var(--white); position: relative; }
.page-hero p { color: rgba(255,255,255,0.75); max-width: 600px; margin: 1rem auto 0; position: relative; }
.breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
  position: relative;
}
.breadcrumb a { color: var(--gold-light); }
.breadcrumb span { margin: 0 0.4rem; }

/* ---- CITY PAGE ---- */
.city-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.city-img-placeholder {
  height: 380px;
  background: linear-gradient(135deg, var(--green-wyoming), var(--brown-mid));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}
.nearby-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.nearby-tag {
  background: var(--cream-dark);
  border: 1px solid rgba(92,51,23,0.15);
  color: var(--brown-mid);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.nearby-tag:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 3rem auto 0; }
.faq-item {
  border-bottom: 1px solid rgba(92,51,23,0.15);
  padding: 1.5rem 0;
}
.faq-question {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question::after { content: '+'; color: var(--gold); font-size: 1.4rem; flex-shrink: 0; }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { display: none; padding-top: 1rem; font-size: 0.95rem; }
.faq-item.open .faq-answer { display: block; }

/* ---- CONTACT FORM ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(92,51,23,0.2);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,134,10,0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit { width: 100%; padding: 1rem; font-size: 1.05rem; cursor: pointer; border: none; }

/* ---- GALLERY ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  background: linear-gradient(135deg, var(--brown-mid), var(--brown-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--white);
  font-size: 0.85rem;
  padding: 1rem 1rem 0.75rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .city-intro-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--brown-dark); padding: 1rem; box-shadow: var(--shadow-lg); gap: 0; z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.75rem 1rem; font-size: 1rem; }
  .dropdown { position: static; display: block; background: rgba(255,255,255,0.05); margin-top: 0.25rem; box-shadow: none; border: none; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { gap: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 80vh; }
}
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-outline { text-align: center; }
}
