/* =========================================================
   Kiefner Law Offices — site stylesheet
   Replaces the Sitejet builder runtime (webcard, bundles)
   ========================================================= */

:root {
  --burgundy: #a4070b;
  --burgundy-dark: #730508;
  --charcoal: #2b2c2c;
  --gray: #5a5c5b;
  --gold: #ae7e45;
  --light: #f0f2f1;
  --white: #fff;
  --text: #2b2c2c;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --max-width: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); font-size: 1.05rem; line-height: 1.7; color: var(--text); background: var(--white); }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--burgundy); }
a:hover { color: var(--burgundy-dark); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 860px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--gold); color: #000; font-weight: 700; border-radius: 4px; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: #0d0d0d; border-bottom: 4px solid var(--burgundy); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; padding-block: .6rem; }
.logo img { width: auto; height: 62px; }
.header-phone { display: inline-flex; align-items: center; gap: .4rem; color: var(--white); font-weight: 500; text-decoration: none; white-space: nowrap; order: 3; }
.header-phone svg { width: 18px; height: 18px; fill: var(--gold); }
.header-phone:hover { color: var(--gold); }

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: .25rem 1.6rem; }
.primary-nav a {
  display: block; padding: .5rem 0;
  color: var(--white); font-size: .95rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--gold); border-color: var(--gold); }

.nav-toggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; background: transparent; border: 2px solid var(--gold); border-radius: 6px; order: 4; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--white); transition: transform .2s; }
.nav-toggle-bar { top: 50%; transform: translateY(-50%); }
.nav-toggle-bar::before { left: 0; right: 0; top: -8px; }
.nav-toggle-bar::after { left: 0; right: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 960px) {
  .logo img { height: 50px; }
  .header-phone { margin-left: auto; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: #0d0d0d; border-bottom: 4px solid var(--burgundy); padding: .25rem var(--gutter) 1rem; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { padding: .85rem 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
}
@media (max-width: 520px) {
  .logo img { height: 42px; }
  .header-phone span { display: none; }
  .header-phone svg { width: 24px; height: 24px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  text-align: center;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  background: linear-gradient(rgba(20, 10, 5, .72), rgba(20, 10, 5, .72)), url("../images/justice.jpg") center 35% / cover no-repeat;
}
.hero--home { padding-block: clamp(4rem, 12vw, 8rem); }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.15; }
.hero-kicker { font-family: var(--serif); font-size: clamp(1.1rem, 2.8vw, 1.5rem); color: #f3e2c9; margin-bottom: 1rem; }
.hero-sub { margin-top: 1rem; font-size: clamp(1rem, 2.3vw, 1.25rem); color: #e9e9e9; }
.hero h1::after { content: ""; display: block; width: 70px; height: 3px; background: var(--gold); margin: 1rem auto 0; }

/* Page section tabs (Staff, Services) */
.page-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding-block: 1.25rem 0; }
.page-tabs a { padding: .45rem 1rem; border: 1px solid #d5d7d6; border-radius: 999px; color: var(--gray); font-size: .9rem; font-weight: 500; text-decoration: none; }
.page-tabs a:hover { border-color: var(--burgundy); color: var(--burgundy); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section--light { background: var(--light); }
.section--image { background: linear-gradient(rgba(115, 5, 8, .88), rgba(60, 5, 6, .9)), url("../images/handshake.jpg") center / cover no-repeat; }
.section p + p { margin-top: 1rem; }

.lead-title { font-family: var(--serif); color: var(--burgundy); font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.3; }
.lead { font-size: 1.15rem; margin-top: .5rem; }
.tagline { margin-top: 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid var(--gold); background: var(--light); color: var(--burgundy-dark); font-weight: 500; }

.section-title { font-family: var(--serif); color: var(--burgundy); font-size: clamp(1.5rem, 3.5vw, 2.1rem); line-height: 1.3; text-align: center; margin-bottom: 1.75rem; }
.section-title--left { text-align: left; margin-bottom: .75rem; }
.section-title--left::after { content: ""; display: block; width: 60px; height: 3px; background: var(--gold); margin-top: .75rem; }
.subhead { font-size: 1.15rem; font-weight: 500; color: var(--gray); margin: 1.25rem 0 1rem; }
.minor { font-family: var(--serif); font-size: 1.3rem; color: var(--burgundy); margin: 1.25rem 0 .25rem; }

/* Client cards */
.client-cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.client-card { background: var(--white); border-top: 4px solid var(--burgundy); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.client-card img { width: 72px; margin: 0 auto 1rem; }
.client-card li { color: var(--burgundy); font-size: 1.1rem; font-weight: 500; padding: .25rem 0; }

/* Lists */
.check-list li { position: relative; padding: .3rem 0 .3rem 1.6rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .85em; width: .55rem; height: .55rem; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.check-list--cols { columns: 2 280px; column-gap: 2rem; margin-bottom: 1.25rem; }
.check-list--cols li { break-inside: avoid; }

/* Two-column panels on burgundy */
.two-col { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.panel { background: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: 0 8px 28px rgba(0, 0, 0, .15); }
.panel h2 { font-family: var(--serif); color: var(--burgundy); font-size: 1.35rem; line-height: 1.4; margin-bottom: 1rem; }
.panel-links { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.panel--dark { background: var(--charcoal); color: #eee; }
.panel--dark h2 { color: var(--white); }
.panel--dark a { color: #f3d4a8; }

/* Buttons */
.btn { display: inline-block; padding: .75rem 1.5rem; border: 2px solid var(--burgundy); border-radius: 4px; background: var(--burgundy); color: var(--white); font-weight: 500; letter-spacing: .03em; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--burgundy); }
.btn--ghost:hover { background: var(--burgundy); color: var(--white); }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Staff ---------- */
.profile { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 820px) { .profile { grid-template-columns: 300px minmax(0, 1fr); } }
.profile-photo img { width: 100%; max-width: 320px; margin-inline: auto; border: 6px solid var(--white); outline: 3px solid var(--burgundy); border-radius: 2px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
@media (min-width: 820px) { .profile-photo { position: sticky; top: 110px; } }
.profile-name { font-family: var(--serif); color: var(--burgundy); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; }
.profile-role { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: .35rem 0 1.25rem; }
.profile-sections { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.profile h3 { font-family: var(--serif); font-size: 1.25rem; color: var(--charcoal); border-bottom: 2px solid var(--light); padding-bottom: .35rem; margin: 1rem 0 .5rem; }
.profile h3 small { font-family: var(--sans); font-size: .8rem; color: var(--gray); font-weight: 400; }
.section--light .profile h3 { border-color: #dcdedd; }

/* ---------- Services ---------- */
.service-list { display: grid; gap: 1rem; margin-top: 1rem; }
.service-item { background: var(--white); border-left: 4px solid var(--burgundy); border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.section--light .service-item { box-shadow: none; }
.service-item h4 { font-family: var(--serif); color: var(--burgundy); font-size: 1.2rem; margin-bottom: .4rem; }
.note { margin-top: 2rem; padding: 1.5rem; background: var(--charcoal); color: #eee; border-radius: var(--radius); border-top: 4px solid var(--gold); }
.note h4 { font-family: var(--serif); color: var(--white); font-size: 1.15rem; margin-bottom: .5rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); } }
.contact-icon { width: 64px; margin-bottom: 1rem; padding: 10px; background: #fff; border-radius: 50%; box-sizing: content-box; }
.contact-list { margin-top: 1.5rem; display: grid; gap: 1rem; }
.contact-list span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 700; }

.form { display: grid; gap: .3rem; }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.form label { display: block; font-weight: 500; font-size: .9rem; margin-top: .6rem; }
.optional { color: var(--gray); font-weight: 400; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%; padding: .7rem .8rem; font: inherit; color: var(--text);
  background: #fafafa; border: 1px solid #c9cbca; border-radius: 4px;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(164, 7, 11, .15); background: var(--white); }
.form .checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin-top: 1rem; }
.form .checkbox input { width: 18px; height: 18px; margin-top: .3rem; accent-color: var(--burgundy); flex: none; }
.form .btn { justify-self: start; margin-top: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: .85rem 1rem; border-radius: 4px; font-weight: 500; margin-bottom: 1rem; }
.alert--ok { background: #e8f5ea; color: #145c22; border-left: 4px solid #2e7d32; }
.alert--error { background: #fdecea; color: #8a1f11; border-left: 4px solid var(--burgundy); }

/* ---------- Legal text ---------- */
.legal-text h2 { font-family: var(--serif); color: var(--burgundy); font-size: 1.6rem; margin: 2.25rem 0 .75rem; }
.legal-text h2:first-child { margin-top: 0; }
.legal-text h3 { font-size: 1.2rem; color: var(--charcoal); margin: 1.5rem 0 .5rem; }
.legal-text h4 { font-size: 1rem; color: var(--gray); margin: 1rem 0 .25rem; }
.legal-text p { margin-bottom: .85rem; overflow-wrap: anywhere; }
.legal-text p + p { margin-top: 0; }
.legal-text ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.address-block { padding: 1rem 1.25rem; background: var(--light); border-left: 4px solid var(--gold); }

/* ---------- Call-to-action band + footer ---------- */
.cta-band { background: var(--burgundy); color: var(--white); text-align: center; padding-block: 1.5rem; }
.cta-band p { font-family: var(--serif); font-size: clamp(1.05rem, 2.5vw, 1.3rem); }
.cta-band a { color: var(--white); font-weight: 700; white-space: nowrap; }
.cta-band span { display: block; font-family: var(--sans); font-size: .9rem; opacity: .85; margin-top: .25rem; }

.site-footer { background: #0d0d0d; color: #cfcfcf; padding-top: 2.5rem; }
.footer-grid { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.footer-brand img { width: 260px; }
.site-footer h2 { color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .15em; margin-bottom: .5rem; }
.site-footer p + p { margin-top: .25rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; padding-block: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-bottom a { color: #cfcfcf; text-decoration: none; }

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
@media print {
  .site-header, .nav-toggle, .page-tabs, .form, .cta-band, .footer-brand { display: none !important; }
  .hero, .section--image { background: none !important; color: #000 !important; padding-block: 1rem; }
  .hero h1, .hero p { color: #000 !important; }
  .panel, .client-card, .service-item { box-shadow: none !important; }
}
