/* ==========================================================================
   Charles Pugh (Glass) Ltd — Design System
   Palette: Navy (authority) / Amber (CTA, precision accent) / Warm neutrals
   ========================================================================== */

:root {
  --navy: #1b2a3c;
  --navy-dark: #101923;
  --navy-tint: #26394f;
  --amber: #c4622d;
  --amber-dark: #a34f22;
  --grey-900: #23272b;
  --grey-600: #5b6570;
  --grey-300: #d7dade;
  --grey-100: #f2f3f5;
  --white: #ffffff;
  --success: #2f7a4f;

  --font-body: -apple-system, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;

  --max-width: 1280px;
  --radius: 6px;
  --header-h: 65px;
  --shadow-card: 0 2px 10px rgba(16, 25, 35, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(16, 25, 35, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--grey-900);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; margin: 0 0 16px; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--amber); }
.lede { font-size: 1.125rem; color: var(--grey-600); max-width: 640px; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--white); }
.btn-primary:hover { background: var(--amber-dark); box-shadow: var(--shadow-card-hover); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-dark);
  color: var(--grey-300);
  font-size: 0.8rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.topbar a { color: var(--grey-300); text-decoration: none; }
.topbar a:hover { color: var(--white); }
.topbar-links { display: flex; gap: 20px; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--grey-300);
  position: relative;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo span { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; color: var(--amber); text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--grey-900); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--amber); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

@media (max-width: 960px) {
  .main-nav ul { display: none; }
  .header-cta .btn-primary { display: none; }
  .nav-toggle { display: block; }
  .site-header.nav-open .main-nav ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--grey-300);
    gap: 14px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  padding: 88px 0;
  border-bottom: 3px solid var(--amber);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(16,25,35,0.94) 0%, rgba(16,25,35,0.86) 45%, rgba(16,25,35,0.55) 100%);
}
.hero .container { position: relative; max-width: 700px; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 3.4vw, 2.9rem); }
.hero .lede { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 560px; }

.hero-photo-block {
  height: 100%;
  min-height: 240px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--navy-tint), var(--navy-dark));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
  border: 1px dashed rgba(255,255,255,0.25);
}
.photo-placeholder {
  background: linear-gradient(160deg, var(--grey-300), var(--grey-100));
  border: 1px dashed var(--grey-600);
  color: var(--grey-600);
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 0.85rem; padding: 24px;
  border-radius: var(--radius);
  min-height: 220px;
}

/* ---------- Stat strip ---------- */
.stat-strip { background: var(--navy-dark); color: var(--white); padding: 40px 0; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  text-align: center;
}
.stat-grid .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--amber);
  display: block;
}
.stat-grid .label { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin-top: 4px; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Asymmetric feature grid — breaks the "four identical boxes" template tell */
.grid-feature {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}
.grid-feature .card:first-child { grid-row: span 2; }
.grid-feature .card:first-child .card-photo { height: 260px; }
.grid-feature .card:first-child h3 { font-size: 1.5rem; }
@media (max-width: 960px) {
  .grid-feature { grid-template-columns: 1fr; }
  .grid-feature .card:first-child { grid-row: auto; }
  .grid-feature .card:first-child .card-photo { height: 180px; }
}

/* Full-bleed photo band — breaks the uniform container-width section rhythm */
.photo-band {
  position: relative;
  min-height: 340px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.photo-band::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,25,35,0.92) 0%, rgba(16,25,35,0.55) 60%, rgba(16,25,35,0.25) 100%);
}
.photo-band .container { position: relative; }
.photo-band .stat-callout {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--white);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  margin-bottom: 8px;
}
.photo-band .stat-callout span { color: var(--amber); }
.photo-band p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 480px; margin: 0; }

.card {
  background: var(--white);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.card-photo { height: 160px; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-photo img { transform: scale(1.05); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--grey-600); font-size: 0.95rem; }
.card .card-link { margin-top: auto; font-weight: 700; color: var(--amber); text-decoration: none; font-size: 0.9rem; }
.framed-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.framed-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.icon-tile { width: 44px; height: 44px; border-radius: 10px; background: rgba(196,98,45,0.12); color: var(--amber); display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px; font-size: 1.1rem; }

/* ---------- Sections with alt background ---------- */
.bg-light { background: var(--grey-100); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }

/* ---------- Testimonial ---------- */
.testimonial { max-width: 720px; margin: 0 auto; text-align: center; }
.testimonial blockquote { font-size: 1.4rem; font-style: italic; color: var(--navy); margin: 0 0 20px; font-weight: 600; }
.testimonial cite { font-style: normal; color: var(--grey-600); font-size: 0.9rem; }
.logo-strip { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; align-items: center; margin-top: 40px; opacity: 0.7; }
.logo-strip div { padding: 10px 20px; border: 1px solid var(--grey-300); border-radius: var(--radius); font-weight: 700; color: var(--grey-600); font-size: 0.8rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--amber); color: var(--white); text-align: center; padding: 56px 0; }
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band .btn-primary { background: var(--navy); }
.cta-band .btn-primary:hover { background: var(--navy-dark); }

/* ---------- Forms ---------- */
.form-panel { background: var(--white); border: 1px solid var(--grey-300); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-card); }
label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; color: var(--navy); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 18px;
  background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
fieldset { border: none; padding: 0; margin: 0 0 18px; }
.required::after { content: " *"; color: var(--amber); }

/* ---------- Accordion (FAQ) ---------- */
.accordion-item { border-bottom: 1px solid var(--grey-300); }
.accordion-trigger {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 0; font-weight: 700; font-size: 1rem; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.accordion-trigger .plus { font-size: 1.4rem; color: var(--amber); transition: transform 0.2s ease; }
.accordion-item.open .accordion-trigger .plus { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.accordion-panel p { color: var(--grey-600); padding-bottom: 20px; }

/* ---------- Branch cards ---------- */
.branch-card { padding: 24px; }
.branch-card h3 { margin-bottom: 4px; }
.branch-card .tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: rgba(196,98,45,0.12); color: var(--amber); padding: 3px 10px; border-radius: 12px; margin-bottom: 10px; }
.branch-card address { font-style: normal; color: var(--grey-600); font-size: 0.9rem; margin-bottom: 10px; }
.branch-card .phone { font-weight: 700; color: var(--navy); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.8rem; color: var(--grey-600); padding: 18px 0 0; }
.breadcrumb a { color: var(--grey-600); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.75); padding: 56px 0 24px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ==========================================================================
   Persistent rail + editorial column layout (homepage)
   Replaces stacked full-width bars with a fixed utility frame alongside
   a single flowing content column — utility always visible, story reads
   as continuous editorial copy rather than discrete boxed sections.
   ========================================================================== */
.frame { display: flex; align-items: flex-start; }

/* Sidebar uses fixed positioning + a plain margin on the content column —
   deliberately NOT CSS Grid/Flexbox fractional widths (1fr etc.), which are
   prone to subpixel rounding bugs across browser zoom levels. Fixed width +
   fixed position is one of the oldest, most reliably-supported CSS patterns
   there is, so this can't develop the same class of bug. */
.rail {
  width: 300px;
  flex-shrink: 0;
  align-self: stretch;
  box-sizing: border-box;
  background: var(--navy-dark);
  border-right: 3px solid var(--amber);
  z-index: 10;
}
.rail-sticky {
  position: sticky;
  top: var(--stack-h, 70px);
  color: rgba(255,255,255,0.85);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 0.92rem;
  overflow-wrap: break-word;
}
.rail-block h4 {
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.rail-phone {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 4px;
}
.rail-sub { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-bottom: 0; }
.rail-facts { list-style: none; margin: 0; padding: 0; }
.rail-facts li {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 0.85rem; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.rail-facts li:last-child { border-bottom: none; }
.rail-facts .v { color: var(--amber); font-weight: 700; }
.rail .btn { font-size: 0.85rem; padding: 12px 16px; }
.rail-branch-select {
  width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2);
  color: var(--white); padding: 10px 12px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 10px;
}

.main-col { flex: 1; min-width: 0; padding: 56px 48px; max-width: 860px; overflow-wrap: break-word; }
.main-col .kicker { color: var(--amber); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.main-col h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-top: 10px; }
.main-col > .lede { font-size: 1.15rem; }
.editorial-figure { margin: 32px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.editorial-figure img { width: 100%; display: block; }
.editorial-figure figcaption { font-size: 0.78rem; color: var(--grey-600); padding: 10px 4px 0; }
.editorial-figure.float-right { float: right; width: 46%; margin-left: 32px; }
.editorial-figure.float-left { float: left; width: 46%; margin-right: 32px; }
.clearfix::after { content: ""; display: table; clear: both; }

.inline-stats { display: flex; gap: 32px; flex-wrap: wrap; margin: 36px 0; padding: 24px 0; border-top: 1px solid var(--grey-300); border-bottom: 1px solid var(--grey-300); }
.inline-stats div { min-width: 110px; }
.inline-stats .num { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--navy); display: block; }
.inline-stats .label { font-size: 0.8rem; color: var(--grey-600); }

.pull-callout {
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 22px;
  margin: 32px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  font-family: var(--font-display);
}

.inline-cta {
  background: var(--grey-100);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 40px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.inline-cta p { margin: 0; font-weight: 700; color: var(--navy); }

@media (max-width: 960px) {
  .frame { flex-direction: column; }
  .rail { width: auto; border-right: none; border-bottom: 3px solid var(--amber); align-self: auto; }
  .rail-sticky { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; align-items: start; }
  .rail-block { flex: 1 1 200px; max-width: 320px; }
  .rail-facts { max-width: 260px; }
  .main-col { padding: 40px 24px; max-width: none; }
  .editorial-figure.float-right, .editorial-figure.float-left { float: none; width: 100%; margin: 24px 0; }
}

/* ---------- Utility ---------- */
.badge-heritage {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(196,98,45,0.12); color: var(--amber);
  font-weight: 700; font-size: 0.75rem; letter-spacing: 0.05em;
  padding: 6px 14px; border-radius: 20px; text-transform: uppercase;
  margin-bottom: 16px;
}
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--amber); color: var(--white); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }
