/* Hartley Law Office — site styles
   Palette derived from the firm logo (h-block blue #0C4990). */

:root {
  --blue: #0C4990;
  --blue-deep: #082F5E;
  --blue-tint: #E7EEF8;
  --ink: #1B2431;
  --slate: #5A6472;
  --line: #D6DCE4;
  --mist: #F3F5F8;
  --paper: #FFFFFF;
  --brass: #B48A3C;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
}

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

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

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

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

a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 400; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.375rem); font-weight: 400; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blue-deep); color: #fff; padding: 0.75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 0.85em; height: 0.85em; background: var(--blue); }

.lede { font-size: 1.25rem; line-height: 1.55; color: var(--slate); max-width: 60ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1;
  border: 2px solid var(--blue); background: var(--blue); color: #fff;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--blue); }
.btn--ghost:hover { background: var(--blue-tint); color: var(--blue-deep); }
.btn--light { background: #fff; border-color: #fff; color: var(--blue-deep); }
.btn--light:hover { background: var(--blue-tint); border-color: var(--blue-tint); color: var(--blue-deep); }

/* ---------- Header ---------- */
.topbar {
  background: var(--blue-deep); color: #C9D6E8; font-size: 0.875rem;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-top: .45rem; padding-bottom: .45rem; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }

.site-header {
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand svg { height: 44px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 0.6rem 0.85rem; border-radius: var(--radius); position: relative;
}
.nav a:hover { background: var(--mist); color: var(--blue-deep); }
.nav a[aria-current="page"] { color: var(--blue); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .35rem; height: 2px; background: var(--blue);
}
.nav .btn { margin-left: .5rem; padding: .65rem 1.1rem; }

.has-menu { position: relative; }
.has-menu > a::after { content: " ▾"; font-size: .75em; }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 300px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(8,47,94,.12); padding: .5rem; margin: 0; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.has-menu:hover .submenu, .has-menu:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: .55rem .75rem; font-weight: 500; }
.submenu a::after { display: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .55rem .7rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: .75rem var(--gutter) 1.25rem; gap: 0;
    box-shadow: 0 16px 32px rgba(8,47,94,.1);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem .5rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { display: none; }
  .has-menu > a::after { display: none; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
    padding: 0 0 0 1rem; min-width: 0;
  }
  .submenu a { border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 1rem 0 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--blue-deep); color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 20%, rgba(12,73,144,.9), transparent 55%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding-top: 5rem; padding-bottom: 5rem; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: #BFD3F0; }
.hero .lede { color: #C9D6E8; margin-bottom: 2rem; }
.hero .eyebrow { color: #BFD3F0; }
.hero .eyebrow::before { background: #BFD3F0; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-actions .btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero-actions .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* The plan-on-a-page stack: signature element */
.plan-stack { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.plan-stack li {
  display: grid; grid-template-columns: 52px 1fr; align-items: stretch;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius);
  color: #fff; text-decoration: none; overflow: hidden;
  transition: transform .15s ease, background-color .15s ease;
}
.plan-stack li:hover { background: rgba(255,255,255,.12); transform: translateX(4px); }
.plan-stack .tab {
  background: var(--blue); font-family: var(--font-display); font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center; font-weight: 500;
}
.plan-stack .body { padding: .75rem 1rem; }
.plan-stack .body strong { display: block; font-weight: 600; }
.plan-stack .body span { font-size: .875rem; color: #BFD3F0; }
.plan-stack a { color: inherit; text-decoration: none; display: contents; }

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 3.5rem; padding-bottom: 3.5rem; gap: 2.25rem; }
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section--mist { background: var(--mist); }
.section--blue { background: var(--blue-deep); color: #fff; }
.section--blue h2, .section--blue h3 { color: #fff; }
.section--blue p { color: #C9D6E8; }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head p { color: var(--slate); font-size: 1.125rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .5rem;
  transition: border-color .15s, box-shadow .15s;
}
a.card:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(8,47,94,.08); color: inherit; }
.card .tab {
  width: 40px; height: 40px; background: var(--blue); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .5rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: .25rem; }
.card p { color: var(--slate); font-size: .975rem; }
.card .more { margin-top: auto; font-weight: 600; color: var(--blue); font-size: .95rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { border-top: 3px solid var(--blue); padding-top: 1rem; }
.steps li::before {
  counter-increment: step; content: "Step " counter(step);
  display: block; font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: .5rem;
}
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--slate); font-size: .975rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .6rem; }
.checklist li { padding-left: 1.75rem; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .8em; height: .8em; background: var(--blue);
}

/* ---------- Office card ---------- */
.office {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.office__head { background: var(--blue); color: #fff; padding: 1rem 1.5rem; font-weight: 600; }
.office__body { padding: 1.5rem; display: grid; gap: 1.25rem; }
.office__body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; }
.office__body dt { font-weight: 600; }
.office__body dd { margin: 0; color: var(--slate); }
.hours { width: 100%; border-collapse: collapse; font-size: .975rem; }
.hours td { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; color: var(--slate); }
.hours tr.closed td:last-child { color: #9AA3AE; }
.hours tr.today td { font-weight: 600; color: var(--blue); }

/* ---------- Page header + article ---------- */
.page-head { background: var(--mist); border-bottom: 1px solid var(--line); padding: 3.5rem 0; }
.page-head .wrap { display: grid; grid-template-columns: 88px 1fr; gap: 1.75rem; align-items: start; }
.page-head .tab {
  width: 88px; height: 88px; background: var(--blue); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.25rem; line-height: 1;
}
.page-head h1 { margin-bottom: .75rem; }
.crumbs { font-size: .875rem; color: var(--slate); margin-bottom: .75rem; }
.crumbs a { color: var(--slate); }
.crumbs span { margin: 0 .4rem; }
@media (max-width: 640px) {
  .page-head .wrap { grid-template-columns: 1fr; }
  .page-head .tab { width: 64px; height: 64px; font-size: 1.75rem; }
}

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; padding: 4rem 0; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0; } }

.article { max-width: 68ch; }
.article h2 { margin-top: 2.5rem; font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 1.75rem; font-size: 1.25rem; }
.article ul, .article ol { padding-left: 1.4rem; }
.article li { margin-bottom: .4rem; }
.article dl { margin: 1.25rem 0; border-top: 1px solid var(--line); }
.article dt { font-weight: 600; padding-top: 1rem; }
.article dd { margin: .25rem 0 1rem; color: var(--slate); padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.article .note {
  background: var(--blue-tint); border-left: 4px solid var(--blue); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0;
}

.faq details { border-top: 1px solid var(--line); padding: .25rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: .9rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--slate); padding-bottom: 1rem; }

.sidebar { display: grid; gap: 1.5rem; align-self: start; position: sticky; top: 96px; }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.side-box--blue { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }
.side-box--blue h3 { color: #fff; }
.side-box--blue p { color: #C9D6E8; }
.side-box h3 { font-size: 1.2rem; margin-bottom: .75rem; }
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li { border-top: 1px solid var(--line); }
.side-box li a { display: block; padding: .6rem 0; text-decoration: none; font-weight: 500; }
.side-box li a:hover { text-decoration: underline; }
.side-box .phone { font-family: var(--font-display); font-size: 1.75rem; display: block; color: #fff; text-decoration: none; margin: .25rem 0 .75rem; }
@media (max-width: 900px) { .sidebar { position: static; } }

.disclaimer { font-size: .875rem; color: var(--slate); border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 2.5rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.form label .opt { font-weight: 400; color: var(--slate); }
.form input, .form select, .form textarea {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; color: var(--ink); background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue); outline: 3px solid var(--blue-tint); outline-offset: 0; }
.form textarea { min-height: 140px; resize: vertical; }
.form .hint { font-size: .875rem; color: var(--slate); }
.form .honey { position: absolute; left: -9999px; }
.form-status { padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 500; display: none; }
.form-status.is-ok { display: block; background: #E6F4EA; color: #1E5A2E; }
.form-status.is-error { display: block; background: #FBE9E7; color: #8A2A1B; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue); color: #fff; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .25rem; }
.cta-band p { color: #C9D6E8; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-deep); color: #C9D6E8; font-size: .95rem; }
.site-footer .wrap { padding-top: 3.5rem; padding-bottom: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #E4ECF7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.6; }
.footer-logo { margin-bottom: 1rem; }
.footer-logo img { height: 52px; width: auto; image-rendering: auto; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; font-size: .8125rem; color: #98ACC6; }
.footer-bottom p { margin: 0 0 .5rem; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 640px) {
  .topbar .wrap > span:first-child { display: none; }
  .topbar .wrap { justify-content: center; }
}
