/* ==========================================================================
   McDaniel Legal — site theme
   Plain CSS, no framework. Colors and type are defined once in :root.
   ========================================================================== */

:root {
  --navy-900: #0e1f1a;
  --navy-800: #14302a;
  --navy-700: #1d4237;
  --navy-100: #e4ece8;
  --gold-500: #b08d57;
  --gold-600: #96753f;
  --gold-100: #f4ede1;
  --ink:      #1d232b;
  --ink-soft: #4a5562;
  --line:     #c3d0c7;
  --paper:    #e8eee9;
  --card:     #f7faf7;
  --white:    #ffffff;

  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans:  "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 2px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-700); text-decoration-color: var(--gold-500); text-underline-offset: 3px; }
a:hover { color: var(--gold-600); }

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--navy-800);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.2em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-500); color: var(--navy-900);
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #cfd9d4;
  font-size: .875rem;
  letter-spacing: .02em;
}
.topbar .container {
  display: flex; justify-content: flex-end; gap: 1.5rem;
  padding-block: .45rem;
}

/* ---------- Header / navigation ---------- */
.site-header {
  background: var(--navy-800);
  border-bottom: 3px solid var(--gold-500);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 84px;
}

.brand { text-decoration: none; color: var(--white); display: block; min-width: 0; }
.brand:hover { color: var(--white); }
.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: .01em;
  line-height: 1.1;
}
.brand-tag {
  display: block;
  margin-top: .3rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--gold-500);
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(255,255,255,.35);
  color: var(--white); font: inherit; font-size: .9rem;
  padding: .45rem .8rem; border-radius: var(--radius); cursor: pointer;
}

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem;
}
.site-nav a {
  display: block;
  padding: .5rem .8rem;
  color: #cfd9d4;
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .03em;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--white); border-bottom-color: var(--gold-500); }
.site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--gold-500); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-900) url("images/mcdaniellegalheader.jpg") center / cover no-repeat;
  color: var(--white);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14,31,26,.94) 0%, rgba(14,31,26,.82) 45%, rgba(14,31,26,.45) 100%);
}
.hero .container {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}
.hero .eyebrow {
  color: var(--gold-500);
  font-size: .8rem; text-transform: uppercase; letter-spacing: .22em;
  margin-bottom: 1rem;
}
.hero h1 {
  color: var(--white);
  max-width: 20ch;
  text-transform: capitalize;
  margin-bottom: 0;
}
.hero .rule {
  width: 64px; height: 2px; background: var(--gold-500);
  margin: 1.6rem 0 0; border: 0;
}
.lc { text-transform: none; }

/* ---------- Page header (inner pages; layout rules further down) ---------- */
.page-head { color: var(--white); }
.page-head h1 { color: var(--white); margin: 0; text-transform: capitalize; }

/* ---------- Main content ---------- */
main { display: block; }

.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section--alt { background: #d9e4dc; border-block: 1px solid var(--line); }

.prose { max-width: 70ch; }
.prose--lead p:first-of-type { font-size: 1.15rem; color: var(--ink); }
.prose p { color: var(--ink-soft); }
.prose b, .prose strong { color: var(--navy-800); font-weight: 600; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Call-out card */
.callout {
  background: var(--navy-800);
  color: #cfd9d4;
  padding: 2rem 1.75rem;
  border-top: 3px solid var(--gold-500);
}
.callout h2 { color: var(--white); font-size: 1.3rem; }
.callout address { font-style: normal; margin-bottom: 1.5rem; line-height: 1.6; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .75rem 1.4rem;
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 600; font-size: .95rem; letter-spacing: .04em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color .15s ease;
}
.btn:hover { background: #c4a26b; color: var(--navy-900); }
.btn--outline {
  background: transparent; color: var(--navy-800);
  border: 1px solid var(--navy-800);
}
.btn--outline:hover { background: var(--navy-800); color: var(--white); }

/* Practice-area cards */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title::after {
  content: ""; display: block; width: 48px; height: 2px;
  background: var(--gold-500); margin: 1rem auto 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  list-style: none; margin: 0; padding: 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy-700);
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-top-color: var(--gold-500); transform: translateY(-2px); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .98rem; flex: 1; }
.card a { font-weight: 600; text-decoration: none; font-size: .95rem; }
.card a::after { content: " \2192"; }

/* Lists (practice pages) */
.columns { columns: 2 260px; column-gap: 2.5rem; padding-left: 1.2rem; }
.columns li { break-inside: avoid; margin-bottom: .35rem; }
.columns li::marker { color: var(--gold-500); }

/* ---------- Inner pages ---------- */
.page-head {
  position: relative;
  background: var(--navy-800) url("images/mcdaniellegalheader.jpg") center / cover no-repeat;
}
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14,31,26,.96) 0%, rgba(20,48,42,.88) 60%, rgba(20,48,42,.7) 100%);
}
.page-head .container { position: relative; padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.page-head .eyebrow {
  color: var(--gold-500);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .22em;
  margin-bottom: .6rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.layout--wide { grid-template-columns: minmax(0, 1fr); }
.layout--wide .prose { max-width: none; }
.layout .prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.layout .prose h2:first-child { margin-top: 0; }

.sidebar { display: grid; gap: 1.5rem; position: sticky; top: 110px; }

.subnav {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy-700);
}
.subnav ul { list-style: none; margin: 0; padding: .5rem 0; }
.subnav a {
  display: block;
  padding: .55rem 1.25rem;
  text-decoration: none;
  color: var(--navy-700);
  border-left: 3px solid transparent;
}
.subnav a:hover { background: var(--gold-100); }
.subnav a[aria-current="page"] {
  border-left-color: var(--gold-500);
  background: var(--gold-100);
  font-weight: 600;
  color: var(--navy-800);
}

.note {
  border-left: 3px solid var(--gold-500);
  background: var(--white);
  padding: 1rem 1.25rem;
}

/* FAQ */
.faq-toc {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem 1.25rem 1.25rem 2.75rem;
  margin: 0 0 2.5rem;
}
.faq-toc li { margin-bottom: .35rem; }
.faq-toc li::marker { color: var(--gold-600); font-weight: 600; }
.faq-item {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  margin-top: 1.75rem;
  scroll-margin-top: 110px;
}
.faq-item:first-of-type { border-top: 0; padding-top: 0; }
.layout .prose .faq-item h2 { font-size: 1.25rem; margin-top: 0; }
.back-top { font-size: .85rem; margin: 0; }
.back-top a { text-decoration: none; }
.back-top a::before { content: "\2191  "; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li {
  position: relative;
  padding: .7rem 0 .7rem 2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.checklist li::before {
  content: ""; position: absolute; left: .2rem; top: 1.05rem;
  width: .8rem; height: .45rem;
  border-left: 2px solid var(--gold-500); border-bottom: 2px solid var(--gold-500);
  transform: rotate(-45deg);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
}
.contact-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy-700);
  padding: 1.5rem;
}
.layout .prose .contact-block h2 {
  font-size: .8rem; font-family: var(--font-sans); font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em; color: var(--gold-600);
  margin: 0 0 .6rem;
}
.contact-block p, .contact-block address { margin: 0; font-style: normal; color: var(--ink); }
.tel { font-size: 1.35rem; font-family: var(--font-serif); text-decoration: none; }

/* Location */
.lead-address {
  font-style: normal; font-size: 1.2rem; color: var(--navy-800);
  margin-bottom: 2rem;
}
.gallery {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  max-width: 1000px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--line); }
.gallery-main { grid-row: span 2; }
.gallery img:nth-child(2) { grid-column: span 2; aspect-ratio: 2 / 1; }
.gallery img:nth-child(3), .gallery img:nth-child(4) { aspect-ratio: 4 / 3; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #aebbb5;
  font-size: .9rem;
}
.site-footer .container { padding-block: 3rem 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer h2 {
  color: var(--white); font-size: 1.05rem; margin-bottom: .8rem;
}
.site-footer a { color: #cfd9d4; text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer address { font-style: normal; }
.disclaimer {
  font-size: .8rem; line-height: 1.6; color: #8a9a93;
  max-width: 90ch; margin: 1.75rem 0 1rem;
}
.copyright { font-size: .8rem; color: #8a9a93; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .intro, .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar .container { justify-content: center; }
  .site-header .container { flex-wrap: wrap; gap: .75rem 1rem; min-height: 72px; padding-block: .75rem; }
  .brand { flex: 1; }
  .brand-name { font-size: 1.35rem; }
  .brand-tag { font-size: .68rem; letter-spacing: .1em; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-bottom: .5rem; }
  .site-nav a { padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--gold-500); }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-main { grid-row: auto; grid-column: span 2; }
}

@media print {
  .topbar, .site-nav, .nav-toggle, .hero::before { display: none; }
  .site-header { position: static; background: none; border-bottom: 1px solid #000; }
  .brand, .brand-name { color: #000; }
  .hero { background: none; color: #000; }
  .hero h1 { color: #000; }
  body { background: #fff; }
}

/* A single practice-area card shouldn't stretch the full width */
.cards:has(> .card:only-child) { grid-template-columns: minmax(240px, 420px); justify-content: center; }

/* About page headshot */
.headshot {
  float: right; width: 240px; height: auto;
  margin: .25rem 0 1rem 1.5rem;
  border: 1px solid var(--line); border-top: 3px solid var(--gold-500);
}
@media (max-width: 600px) {
  .headshot { float: none; display: block; width: 100%; max-width: 280px; margin: 0 auto 1.25rem; }
}

/* "How we can help" case-type cards (home page) */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.cases li { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--navy-700); padding: 1.5rem; }
.cases h3 { margin-bottom: .4rem; }
.cases p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.cases-link { text-align: center; margin: 2rem 0 0; }
