/* ==========================================================================
   THOMPSON HERITAGE WINDOWS & DOORS
   Brand tokens: Navy #1e2738 / Gold #C9A84C / Cream #f5f0e8
   Display: Cormorant Garamond  |  Body/UI: Jost
   ========================================================================== */

:root {
  --navy: #1e2738;
  --navy-deep: #131926;
  --gold: #C9A84C;
  --gold-bright: #ddc077;
  --cream: #f5f0e8;
  --cream-warm: #ede5d6;
  --white: #ffffff;
  --stone: #7d7768;
  --stone-dark: #4a463c;
  --line: rgba(201, 168, 76, 0.35);

  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;

  --max-width: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 500; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); }

p { margin: 0 0 1.1em; }

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

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 0.9em;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--gold);
  margin-right: 10px;
  vertical-align: middle;
}

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

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

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

/* ---------- Signature motif: the glazing-bar grid ----------------------- */
/* A thin gold pane-grid divider — the recurring device tying every page
   back to the physical product: window muntin bars. */

.pane-divider {
  width: 100%;
  height: 34px;
  position: relative;
  overflow: hidden;
}
.pane-divider svg { width: 100%; height: 100%; display: block; }

.pane-frame {
  position: relative;
}
.pane-frame::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 2;
}
.pane-frame::after {
  content: '';
  position: absolute;
  top: 14px; bottom: 14px; left: 50%;
  width: 1px;
  background: var(--line);
  z-index: 2;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(201,168,76,0.25);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--cream);
}
.brand img { height: 58px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  color: var(--cream);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  font-weight: 400;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--gold-bright); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.call-btn {
  background: var(--gold);
  color: var(--navy-deep);
  padding: 11px 22px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.call-btn:hover { background: var(--gold-bright); }
.call-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--cream);
}
.nav-toggle svg { width: 26px; height: 26px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--navy-deep);
  z-index: 200;
  flex-direction: column;
  padding: 100px 32px 40px;
  gap: 28px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.mobile-nav a.active { color: var(--gold-bright); }
.mobile-nav .call-btn { margin-top: 20px; align-self: flex-start; }
.mobile-nav-close {
  position: absolute;
  top: 26px; right: 26px;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
}
.mobile-nav-close svg { width: 28px; height: 28px; }

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: var(--gold-bright); }
.btn-outline { border-color: rgba(245,240,232,0.4); color: var(--cream); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--cream); }

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

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background: var(--navy-deep);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(19,25,38,0.35) 0%, rgba(19,25,38,0.55) 55%, rgba(19,25,38,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px 72px;
  color: var(--cream);
}
.hero-content h1 { color: var(--white); max-width: 780px; }
.hero-content .lede {
  font-size: 1.15rem;
  color: rgba(245,240,232,0.85);
  max-width: 560px;
  margin-bottom: 2em;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.page-hero {
  min-height: 46vh;
  align-items: center;
}
.page-hero .hero-content { padding-bottom: 0; }

/* ---------- Trust bar ----------------------------------------------------- */

.trust-bar {
  background: var(--navy);
  border-top: 1px solid rgba(201,168,76,0.2);
  padding: 34px 0;
}
.trust-row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.trust-item {
  color: var(--cream);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.9;
}
.trust-item::before { content: ''; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }

/* ---------- Cards / grids -------------------------------------------------- */

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; }

.service-card {
  background: var(--white);
  padding: 40px 34px;
  border-top: 2px solid var(--gold);
}
.service-card h3 { margin-bottom: 0.4em; }
.service-card p { color: var(--stone-dark); font-size: 0.95rem; margin-bottom: 0; }
.service-card .num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  display: block;
}

.dark-section { background: var(--navy); color: var(--cream); }
.dark-section h2, .dark-section h3 { color: var(--white); }
.dark-section .section-head p { color: rgba(245,240,232,0.75); }

.stat-block {
  text-align: center;
  padding: 24px;
}
.stat-block .stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-block .stat-label {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.7);
}

/* ---------- Image + text split -------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.split.reverse { grid-template-columns: 0.95fr 1.05fr; }
.split.reverse .split-media { order: 2; }
.split-media { position: relative; }
.split-media img { width: 100%; height: auto; }
.split-media .frame-accent {
  position: absolute;
  top: 18px; left: 18px; right: -18px; bottom: -18px;
  border: 1px solid var(--gold);
  z-index: -1;
}

.img-placeholder {
  background: var(--navy);
  background-image:
    linear-gradient(rgba(201,168,76,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  color: rgba(245,240,232,0.55);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  aspect-ratio: 4/3;
  border: 1px dashed rgba(201,168,76,0.4);
}
.img-placeholder.wide { aspect-ratio: 16/9; }
.img-placeholder.tall { aspect-ratio: 3/4; }
.img-placeholder.square { aspect-ratio: 1/1; }

/* ---------- Process steps -------------------------------------------------- */

.process-list { display: flex; flex-direction: column; }
.process-step {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.process-step:first-child { padding-top: 0; }
.process-step .step-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}
.process-step h3 { margin-bottom: 0.3em; }
.process-step p { color: var(--stone-dark); margin-bottom: 0; }

/* ---------- Project cards -------------------------------------------------- */

.project-card {
  background: var(--white);
  margin-bottom: 56px;
}
.project-media { aspect-ratio: 16/10; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 36px 40px 40px; }
.project-tag {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
  display: block;
}
.project-body h3 { margin-bottom: 0.5em; }
.project-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(201,168,76,0.25);
  flex-wrap: wrap;
}
.project-meta div { font-size: 0.82rem; }
.project-meta span {
  display: block;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  margin-bottom: 3px;
}

/* ---------- Forms ----------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stone-dark);
}
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 16px;
  border: 1px solid rgba(30,39,56,0.2);
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.form-field textarea { resize: vertical; min-height: 130px; }

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

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.contact-method .icon {
  width: 42px; height: 42px;
  background: var(--gold);
  color: var(--navy-deep);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-method .icon svg { width: 18px; height: 18px; }
.contact-method h4 { margin-bottom: 0.2em; }
.contact-method a, .contact-method p { color: var(--stone-dark); margin: 0; font-size: 0.95rem; }
.contact-method a:hover { color: var(--gold); }

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

.site-footer { background: var(--navy-deep); color: rgba(245,240,232,0.75); padding: 72px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(201,168,76,0.18);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand img { height: 40px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.15rem; color: var(--white); }
.footer-col h4 {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 11px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(245,240,232,0.5);
}

/* ---------- Crest watermark ------------------------------------------------ */
/* A large, faint version of the stag crest used as a decorative background
   element. Apply .crest-watermark to any section with position relative
   already established (dark-section already qualifies). */

.crest-watermark { position: relative; overflow: hidden; }
.crest-watermark::before {
  content: '';
  position: absolute;
  top: 50%; right: -60px;
  width: 480px; height: 480px;
  transform: translateY(-50%);
  background-image: url('../images/logo-stag.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
.crest-watermark > .container { position: relative; z-index: 1; }

@media (max-width: 760px) {
  .crest-watermark::before { width: 300px; height: 300px; right: -80px; }
}

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

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center-btn { display: flex; justify-content: center; margin-top: 40px; }

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

@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  section { padding: 64px 0; }
  .header-inner { height: 72px; }
  .call-btn span.call-text { display: none; }
  .call-btn { padding: 11px 14px; }
  .process-step { grid-template-columns: 44px 1fr; }
}

/* Consultancy services backdrop: church photograph under deep navy */
.services-backdrop {
  background:
    linear-gradient(180deg, rgba(19,25,38,0.93) 0%, rgba(30,39,56,0.88) 50%, rgba(19,25,38,0.94) 100%),
    url('../images/consultancy-church-exterior.jpg') center 30% / cover no-repeat;
  background-attachment: scroll, fixed;
}
@media (max-width: 900px) { .services-backdrop { background-attachment: scroll, scroll; } }
.services-backdrop .service-card {
  background: rgba(19,25,38,0.78);
  border: 1px solid rgba(201,168,76,0.22);
  border-top: 2px solid var(--gold);
  backdrop-filter: blur(2px);
}
.services-backdrop .service-card h3 { color: var(--white); }
.services-backdrop .service-card p { color: rgba(245,240,232,0.82); }

.grid-3.grid-two-up { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .grid-3.grid-two-up { grid-template-columns: 1fr; } }

/* Keep the call button clear of the final nav link */
.header-cta { margin-left: 32px; }
@media (max-width: 1180px) { .main-nav { gap: 24px; } .header-cta { margin-left: 20px; } }
@media (max-width: 980px) { .header-cta { margin-left: 0; } }

/* Product photos shown in full instead of cropped */
.project-media.media-auto { aspect-ratio: auto; }
.project-media.media-auto img { height: auto; display: block; }

/* Social follow strip */
.follow-strip { background: var(--cream); }
.social-row { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.social-icon { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: var(--navy); font-size: 0.85rem; letter-spacing: 0.04em; }
.social-icon svg { width: 52px; height: 52px; padding: 13px; border: 1px solid var(--gold); border-radius: 50%; color: var(--navy); transition: background 0.2s ease, color 0.2s ease; }
.social-icon:hover svg, .social-icon:focus-visible svg { background: var(--gold); color: var(--navy-deep); }

/* Homepage hero: stacked intro paragraphs and service-area note */
.hero-content .lede-stack { font-size: 1.05rem; max-width: 620px; margin-bottom: 1em; }
.hero-content .lede-note { font-size: 0.88rem; color: rgba(245,240,232,0.7); max-width: 620px; margin: 0.4em 0 2em; letter-spacing: 0.01em; }
.hero-content .h1-bar { color: var(--gold); font-weight: 300; margin: 0 0.15em; }
.hero-content .hero-tagline { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-style: italic; color: var(--gold); margin: 0 0 1em; max-width: 760px; line-height: 1.3; }
.hero-content h1.hero-title-line { font-size: clamp(1.7rem, 3.7vw, 3.2rem); max-width: none; white-space: nowrap; }
@media (max-width: 700px) { .hero-content h1.hero-title-line { white-space: normal; font-size: 2.1rem; } }
