/* ============================================
   Ingebretson's — Custom Cabinetry & Furniture
   ============================================ */

:root {
  --ink: #241c16;
  --walnut: #7a4a2b;
  --walnut-dark: #5c3620;
  --cream: #faf6f0;
  --stone: #eee7dc;
  --stone-dark: #ddd3c3;
  --muted: #6b5f54;
  --white: #ffffff;
  --max-width: 1180px;
  --radius: 3px;
  --shadow: 0 10px 30px rgba(36, 28, 22, 0.10);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

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

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--muted); }

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

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--walnut);
  font-weight: 600;
  margin-bottom: 14px;
}

.section {
  padding: 88px 0;
}
.section--tight { padding: 56px 0; }
.section--stone { background: var(--stone); }
.section--ink { background: var(--ink); color: var(--stone); }
.section--ink p { color: #cfc4b6; }
.section--ink h2 { color: var(--white); }

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn--primary {
  background: var(--walnut);
  color: var(--white);
}
.btn--primary:hover { background: var(--walnut-dark); }
.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.section--ink .btn--outline { color: var(--white); }
.section--ink .btn--outline:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--stone-dark);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand img { width: 42px; height: 42px; }
.brand img.brand-lockup { width: auto; height: clamp(52px, 5vw, 88px); }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text .name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
}
.brand-text .tag {
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--walnut);
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.main-nav a.active,
.main-nav a:hover { color: var(--walnut); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--walnut);
}
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
}
.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36,28,22,0.55) 0%, rgba(36,28,22,0.35) 45%, rgba(36,28,22,0.85) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 680px; }
.hero h1 { color: var(--white); }
.hero p.lead { color: #ece4d8; font-size: 1.15rem; max-width: 520px; }

.page-hero {
  padding: 160px 0 70px;
  background: var(--stone);
  text-align: center;
}
.page-hero .eyebrow { }
.page-hero p { max-width: 620px; margin: 0 auto; }

/* ============ Intro / About teaser ============ */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.intro-grid img { border-radius: var(--radius); box-shadow: var(--shadow); }

.stat-row {
  display: flex;
  gap: 40px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--walnut);
}
.stat span {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ Galleries ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--stone);
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0,0,0,0.65), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery-item:hover .cap { opacity: 1; }

.gallery-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.view-more-wrap {
  text-align: center;
  margin-top: 44px;
}

/* Category tease cards on homepage */
.work-tease-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.work-tease {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  box-shadow: var(--shadow);
}
.work-tease img { width: 100%; height: 100%; object-fit: cover; }
.work-tease .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,28,22,0.05) 40%, rgba(36,28,22,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: var(--white);
}
.work-tease .overlay h3 { color: var(--white); margin-bottom: 6px; }
.work-tease .overlay .link { font-size: 0.85rem; font-weight: 600; color: var(--stone); }

/* ============ Process steps (contact page) ============ */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.step {
  position: relative;
  padding-top: 46px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--walnut);
  color: var(--white);
  font-family: var(--serif);
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; margin: 0; }

/* ============ Forms ============ */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.field .hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--stone-dark);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--walnut);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }

.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pill-option {
  border: 1px solid var(--stone-dark);
  border-radius: 30px;
  padding: 9px 18px;
  font-size: 0.86rem;
  cursor: pointer;
  background: var(--cream);
  transition: all 0.15s ease;
}
.pill-option input { position: absolute; opacity: 0; pointer-events: none; }
.pill-option:has(input:checked) {
  background: var(--walnut);
  border-color: var(--walnut);
  color: var(--white);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 18px;
}

.form-success {
  display: none;
  background: var(--stone);
  border-left: 3px solid var(--walnut);
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.form-success.visible { display: block; }

.form-error {
  display: none;
  background: #fdf2f0;
  border-left: 3px solid #b3462c;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.form-error.visible { display: block; }

/* ============ About page ============ */
.about-photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-copy .editme {
  background: #fff7e6;
  border: 1px dashed #d6a842;
  padding: 3px 8px;
  border-radius: 3px;
  font-style: italic;
  color: #7a5c1e;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 20px;
}
.value h3 { font-size: 1.1rem; }
.value p { font-size: 0.92rem; }

/* ============ CTA band ============ */
.cta-band {
  text-align: center;
  border-top: 1px solid var(--stone-dark);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .btn-row { justify-content: center; }

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  color: #cfc4b6;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.footer-brand img { width: 38px; height: 38px; }
.footer-brand .name { font-family: var(--serif); font-size: 1.2rem; color: var(--white); }
.site-footer h4 {
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; font-size: 0.92rem; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #8a7f72;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 11, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox .cap {
  color: #ece4d8;
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.6rem;
  padding: 12px;
}
.lightbox-close { top: 16px; right: 24px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .main-nav { position: fixed; top: 84px; left: 0; right: 0; bottom: 0; background: var(--cream); flex-direction: column; align-items: flex-start; padding: 30px 24px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-cta { margin-left: 0; }

  .intro-grid, .work-tease-grid, .form-row, .steps, .values-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-featured { grid-column: span 2; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 28px; }
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-featured { grid-column: span 1; }
  .section { padding: 64px 0; }
}
