/* Rank-and-rent base styles. #e0a82e is replaced with the brand color at build time. */
:root { --accent: #e0a82e; --ink: #1a1d21; --muted: #5b6570; --line: #e4e8ec; --bg-soft: #f6f8fa; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: #fff; line-height: 1.6; font-size: 17px; }
main { background: #fff; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2.15rem; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: 1.5rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .3em; }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
th { background: var(--bg-soft); }

/* header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 20px; position: relative; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--ink); display: flex; align-items: center; }
.brand-logo { height: 42px; width: auto; display: block; }
.main-nav { display: flex; gap: 18px; align-items: center; margin-left: auto; }
.nav-toggle { display: none; }
.nav-burger { display: none; }
.main-nav > a, .has-drop > a { color: var(--ink); font-weight: 600; font-size: .95rem; }
.has-drop { position: relative; }
.drop { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 0; min-width: 220px; list-style: none; margin: 6px 0 0; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.has-drop:hover .drop { display: block; }
.drop li a { display: block; padding: 8px 16px; color: var(--ink); font-weight: 500; }
.drop li a:hover { background: var(--bg-soft); text-decoration: none; }
.call-btn { background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700; white-space: nowrap; }
.call-btn:hover { text-decoration: none; opacity: .92; }

/* hero */
.hero { background: linear-gradient(160deg, var(--bg-soft), #fff); padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 760px; }
.hero-sub { font-size: 1.2rem; color: var(--muted); max-width: 680px; margin: 0 0 1.4em; }

/* hero with background photo */
.hero.has-bg { position: relative; border-bottom: none; background-size: cover; background-position: center;
  padding: 96px 0 84px; display: flex; align-items: center; min-height: 460px; }
.hero.has-bg::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,12,15,.78) 0%, rgba(10,12,15,.55) 45%, rgba(10,12,15,.35) 100%); }
.hero.has-bg .wrap { position: relative; z-index: 1; }
.hero.has-bg h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero.has-bg .hero-sub { color: rgba(255,255,255,.92); text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.hero.has-bg .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.hero.has-bg .btn-ghost:hover { background: rgba(255,255,255,.14); }
.hero.has-bg .badges li { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.34); color: #fff;
  backdrop-filter: blur(2px); }

/* two-column hero with intake form */
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero.has-bg .hero-inner { align-items: center; }
.hero-copy { min-width: 0; }
.hero-form { min-width: 0; }

/* intake form */
.intake-form { background: #fff; border-radius: 14px; padding: 22px 22px 20px; box-shadow: 0 18px 44px rgba(0,0,0,.22);
  display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.form-title { font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--ink); }
.form-sub { margin: -4px 0 6px; color: var(--muted); font-size: .9rem; }
.intake-form input, .intake-form select, .intake-form textarea {
  width: 100%; padding: 12px 13px; border: 1px solid #cfd6dd; border-radius: 8px; font-size: 1rem;
  font-family: inherit; color: var(--ink); background: #fff; }
.intake-form input:focus, .intake-form select:focus, .intake-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.intake-form textarea { resize: vertical; }
.intake-form .form-submit { width: 100%; margin-top: 2px; cursor: pointer; border: 0; font-size: 1.05rem; }
.form-fine { margin: 4px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.intake-form .hp { display: none !important; }   /* honeypot */
.form-embed { max-width: 520px; }
.form-embed .intake-form { box-shadow: 0 8px 24px rgba(0,0,0,.08); }

/* ghost button on colored bands */
.btn-ghost-light { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.cta-row-center { justify-content: center; }

/* estimate modal (pure CSS :target) */
.modal { display: none; position: fixed; inset: 0; z-index: 200; padding: 20px;
  background: rgba(10,12,15,.62); align-items: flex-start; justify-content: center; overflow-y: auto; }
.modal:target { display: flex; }
.modal-card { background: #fff; border-radius: 14px; padding: 26px 22px 22px; max-width: 460px; width: 100%;
  position: relative; margin: 6vh auto; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.modal-card .intake-form { box-shadow: none; border: 0; padding: 0; }
.modal-close { position: absolute; top: 8px; right: 16px; font-size: 1.9rem; line-height: 1; color: #98a2ad;
  text-decoration: none; }
.modal-close:hover { color: var(--ink); text-decoration: none; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 8px; font-weight: 700; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { text-decoration: none; opacity: .92; }
.btn-ghost { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.btn-ghost:hover { text-decoration: none; background: var(--bg-soft); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 24px 0 0; }
.badges li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; font-size: .88rem; font-weight: 600; }

/* page head (non-hero pages) */
.page-head { padding: 44px 0 8px; }

/* service cards */
.service-cards-sec { padding: 48px 0 8px; }
.section-title { text-align: center; margin: 0 0 28px; font-size: 1.9rem; }
.service-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px 22px;
  color: var(--ink); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.card-icon { font-size: 2rem; line-height: 1; }
.card h3 { margin: 6px 0 2px; font-size: 1.15rem; }
.card-link { color: var(--accent); font-weight: 700; font-size: .95rem; margin-top: auto; padding-top: 8px; }

/* content */
.content-sec { padding: 12px 0; }
.content-sec .wrap.narrow { max-width: 820px; }

/* alternating split sections (image beside text) */
.split-sec { padding: 40px 0; }
.split-sec.alt-bg { background: var(--bg-soft); }
.split-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split-inner.reverse .split-text { order: 2; }
.split-inner.reverse .split-media { order: 1; }
.split-text h2 { margin-top: 0; }
.split-media img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); display: block; }

/* link grid */
.link-grid { background: var(--bg-soft); padding: 32px 0; margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chips a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 15px; font-weight: 600; color: var(--ink); }
.chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* faqs */
.faqs { padding: 32px 0; }
.faqs .wrap { max-width: 820px; }
.faq { border-top: 1px solid var(--line); padding: 16px 0; }
.faq h3 { margin: 0 0 .3em; }
.faq-a { color: var(--muted); }

/* blog-post branded CTA (links back to homepage) */
.blog-cta { padding: 8px 0 24px; }
.blog-cta .wrap { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 24px 26px; }
.blog-cta h2 { margin-top: 0; }
.blog-cta .cta-row { margin-top: 16px; }

/* cta band */
.cta-band { background: var(--accent); color: #fff; text-align: center; padding: 48px 0; margin-top: 40px; }
.cta-band h2 { margin-top: 0; }
.cta-band p { opacity: .92; margin-bottom: 1.4em; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }
.cta-band p a { color: #fff; text-decoration: underline; font-weight: 700; }
.cta-band p a:hover { opacity: .85; }

/* google maps band (above footer) */
.map-band { border-top: 1px solid var(--line); }
.map-cap { padding: 16px 20px; text-align: center; color: var(--muted); font-size: .95rem; }
.map-cap strong { color: var(--ink); }
.map-band iframe { display: block; width: 100%; height: 320px; border: 0; }

/* footer */
.site-footer { background: #12161a; color: #c7ced5; margin-top: 48px; padding: 44px 0 24px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.site-footer .foot-h { color: #fff; margin: 0 0 12px; font-size: 1rem; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #c7ced5; }
.site-footer a:hover { color: #fff; }
.foot-call { font-weight: 700; font-size: 1.1rem; color: #fff !important; }
.counties { font-size: .9rem; color: #97a1ab; margin-top: 10px; }
.sub-foot { border-top: 1px solid #2a3038; margin-top: 28px; padding-top: 18px; font-size: .85rem; color: #8b95a0; }

@media (max-width: 900px) {
  .service-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.7rem; }
  .hero { padding: 40px 0 32px; }
  .hero.has-bg { min-height: 0; padding: 40px 0 36px; }
  .hero.has-bg::before { background: linear-gradient(180deg, rgba(10,12,15,.62) 0%, rgba(10,12,15,.72) 100%); }
  .hero-inner { grid-template-columns: 1fr; gap: 22px; }
  .intake-form { padding: 18px 16px 16px; }
  .modal-card { margin: 3vh auto; padding: 24px 18px 18px; }
  .split-inner { grid-template-columns: 1fr; gap: 20px; }
  .split-inner.reverse .split-text { order: 1; }
  .split-inner.reverse .split-media { order: 2; }
  .service-cards { grid-template-columns: 1fr; }
  .section-title { font-size: 1.5rem; }

  /* mobile header: compact logo + phone, hamburger menu */
  .header-inner { gap: 10px; }
  .brand { margin-right: auto; }
  .brand-logo { height: 34px; }
  .call-btn { padding: 8px 12px; font-size: .82rem; }
  .nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 40px; padding: 9px 8px; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; }
  .nav-burger span { display: block; height: 2.5px; width: 100%; background: var(--ink); border-radius: 2px; }

  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .main-nav > a, .has-drop > a { display: block; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .has-drop { width: 100%; }
  /* collapse hover submenus on mobile (override desktop :hover specificity); top-level links go to hub pages */
  .has-drop .drop, .has-drop:hover .drop { display: none; }
}
/* ============================================================
   Alameda Custom Railing — theme overrides
   Charcoal (#2b333c) + amber/gold (#e0a82e), industrial-clean.
   Appended to dist/styles.css after the base build.
   ============================================================ */
:root {
  --ink: #20262e;
  --charcoal: #2b333c;
  --charcoal-2: #232a32;
  --amber: #e0a82e;
  --amber-dk: #c8901c;
  --line: #e2e6ea;
  --bg-soft: #f5f7f9;
}

/* Nav dropdown gap fix: a transparent bridge over the 6px gap (+ header border)
   so moving the cursor from the nav item down into the dropdown doesn't drop
   :hover and close the menu. :focus-within adds keyboard/touch support. */
.has-drop::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.drop { margin-top: 0; top: calc(100% + 8px); }
.has-drop:focus-within .drop { display: block; }

/* header: dark bar, amber call button */
.site-header { background: var(--charcoal); border-bottom: 3px solid var(--amber); }
.brand, .main-nav > a, .has-drop > a { color: #f4f6f8 !important; }
.brand-logo { height: 46px; }
.drop a { color: var(--ink) !important; }
.nav-burger span { background: #f4f6f8; }

/* hero: charcoal gradient, amber accents */
.hero { background: linear-gradient(135deg, var(--charcoal) 0%, var(--charcoal-2) 100%); color: #eef1f4; }
.hero.has-bg::before { background: linear-gradient(135deg, rgba(32,38,46,.86), rgba(20,24,28,.78)); }
.hero h1 { color: #fff; }
.hero-sub { color: #d4dae0; }
.hero-copy { animation: acr-fade .7s ease both; }
@keyframes acr-fade { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none; } }

/* buttons */
.btn-primary { background: var(--amber); color: #1c2128; border-color: var(--amber); font-weight: 700; }
.btn-primary:hover { background: var(--amber-dk); border-color: var(--amber-dk); }
/* .btn-ghost is intentionally NOT overridden globally: the base stylesheet already
   styles it per context (white-on-transparent inside .hero.has-bg, amber-on-white
   on light bands). A global override previously made the blog-CTA button
   white-on-white/invisible. Below we only lift the blog-CTA ghost button to high
   contrast: charcoal text + amber border on the light card. */
.blog-cta .btn-ghost { color: var(--ink); border-color: var(--amber); background: #fff; }
.blog-cta .btn-ghost:hover { background: var(--bg-soft); }

/* Bottom CTA band: charcoal (not flat amber) so text + buttons are high-contrast.
   Amber-with-white-text rendered ~2:1; charcoal-with-amber-button reads cleanly. */
.cta-band { background: var(--charcoal); color: #eef1f4; }
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: var(--amber); color: #1c2128; border-color: var(--amber); }
.cta-band .btn-primary:hover { background: var(--amber-dk); }
.cta-band .btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.65); background: transparent; }
.cta-band .btn-ghost-light:hover { background: rgba(255,255,255,.14); }
.cta-band p a { color: var(--amber); }

/* accent-driven links/headers stay amber via --accent (set to amber at build) */
h2 { border-left: 4px solid var(--amber); padding-left: 12px; }

/* feature / why-us grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; margin: 24px 0; }
.feature-grid .feature { background: var(--bg-soft); border: 1px solid var(--line); border-top: 3px solid var(--amber);
  border-radius: 8px; padding: 20px; }
.feature h3 { margin-top: 0; }

/* image service tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin: 24px 0; }
.tile-grid .tile { position: relative; border-radius: 10px; overflow: hidden; min-height: 190px;
  display: flex; align-items: flex-end; background: var(--charcoal); }
.tile-grid .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.tile-grid .tile span { position: relative; z-index: 1; width: 100%; padding: 14px; color: #fff; font-weight: 700;
  background: linear-gradient(transparent, rgba(20,24,28,.85)); }

/* full-width bands */
.band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 28px 0; margin: 30px 0; }
.band-dark { background: var(--charcoal); color: #eef1f4; }
.band-dark h2 { color: #fff; }

/* process steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 18px; }
.steps .step { position: relative; padding: 18px 18px 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.steps .step::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--amber); color: #1c2128; font-weight: 800; margin-bottom: 8px; }

/* trust badges bar */
.badge { background: rgba(224,168,46,.14); color: var(--amber-dk); border: 1px solid rgba(224,168,46,.4);
  border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: .85rem; }

/* hero trust pills: readable on the charcoal hero whether or not a bg image is set */
.hero .badges li { background: rgba(255,255,255,.12); border: 1px solid rgba(224,168,46,.55);
  color: #f4f6f8; }

/* cache-policy applied; build stamp v1 */
