/* ===================================================
   Flinn Built Inc. — Shared Stylesheet
   Warm tan / linen palette · traditional serif elegance
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Cinzel:wght@400;500;600&family=Jost:wght@300;400;500;600&display=swap');

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --tan:        #e8dfd0;   /* page background — warm linen */
  --tan-deep:   #ddd3c2;   /* deeper tan for alternating sections */
  --paper:      #f5f0e8;   /* lifted panels: form, cards */
  --ink:        #2a231a;   /* headings — dark espresso */
  --text:       #3d3328;   /* body copy */
  --ink-soft:   #7a6e60;   /* muted / secondary */
  --clay:       #8c7355;   /* accent — warm walnut */
  --clay-deep:  #6e5a40;   /* accent hover */
  --line:       #c8bfb0;   /* borders, dividers */
  --light:      #ffffff;
  --gold:       #8c7355;
  --bg:         #e8dfd0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--tan);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='250' height='250'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='250' height='250' filter='url(%23n)' opacity='0.45'/></svg>");
  background-size: 250px 250px;
}

h1, h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 500; color: var(--ink); }

::selection { background: var(--clay); color: var(--light); }

/* ---------- Site Header (logo centered, info flanking) ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px 48px 20px;
  background: transparent;
}

.site-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  line-height: 1.5;
}

.site-header-logo { text-align: center; }

.logo-text {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 0;
  line-height: 1;
}
.logo-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  display: block;
}
.logo-rule {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  margin: 6px 0 5px;
}
.logo-tag {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.12em;
  display: block;
}

.site-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  line-height: 1.5;
}
.site-header-right a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.site-header-right a:hover { color: var(--clay); }

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px 24px 16px;
    gap: 12px;
  }
  .site-header-left,
  .site-header-right { align-items: center; }
}

/* ---------- Navigation ---------- */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--tan);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='250' height='250'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='250' height='250' filter='url(%23n)' opacity='0.45'/></svg>");
  background-size: 250px 250px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  justify-content: center;
  padding: 0;
}

.nav-links a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Jost', sans-serif;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--clay-deep);
  border-bottom-color: var(--clay);
}

@media (max-width: 640px) {
  .nav-links a { padding: 12px 14px; font-size: 10px; letter-spacing: 0.14em; }
}

/* ---------- Section Wrappers ---------- */
section { padding: 64px 0; }
.container { max-width: 860px; margin: 0 auto; padding: 0 32px; }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  font-style: italic;
  text-align: center;
  margin-bottom: 8px;
  color: var(--ink);
}

.section-sub {
  text-align: center;
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--ink-soft);
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

.divider {
  width: 200px;
  height: 1px;
  background: var(--line);
  margin: 10px auto 36px;
}

/* ---------- Home Slideshow (full viewport width) ---------- */
.slideshow-wrap {
  position: relative;
  width: 75vw;
  margin: 0 auto;
  margin-bottom: 4px;
  line-height: 0;
}

.slide-main {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(232,223,208,0.82);
  border: none;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}
.slide-arrow:hover { background: rgba(232,223,208,1); }
.slide-prev { left: 0; }
.slide-next { right: 0; }

.thumb-strip {
  display: flex;
  gap: 4px;
  width: 75vw;
  margin: 0 auto;
  overflow: hidden;
  padding-bottom: 32px;
}
.thumb-strip img {
  flex: 1 1 0;
  min-width: 0;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.thumb-strip img:hover,
.thumb-strip img.active { opacity: 1; }

/* ---------- Services Grid ---------- */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; margin-top: 16px; }
@media (max-width: 700px) { .services-grid { grid-template-columns: 1fr; } }

.services-grid h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.services-grid ul { list-style: none; }
.services-grid ul li {
  padding: 7px 0 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.services-grid ul li strong { display: block; font-weight: 500; color: var(--ink); font-size: 0.92rem; }
.services-grid ul li em { color: var(--ink-soft); font-style: normal; font-size: .85rem; }

/* ---------- About Section ---------- */
.about-section {
  background: var(--tan-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 768px) { .about-inner { grid-template-columns: 1fr; } }

.about-text p { color: var(--text); margin-bottom: 14px; font-size: 0.97rem; }
.about-text blockquote {
  margin-top: 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--clay-deep);
  border-left: 2px solid var(--clay);
  padding-left: 16px;
}
.about-images { display: flex; flex-direction: column; gap: 10px; }
.about-images img { width: 100%; height: 230px; object-fit: cover; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--ink);
  color: var(--tan);
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, transform 0.15s;
}
.btn:hover { background: var(--clay-deep); transform: translateY(-1px); }

/* ---------- Page Hero (interior pages) ---------- */
.page-hero {
  background: var(--tan-deep);
  text-align: center;
  padding: 72px 20px 60px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 10px;
  color: var(--ink);
}
.page-hero p {
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ---------- Step 1 — Alternating Vertical Timeline ---------- */
.steps-intro {
  max-width: 600px;
  margin: 0 auto 72px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.8;
  color: var(--text);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* Vertical spine drawn by JS via CSS variable */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: var(--spine-h, 0px);
  background: var(--clay);
  transform: translateX(-50%);
  transition: height .05s linear;
  pointer-events: none;
  z-index: 0;
}

/* Each row: [card or empty] [marker] [card or empty] */
.step-item {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  align-items: center;
  margin-bottom: 72px;
  opacity: 0;
  position: relative;
  z-index: 1;
  transition: opacity .65s ease, transform .65s ease;
}
.step-item.step-left  { transform: translateX(-28px); }
.step-item.step-right { transform: translateX( 28px); }
.step-item.visible    { opacity: 1; transform: translateX(0); }

/* Card panel */
.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px 30px;
  box-shadow: 0 4px 20px rgba(42,35,26,.07);
}
.step-left  .step-card { margin-right: 20px; text-align: right; }
.step-right .step-card { margin-left:  20px; }

.step-card h3 {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 10px;
}
.step-card p {
  color: var(--text);
  font-size: .94rem;
  line-height: 1.75;
}

/* Number circle */
.step-marker {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  background: var(--tan);
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  color: var(--clay);
  position: relative;
  z-index: 2;
  transition: background .4s, color .4s, transform .4s, box-shadow .4s;
}
.step-item.active .step-marker {
  background: var(--clay);
  color: var(--tan);
  transform: scale(1.1);
  box-shadow: 0 0 0 9px rgba(140,115,85,.13);
}

/* Connector lines from card edge to circle */
.step-left  .step-card::after,
.step-right .step-card::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--line);
  transform: translateY(-50%);
}
.step-left  .step-card { position: relative; }
.step-left  .step-card::after  { right: -20px; }
.step-right .step-card { position: relative; }
.step-right .step-card::before { left: -20px; }

@media (max-width: 680px) {
  .timeline::before { left: 30px; }
  .step-item {
    grid-template-columns: 60px 1fr;
    margin-bottom: 44px;
  }
  .step-marker { width: 44px; height: 44px; font-size: .88rem; justify-self: center; }
  .step-left  .step-card,
  .step-right .step-card { grid-column: 2; margin: 0 0 0 12px; text-align: left; }
  .step-left  .step-card::after,
  .step-right .step-card::before { display: none; }
  .step-spacer { display: none; }
  .step-item.step-left  { transform: translateX(0); }
  .step-item.step-right { transform: translateX(0); }
  .step-item.step-right .step-marker { grid-column: 1; grid-row: 1; }
  .step-item.step-right .step-card   { grid-column: 2; grid-row: 1; }
}

/* ---------- Design Page ---------- */
.design-content { max-width: 760px; margin: 0 auto; }
.design-content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  font-style: italic;
  margin: 36px 0 10px;
  color: var(--ink);
}
.design-content p { margin-bottom: 14px; color: var(--text); font-size: 0.97rem; }

/* ---------- Gallery ---------- */
.gallery-project { margin-bottom: 56px; }
.gallery-project-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 400;
  font-style: italic;
  text-align: center;
  margin-bottom: 12px;
  color: var(--ink);
}

/* Per-project slideshow (full viewport width) */
.proj-slideshow {
  position: relative;
  width: 75vw;
  margin: 0 auto;
  margin-bottom: 4px;
  line-height: 0;
}
.proj-slide-main {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.proj-thumb-strip {
  display: flex;
  gap: 4px;
  width: 75vw;
  margin: 0 auto;
  overflow: hidden;
  padding-bottom: 40px;
}
.proj-thumb-strip img {
  flex: 1 1 0;
  min-width: 0;
  height: 84px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.proj-thumb-strip img:hover,
.proj-thumb-strip img.active { opacity: 1; }

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(42,35,26,.95);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.lb-close {
  position: absolute;
  top: 18px;
  right: 26px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* ---------- Contact Page ---------- */
.contact-wrapper {
  max-width: 620px;
  margin: 0 auto;
  background: var(--paper);
  padding: 44px;
  border: 1px solid var(--line);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 13px;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  background: var(--tan);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--clay); }
.form-group textarea { resize: vertical; min-height: 110px; }

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--tan);
  font-family: 'Jost', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  transition: background .25s;
}
.submit-btn:hover { background: var(--clay-deep); }
.form-note { margin-top: 14px; font-size: .87rem; color: var(--ink-soft); text-align: center; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: #b8ad9e;
  text-align: center;
  padding: 40px 20px;
}
footer strong {
  font-family: 'Cinzel', serif;
  color: var(--clay);
  font-size: .9rem;
  letter-spacing: 0.12em;
  font-weight: 400;
  display: block;
  margin-bottom: 10px;
}
footer .fc { font-size: 13px; line-height: 2; }
footer .fc a { color: #b8ad9e; text-decoration: none; }
footer .fc a:hover { color: var(--clay); }
footer .copy { font-size: 11px; margin-top: 14px; opacity: .5; }
