/* ============================================================
   NOBLE HOMES / ETN HOMES — SITE STYLES
   Design concept: "Contour" — the winding shoreline of a Finger
   Lake, and the contour lines of a surveyor's map, rendered as a
   quiet thread running through the whole site. Palette pulls from
   lake water, fieldstone, and aged copper — the actual materials
   of upstate New York estate work.
   ============================================================ */

:root {
  --ink: #23261f;
  --stone: #e4ddc9;
  --stone-light: #f2efe4;
  --slate: #2f4548;
  --slate-dark: #223335;
  --lake: #6e8f92;
  --bronze: #a97c50;
  --bronze-dark: #8a6440;
  --line: rgba(35, 38, 31, 0.14);

  --display: "Fraunces", Georgia, serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-dark);
  font-weight: 600;
  margin-bottom: 0.9em;
  display: block;
}

p { margin: 0 0 1em; }
.lede {
  font-size: 1.15rem;
  color: #454a3d;
  max-width: 56ch;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(228, 221, 201, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
}
.logo span { color: var(--bronze-dark); font-style: italic; font-weight: 400; }
.logo-img { height: 56px; width: auto; display: block; }
footer .logo-img { height: 64px; }

nav.primary { display: flex; gap: 2.2rem; align-items: center; }
nav.primary a {
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
nav.primary a.active { color: var(--bronze-dark); }
nav.primary a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1.5px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
nav.primary a:not(.btn):hover::after,
nav.primary a.active::after { transform: scaleX(1); }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--slate);
  color: var(--stone-light);
  border: 1px solid var(--slate);
}
.btn-primary:hover { background: var(--slate-dark); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--stone-light); }

.mobile-toggle { display: none; }

/* ---------- Contour motif (signature element) ---------- */

.contour {
  width: 100%;
  height: auto;
  display: block;
}
.contour path {
  fill: none;
  stroke-width: 1;
}

.contour-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--slate);
  color: var(--stone-light);
  position: relative;
  overflow: hidden;
  padding: 110px 0 0;
}
.hero .wrap {
  position: relative;
  z-index: 2;
  padding-bottom: 90px;
}
.hero h1 { color: var(--stone-light); max-width: 14ch; }
.hero .lede { color: #c7d2ce; }
.hero-actions { display: flex; gap: 16px; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-contour {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
}
.hero-contour path { stroke: rgba(212, 195, 159, 0.28); }

.hero-credentials {
  border-top: 1px solid rgba(212, 205, 185, 0.2);
  margin-top: 3rem;
  padding-top: 1.6rem;
  display: flex;
  gap: 2.6rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.hero-credentials div { max-width: 220px; }
.hero-credentials .num { font-family: var(--display); font-size: 1.6rem; color: var(--bronze); display: block; }
.hero-credentials .label { font-size: 0.86rem; color: #c7d2ce; }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.section-head { max-width: 640px; margin-bottom: 3rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.bg-slate { background: var(--slate); color: var(--stone-light); }
.bg-slate h2, .bg-slate h3 { color: var(--stone-light); }
.bg-slate .lede { color: #c7d2ce; }

.bg-card { background: var(--stone-light); }

/* ---------- Cards / Grids ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.card {
  background: var(--stone-light);
  padding: 2.4rem 2rem;
}
.card .eyebrow { margin-bottom: 0.6em; }
.card p { color: #4d5245; font-size: 0.96rem; margin-bottom: 0; }

.service-icon {
  width: 40px; height: 40px;
  margin-bottom: 1.2rem;
  stroke: var(--bronze-dark);
  fill: none;
  stroke-width: 1.4;
}

/* ---------- Project gallery ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  border: 1px solid var(--line);
  background: var(--stone-light);
}
.project-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #d7cdb2 0%, #c7bda0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bronze-dark);
  position: relative;
  overflow: hidden;
}
.project-photo svg { width: 34px; height: 34px; opacity: 0.55; }
.project-photo img { width: 100%; height: 100%; object-fit: cover; }
.project-photo .add-note {
  position: absolute;
  bottom: 10px; left: 10px; right: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(35,38,31,0.55);
}
.project-info { padding: 1.2rem 1.3rem 1.5rem; }
.project-info .eyebrow { margin-bottom: 0.3em; font-size: 0.7rem; }
.project-info h3 { font-size: 1.08rem; margin-bottom: 0.3em; }
.project-info p { font-size: 0.9rem; color: #565b48; margin: 0; }

.gallery-note {
  border: 1px dashed var(--bronze);
  padding: 1.4rem 1.6rem;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: #4d5245;
  background: rgba(169, 124, 80, 0.06);
}

/* ---------- Thumbnail strip + lightbox ---------- */

.project-thumbs {
  display: flex;
  gap: 6px;
  padding: 0 1.3rem 1.3rem;
}
.project-thumbs img {
  width: 100%;
  height: 56px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--line);
  opacity: 0.9;
  transition: opacity 0.2s ease, outline 0.2s ease;
}
.project-thumbs img:hover,
.project-thumbs img:focus-visible {
  opacity: 1;
  outline: 2px solid var(--bronze);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 38, 31, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 48px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid rgba(242, 239, 228, 0.3);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 32px;
  background: none;
  border: none;
  color: var(--stone-light);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}
.lightbox-close:hover { color: var(--bronze); }

/* ---------- Timeline (About) ---------- */

.timeline { border-left: 1px solid var(--line); padding-left: 2rem; margin-top: 1rem; }
.timeline-item { position: relative; padding-bottom: 2.4rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.42rem;
  top: 0.3rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bronze);
}
.timeline-item h3 { margin-bottom: 0.3em; font-size: 1.1rem; }
.timeline-item p { color: #4d5245; margin-bottom: 0; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
}
.contact-detail { margin-bottom: 1.8rem; }
.contact-detail .eyebrow { margin-bottom: 0.3em; }
.contact-detail a { text-decoration: none; font-family: var(--display); font-size: 1.3rem; color: var(--ink); border-bottom: 1px solid var(--bronze); }
.contact-detail a:hover { color: var(--bronze-dark); }

form.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0.5em;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #b9b193;
  background: var(--stone-light);
  font-family: var(--body);
  font-size: 0.96rem;
  color: var(--ink);
  border-radius: 2px;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--bronze);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.82rem; color: #6a6f5c; }

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--slate-dark);
  color: #b9c4bf;
  padding: 56px 0 32px;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}
footer .logo { color: var(--stone-light); }
footer .logo span { color: var(--bronze); }
footer .foot-links { display: flex; gap: 2rem; flex-wrap: wrap; }
footer .foot-links a { text-decoration: none; font-size: 0.88rem; color: #b9c4bf; }
footer .foot-links a:hover { color: var(--bronze); }
.foot-bottom {
  border-top: 1px solid rgba(185, 196, 191, 0.15);
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  font-size: 0.78rem;
  color: #8a9691;
}
.foot-bottom .wrap { padding-top: 0; }

/* ---------- Utility ---------- */

.center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-lg { margin-top: 3rem; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--bronze-dark);
  outline-offset: 2px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  nav.primary { gap: 1.3rem; }
}

@media (max-width: 640px) {
  .site-header .wrap { height: 68px; }
  nav.primary { position: fixed; top: 68px; left: 0; right: 0; background: var(--stone-light); flex-direction: column; align-items: flex-start; padding: 1.5rem 2rem; gap: 1.2rem; border-bottom: 1px solid var(--line); display: none; }
  nav.primary.open { display: flex; }
  .mobile-toggle {
    display: block;
    background: none;
    border: none;
    font-family: var(--body);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--ink);
    cursor: pointer;
    line-height: 1;
  }
  .project-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding-top: 84px; }
  .hero-credentials { gap: 1.6rem; }
}
