/* ==========================================================================
   John Real Design and Build — Stylesheet
   Modern mountain-lodge aesthetic: dark timber, black steel, warm copper.
   ========================================================================== */

:root {
  --charcoal:      #14171b;
  --charcoal-2:    #1b1e23;
  --steel:         #3c4148;
  --steel-soft:    #565c64;
  --stone:         #f5f1ea;
  --stone-dim:     #e8e2d5;
  --paper:         #fbf9f5;
  --line:          #dfd6c6;
  --copper:        #a5652b;
  --copper-light:  #c98a4b;
  --copper-pale:   #e6b47c;
  --ink:           #1b1e23;
  --ink-soft:      #4b4f56;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --max: 1240px;
  --gap: clamp(1.25rem, 2.5vw, 2.5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

section { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--copper);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  margin-top: 0.6rem;
  color: var(--ink);
}
.section-head p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 56ch;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.on-dark h2 { color: var(--stone); }
.section-head.on-dark p { color: rgba(245,241,234,0.72); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--copper); color: var(--stone); }
.btn-primary:hover { background: var(--copper-light); transform: translateY(-1px); }
.btn-outline { border-color: rgba(245,241,234,0.5); color: var(--stone); }
.btn-outline:hover { background: rgba(245,241,234,0.1); border-color: var(--stone); }
.btn-dark { border-color: var(--ink); color: var(--ink); }
.btn-dark:hover { background: var(--ink); color: var(--stone); }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.site-header.is-scrolled {
  background: rgba(20,23,27,0.92);
  backdrop-filter: blur(10px);
  padding: 0.7rem 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { height: 42px; width: auto; transition: height 0.3s var(--ease); }
.site-header.is-scrolled .brand img { height: 36px; }

.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2vw, 2.1rem); }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.85;
  position: relative;
  padding: 0.3rem 0;
}
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--copper-light);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 1.4rem; }
.nav-phone { display: none; font-size: 0.85rem; font-weight: 600; color: var(--stone); letter-spacing: 0.02em; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--stone); transition: 0.25s var(--ease); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--stone);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,17,20,0.55) 0%, rgba(15,17,20,0.25) 32%, rgba(15,17,20,0.55) 78%, rgba(12,14,16,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(3rem, 8vw, 6.5rem);
  padding-top: 8rem;
  width: 100%;
}
.hero-content .eyebrow { color: var(--copper-pale); }
.hero-content .eyebrow::before { background: var(--copper-pale); }
.hero-content h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.05;
  max-width: 16ch;
  margin-top: 0.8rem;
  color: var(--stone);
}
.hero-content p {
  margin-top: 1.4rem;
  font-size: 1.15rem;
  max-width: 46ch;
  color: rgba(245,241,234,0.85);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero-scroll {
  position: absolute; bottom: 1.6rem; right: clamp(1.25rem, 4vw, 3rem);
  z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245,241,234,0.75);
}
.hero-scroll .line { width: 1px; height: 42px; background: rgba(245,241,234,0.4); overflow: hidden; }
.hero-scroll .line::after {
  content: ""; display: block; width: 100%; height: 40%; background: var(--copper-pale);
  animation: scrollLine 2.2s infinite ease-in-out;
}
@keyframes scrollLine { 0% { transform: translateY(-100%);} 100% { transform: translateY(250%);} }

/* ---- Intro / Philosophy ---- */
.intro { background: var(--paper); padding: clamp(4.5rem, 9vw, 8rem) 0; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.intro-copy p { color: var(--ink-soft); font-size: 1.08rem; margin-top: 1.25rem; }
.intro-copy p + p { margin-top: 1rem; }
.intro-media { position: relative; }
.intro-media img { border-radius: var(--radius); width: 100%; height: 460px; object-fit: cover; }
.intro-media .frame {
  position: absolute; top: -18px; left: -18px; right: 18px; bottom: 18px;
  border: 1.5px solid var(--copper); z-index: -1; border-radius: var(--radius);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
}
.feature-card { background: var(--paper); padding: 2.2rem 1.8rem; }
.feature-card .num { font-family: var(--serif); font-size: 0.95rem; color: var(--copper); }
.feature-card h3 { font-size: 1.15rem; margin-top: 0.9rem; }
.feature-card p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.95rem; }

/* ---- Gallery ---- */
.gallery { background: var(--charcoal); padding: clamp(4.5rem, 9vw, 8rem) 0; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filter-btn {
  background: transparent;
  border: 1px solid rgba(245,241,234,0.25);
  color: rgba(245,241,234,0.75);
  padding: 0.55em 1.3em;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}
.filter-btn:hover { border-color: var(--copper-pale); color: var(--stone); }
.filter-btn.is-active { background: var(--copper); border-color: var(--copper); color: var(--stone); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
  background: var(--charcoal-2);
}
.gallery-item.tall { aspect-ratio: 4 / 5; }
.gallery-item.wide { grid-column: span 2; aspect-ratio: 16 / 10; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,17,20,0) 45%, rgba(12,14,16,0.9) 100%);
  display: flex; align-items: flex-end;
  padding: 1.4rem;
  opacity: 0.92;
}
.gallery-item .overlay .tag {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-pale);
  display: block; margin-bottom: 0.35rem;
}
.gallery-item .overlay h3 { font-size: 1.15rem; color: var(--stone); font-weight: 600; }
.gallery-item[hidden] { display: none; }

.gallery-note {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: rgba(245,241,234,0.5);
  max-width: 60ch;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,11,13,0.94);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 2px; }
.lightbox figcaption { color: var(--stone); margin-top: 1rem; text-align: center; font-size: 0.95rem; }
.lightbox figcaption .tag { color: var(--copper-pale); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.7rem; margin-right: 0.6em; }
.lightbox-close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(245,241,234,0.08); border: 1px solid rgba(245,241,234,0.25);
  color: var(--stone); font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(245,241,234,0.08); border: 1px solid rgba(245,241,234,0.25);
  color: var(--stone); font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.lightbox-prev { left: clamp(0.5rem, 3vw, 2rem); }
.lightbox-next { right: clamp(0.5rem, 3vw, 2rem); }

/* ---- Services ---- */
.services { background: var(--paper); padding: clamp(4.5rem, 9vw, 8rem) 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.service-card {
  padding: clamp(1.8rem, 2.5vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--stone);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20,23,27,0.08); }
.service-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--charcoal); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.3rem;
}
.service-icon svg { width: 22px; height: 22px; stroke: var(--copper-pale); }
.service-card h3 { font-size: 1.2rem; }
.service-card p { margin-top: 0.7rem; color: var(--ink-soft); font-size: 0.95rem; }

/* ---- Process ---- */
.process { background: var(--charcoal-2); padding: clamp(4.5rem, 9vw, 8rem) 0; }
.process-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; counter-reset: step; }
.process-step { position: relative; padding-top: 2.2rem; border-top: 1px solid rgba(245,241,234,0.18); }
.process-step .step-num {
  font-family: var(--serif); font-size: 1.6rem; color: var(--copper-pale);
  display: block; margin-bottom: 0.9rem;
}
.process-step h3 { font-size: 1.05rem; color: var(--stone); }
.process-step p { margin-top: 0.6rem; font-size: 0.9rem; color: rgba(245,241,234,0.65); }

/* ---- Service Area ---- */
.area {
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  color: var(--stone);
  position: relative;
  overflow: hidden;
}
.area-media { position: absolute; inset: 0; z-index: 0; }
.area-media img { width: 100%; height: 100%; object-fit: cover; }
.area-media::after { content: ""; position: absolute; inset: 0; background: rgba(15,17,20,0.72); }
.area-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--gap); align-items: start; }
.area-towns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem 2rem; margin-top: 1.8rem; }
.area-towns li { font-size: 0.98rem; padding-left: 1.1rem; position: relative; color: rgba(245,241,234,0.9); }
.area-towns li::before { content: "—"; position: absolute; left: 0; color: var(--copper-pale); }
.area-card {
  background: rgba(245,241,234,0.06);
  border: 1px solid rgba(245,241,234,0.18);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.5vw, 2.2rem);
  backdrop-filter: blur(4px);
}
.area-card h3 { font-size: 1.1rem; color: var(--stone); }
.area-card p { margin-top: 0.7rem; font-size: 0.92rem; color: rgba(245,241,234,0.75); }

/* ---- Contact ---- */
.contact { background: var(--paper); padding: clamp(4.5rem, 9vw, 8rem) 0; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.contact-info h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.contact-info p { margin-top: 1.1rem; color: var(--ink-soft); max-width: 42ch; }
.contact-details { margin-top: 2.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-details .item { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-details .icon {
  width: 38px; height: 38px; border-radius: 50%; background: var(--charcoal);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-details .icon svg { width: 17px; height: 17px; stroke: var(--copper-pale); }
.contact-details .label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); display: block; }
.contact-details .value { font-size: 1rem; color: var(--ink); margin-top: 0.15rem; }
.contact-note { margin-top: 2.2rem; font-size: 0.85rem; color: var(--steel-soft); border-left: 2px solid var(--copper); padding-left: 1rem; }

.contact-form {
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--steel); margin-bottom: 0.5rem; font-weight: 600;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 0.85em 1em; border: 1px solid var(--line); border-radius: 2px;
  background: var(--paper); color: var(--ink); transition: border-color 0.2s var(--ease);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--copper);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.form-foot .fine-print { font-size: 0.78rem; color: var(--steel-soft); }
.form-success {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(165,101,43,0.1);
  border: 1px solid rgba(165,101,43,0.35);
  color: var(--copper);
  font-size: 0.9rem;
  border-radius: 2px;
}
.form-success.is-visible { display: block; }

/* ---- Footer ---- */
.site-footer { background: var(--charcoal); color: rgba(245,241,234,0.7); padding: clamp(3rem, 6vw, 4rem) 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--gap); padding-bottom: 2.5rem; border-bottom: 1px solid rgba(245,241,234,0.12); }
.footer-brand img { height: 40px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; max-width: 34ch; color: rgba(245,241,234,0.6); }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper-pale); margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { font-size: 0.92rem; color: rgba(245,241,234,0.72); }
.footer-col a:hover { color: var(--stone); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-top: 1.6rem; font-size: 0.8rem; color: rgba(245,241,234,0.45); }
.footer-social { display: flex; gap: 0.8rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(245,241,234,0.2);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 15px; height: 15px; stroke: rgba(245,241,234,0.75); }
.footer-social a:hover { border-color: var(--copper-pale); }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 860px) {
  .nav-phone { display: inline-flex; }
}

@media (max-width: 980px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-media { order: -1; }
  .feature-row { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(3, 1fr); }
  .area-content { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .nav-right .btn-outline { display: none; }
  .nav-toggle { display: flex; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 2; }
  .services-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.wide { grid-column: span 1; }
  .area-towns { grid-template-columns: 1fr; }
}

/* ---- Mobile nav drawer ---- */
.nav-drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--charcoal);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.8rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.3s var(--ease);
}
.nav-drawer.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drawer a { font-family: var(--serif); font-size: 1.6rem; color: var(--stone); }
.nav-drawer .nav-phone-mobile { font-family: var(--sans); font-size: 1rem; color: var(--copper-pale); margin-top: 1rem; }

body.nav-open { overflow: hidden; }
