/* ============================================================
   California Glass Railing — design system
   Clean, professional, GSD-style layout adapted to glass work.
   ============================================================ */

:root {
  --navy: #0d2433;
  --navy-800: #143246;
  --ink: #1b2b36;
  --slate: #4a5f6d;
  --teal: #0e7c96;
  --teal-dark: #0a6478;
  --paper: #ffffff;
  --mist: #f3f8fa;
  --line: #dce8ed;
  --glass-1: #cfe9f2;
  --glass-2: #9fd4e6;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(13, 36, 51, .08);
  --shadow-md: 0 6px 24px rgba(13, 36, 51, .10);
  --maxw: 1120px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; color: var(--slate); }

.site-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 550; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--teal); }
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: #fff; }
.nav-phone a { font-weight: 700; color: var(--navy); }
.nav-cta .btn { padding: 9px 18px; font-size: .9rem; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 650; font-size: 1rem; text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--glass-1); color: var(--navy); }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(79,195,217,.25), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 55%, #1b4a63 100%);
  color: #e8f4f8;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 72px 0 64px; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero .lede { font-size: 1.15rem; color: #c9e2ec; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; padding: 0; list-style: none; font-size: .9rem; color: #bcd9e5; }
.hero-badges li { display: flex; align-items: center; gap: 8px; }
.hero-badges svg { flex: none; }
.hero-art { position: relative; }
.hero-art img, .hero-art svg { width: 100%; border-radius: var(--radius); }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 750; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 10px;
}
.hero .eyebrow { color: #7fd0e4; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 46em; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card .icon { width: 46px; height: 46px; margin-bottom: 14px; }
.card p { color: var(--slate); font-size: .95rem; flex: 1; }
.card .card-link { font-weight: 650; font-size: .92rem; text-decoration: none; }

/* stretched-link cards */
.card { position: relative; }
.card .card-link::after { content: ""; position: absolute; inset: 0; }

/* ---------- Answer block (GEO) ---------- */
.answer-block {
  background: var(--mist); border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px; margin: 0 0 28px; font-size: 1.05rem;
}
.answer-block p { margin: 0; }

/* ---------- Prose (markdown bodies) ---------- */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--mist); color: var(--navy); }
.prose blockquote { border-left: 3px solid var(--glass-2); margin: 1.2em 0; padding: .2em 0 .2em 1.2em; color: var(--slate); }
.prose img { border-radius: var(--radius); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: linear-gradient(160deg, var(--navy), var(--navy-800)); color: #dcedf4; padding: 52px 0 44px; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero .lede { color: #c9e2ec; max-width: 40em; font-size: 1.1rem; margin: 0; }
.breadcrumbs { font-size: .85rem; margin-bottom: 14px; color: #9cc3d4; }
.breadcrumbs a { color: #9cc3d4; }
.breadcrumbs a:hover { color: #fff; }

/* ---------- Two-column layout with sidebar ---------- */
.layout-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.sidebar-card h3 { font-size: 1.05rem; }
.sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card li { margin-bottom: 8px; font-size: .93rem; }
.sidebar-cta { background: var(--navy); color: #d7eaf2; }
.sidebar-cta h3 { color: #fff; }
.sidebar-cta .btn { width: 100%; margin-top: 10px; }
.sidebar-cta a.mail { color: #9fd4e6; word-break: break-all; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 46em; }
.faq-list details {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 4px 20px; margin-bottom: 12px;
}
.faq-list summary { font-weight: 650; color: var(--navy); cursor: pointer; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-list summary::after { content: "+"; font-size: 1.3rem; color: var(--teal); flex: none; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { color: var(--slate); margin: 0 0 14px; }

/* ---------- Steps / process ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 0; list-style: none; }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; font-size: .92rem; color: var(--slate); }
.steps li strong { display: block; color: var(--navy); margin: 10px 0 4px; font-size: 1rem; }
.steps li::before {
  content: counter(step); display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 750; align-items: center; justify-content: center;
}

/* ---------- Testimonial ---------- */
.testimonial {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm); max-width: 42em; margin: 0 auto;
}
.testimonial blockquote { margin: 0 0 14px; font-size: 1.15rem; color: var(--ink); border: 0; padding: 0; }
.testimonial cite { font-style: normal; color: var(--slate); font-size: .95rem; }
.stars { color: #f5b301; letter-spacing: 2px; margin-bottom: 10px; }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-sm); position: relative; display: flex; flex-direction: column;
}
.project-card:hover { box-shadow: var(--shadow-md); }
.project-card .thumb { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--glass-1); }
.project-card .meta { padding: 18px 20px 20px; }
.project-card .tags { font-size: .8rem; color: var(--teal); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.project-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.project-card h3 a { text-decoration: none; color: var(--navy); }
.project-card h3 a::after { content: ""; position: absolute; inset: 0; }
.project-card p { color: var(--slate); font-size: .9rem; margin: 0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-bar button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px;
  font-size: .88rem; font-weight: 600; color: var(--slate); cursor: pointer;
}
.filter-bar button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 26px 0; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- Trust bar ---------- */
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item { text-align: center; padding: 18px 10px; }
.trust-item .num { font-size: 1.7rem; font-weight: 800; color: var(--navy); display: block; }
.trust-item .lbl { font-size: .88rem; color: var(--slate); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 90%); color: #eaf6fa; padding: 56px 0; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; color: #cfe7f0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 650; font-size: .92rem; color: var(--navy); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.form-note { font-size: .85rem; color: var(--slate); }
.form-status { margin-top: 14px; font-weight: 650; display: none; padding: 14px 16px; border-radius: 8px; }
.form-status.ok { display: block; background: #e6f6ee; color: #12653b; }
.form-status.err { display: block; background: #fdecec; color: #9c2121; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Landing pages ---------- */
.lp-header .header-inner { min-height: 64px; }
.lp-header-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone-link { font-weight: 750; color: var(--navy); text-decoration: none; font-size: 1.05rem; }
.lp-hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: start; padding: 56px 0 60px; }
.lp-hero .lede { font-size: 1.12rem; }
.lp-testimonial { margin-top: 28px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
.lp-testimonial blockquote { color: #e8f4f8; font-size: 1.02rem; }
.lp-testimonial cite { color: #bcd9e5; }
.lp-form-card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,.28);
}
.lp-form-card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.lp-form-card > p { color: var(--slate); font-size: .93rem; margin-bottom: 16px; }
.lp-form-card .form-field { margin-bottom: 13px; }
.sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 10px 14px;
  grid-auto-flow: column; gap: 10px;
}
.sticky-cta .btn { width: 100%; padding: 12px 10px; font-size: .95rem; }
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; padding: 40px 0 48px; }
}
@media (max-width: 720px) {
  .sticky-cta { display: grid; }
  body:has(.sticky-cta) { padding-bottom: 68px; }
  .lp-header .brand-sub { display: none; }
  .lp-header-cta .nav-phone-link { display: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13, 36, 51, .94);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1200px, 88vw); text-align: center; }
.lightbox img {
  max-width: min(1200px, 88vw); max-height: 84vh; width: auto; height: auto;
  margin: 0 auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb-caption { color: #c9e2ec; font-size: .92rem; margin-top: 12px; }
.lightbox button {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #fff; cursor: pointer; border-radius: 50%;
  width: 46px; height: 46px; font-size: 1.5rem; line-height: 1; flex: none;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { position: absolute; top: 18px; right: 18px; }
@media (max-width: 720px) {
  .lb-prev, .lb-next { position: absolute; bottom: 18px; }
  .lb-prev { left: 18px; }
  .lb-next { right: 18px; }
  .lightbox img { max-width: 96vw; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9d2de; font-size: .93rem; }
.site-footer a { color: #cfe4ee; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; padding: 56px 20px 30px; }
.footer-col h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.14); padding-top: 22px; padding-bottom: 26px; font-size: .85rem; color: #8fb0c0; }
.footer-legal p { margin: 0; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.pill-list li { background: var(--mist); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: .9rem; color: var(--navy); font-weight: 550; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 52px 0 44px; }
  .hero-art { max-width: 520px; }
  .card-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; }
  .site-nav li { border-bottom: 1px solid var(--mist); }
  .site-nav li:last-child { border: 0; }
  .site-nav a { display: block; padding: 13px 4px; font-size: 1.05rem; }
  .nav-cta { padding-top: 12px; }
  .nav-cta .btn { display: block; }
  .card-grid, .card-grid.cols-2, .project-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

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