/* Ryan Brothers Fire Protection website. Same palette as the work order app. */
:root {
  --charcoal: #18181b;
  --charcoal-2: #27272a;
  --red: #b3121f;
  --red-dark: #8f0e19;
  --page: #f4f4f5;
  --card: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --radius: 12px;
  --wrap: 1120px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.6 Barlow, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--red); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border-radius: 10px; font-weight: 700; font-size: 17px; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: currentColor; color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.btn-ghost { border-color: var(--border); color: var(--text); background: #fff; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 15px; }

/* Header */
.site-header { background: var(--charcoal); color: #fff; position: sticky; top: 0; z-index: 1000; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand img { display: block; height: 60px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 8px; display: block; }
.site-nav a:hover, .site-nav a[aria-current='page'] { background: var(--charcoal-2); }
.site-nav .nav-cta a { margin-left: 6px; background: var(--red); }
.site-nav .nav-cta a:hover { background: var(--red-dark); }
.has-sub { position: relative; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--charcoal); border-radius: 0 0 10px 10px; padding: 6px; box-shadow: var(--shadow); }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.header-phone { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.menu-button { display: none; margin-left: auto; min-height: 44px; padding: 8px 16px; background: transparent; color: #fff; border: 2px solid #52525b; border-radius: 10px; font: 600 16px Barlow, sans-serif; }

@media (max-width: 960px) {
  .menu-button { display: block; }
  .header-phone { display: none; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--charcoal); padding: 8px 16px 16px; max-height: calc(100vh - 72px); overflow-y: auto; }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .sub { display: block; position: static; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
  .site-nav a { padding: 12px; }
  .site-nav .nav-cta a { margin: 8px 0 0; text-align: center; }
}

/* Sections */
.hero { background: linear-gradient(135deg, var(--charcoal) 0%, #2b0a0d 100%); color: #fff; padding: 64px 0 72px; }
.hero p.lead { font-size: 20px; color: #e4e4e7; max-width: 640px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; color: #d4d4d8; font-size: 15px; }
.hero .badges span::before { content: '✓ '; color: #f87171; font-weight: 700; }
.page-head { background: var(--charcoal); color: #fff; padding: 44px 0 40px; }
.page-head p { color: #d4d4d8; font-size: 19px; max-width: 720px; margin: 0; }
.section { padding: 56px 0; }
.section.alt { background: #fff; }
.section-intro { max-width: 720px; margin-bottom: 28px; }

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 4px; }
.card p:last-child { margin-bottom: 0; }
.service-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform 0.15s; }
.service-card:hover { transform: translateY(-2px); }
.service-card img { width: 78%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0 auto 14px; display: block; }
.service-card .more { margin-top: auto; color: var(--red); font-weight: 700; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-list li { padding-left: 30px; position: relative; }
.feature-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 100 20 10 10 0 000-20zm-1.5 14.5L4 10l1.4-1.4 3.1 3.1 6.1-6.1L16 7l-7.5 7.5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 100 20 10 10 0 000-20zm-1.5 14.5L4 10l1.4-1.4 3.1 3.1 6.1-6.1L16 7l-7.5 7.5z'/%3E%3C/svg%3E") center / contain no-repeat; }

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.cta-band { background: var(--red); color: #fff; padding: 44px 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { margin: 0; }
.cta-band .btn-red { background: #fff; color: var(--red); }

table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 16px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { background: var(--charcoal); color: #fff; font-weight: 600; }
.table-scroll { overflow-x: auto; }

.classes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.classes .card { text-align: center; padding: 14px; }
.classes img { width: 96px; height: auto; }
@media (max-width: 760px) { .classes { grid-template-columns: repeat(2, 1fr); } }

.people { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 24px; }
.people figure { margin: 0; }
.people img { border-radius: var(--radius); display: block; }
.people figcaption { font-weight: 700; margin-top: 8px; font-size: 19px; }

/* Service area */
#zone-map { height: 560px; border-radius: var(--radius); box-shadow: var(--shadow); background: #e5e7eb; }
@media (max-width: 640px) { #zone-map { height: 420px; } }
.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 14px 0 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.legend .swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.2); }
.zip-check { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.zip-result { margin-top: 12px; font-weight: 600; min-height: 1.6em; }

/* Forms */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
label, .label { font-weight: 600; display: block; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
input[type='text'], input[type='tel'], input[type='email'], input[type='search'], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: 16px Barlow, sans-serif; border: 1px solid #a1a1aa; border-radius: 10px; background: #fff; color: var(--text);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(179, 18, 31, 0.25); border-color: var(--red); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
@media (max-width: 640px) { .checks { grid-template-columns: 1fr; } }
.checks label { font-weight: 500; display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 0; }
.checks input { width: 22px; height: 22px; accent-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 10px; font-weight: 600; }
.notice.ok { background: #dcfce7; color: #14532d; }
.notice.err { background: #fee2e2; color: #7f1d1d; }

/* Footer */
.site-footer { background: var(--charcoal); color: #d4d4d8; padding: 48px 0 24px; font-size: 16px; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 18px; margin-bottom: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .muted { color: #a1a1aa; }
.site-footer .nafed { background: #fff; border-radius: 10px; padding: 6px; }
.footer-bottom { border-top: 1px solid #3f3f46; margin-top: 32px; padding-top: 18px; font-size: 14px; color: #a1a1aa; }

/* Livelier resource pages */
.page-head-red { background: linear-gradient(135deg, var(--red) 0%, #6b0a12 100%); }
.page-head-red p { color: #fde2e4; }
.facts-section { padding: 0; margin-top: -28px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; align-items: center; gap: 16px; border-top: 4px solid var(--red); }
.fact-big { font-size: 40px; font-weight: 800; color: var(--red); line-height: 1; min-width: 52px; text-align: center; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
.tip-card { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.tip-img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #fecaca; }
.tip-img-plain { object-fit: contain; background: #fff7ed; padding: 10px; }
@media (max-width: 520px) { .tip-card { grid-template-columns: 1fr; } .tip-img { width: 96px; height: 96px; } }
.checklist-band { background: var(--charcoal); color: #fff; }
.checklist-band p { color: #d4d4d8; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { background: var(--charcoal-2); border-radius: 10px; padding: 12px 14px 12px 48px; position: relative; font-weight: 600; }
.checklist li::before { content: ''; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border: 2px solid #f87171; border-radius: 5px; }
