/* =========================================================================
   O'Shea Law LLC — styles
   Palette: navy base + kelly green accent on off-white.
   Mobile-first. Full-bleed bands with a centered content column.
   Colors exposed as custom properties for easy tuning.
   ========================================================================= */

:root {
  /* Base */
  --navy: #14284b;
  --navy-dark: #0d1b33;
  --offwhite: #f7f6f2;
  --white: #ffffff;
  --ink: #1c2431;         /* body text */
  --muted: #5a6472;       /* secondary text */
  --border: #e2e0d8;

  /* Kelly green accent */
  --green: #23a24a;       /* bright accent: rules, hovers, decorative */
  --green-deep: #1a7a37;  /* AA-safe on white for links/buttons w/ white text */
  --green-darker: #14602b;/* hover for green buttons */
  --green-on-dark: #4cc46e;/* lighter green: AA-safe text on the navy hero */

  /* Typography */
  --font-head: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Cambria, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 70rem;
  --gutter: 1.25rem;
  --radius: 10px;
  --section-pad: clamp(3rem, 3vw + 2rem, 5rem);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(13, 27, 51, 0.05), 0 2px 8px rgba(13, 27, 51, 0.05);
  --shadow-md: 0 2px 4px rgba(13, 27, 51, 0.06), 0 10px 28px rgba(13, 27, 51, 0.1);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--offwhite);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); }
a:hover { color: var(--green-darker); }
::selection { background: var(--navy); color: #fff; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.2rem + 2.5vw, 3rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 0.9vw, 1.85rem); margin: 2rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }

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

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0; color: #fff; }

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

main { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary {
  background: var(--green-deep);
  color: #fff;
  box-shadow: 0 2px 10px rgba(26, 122, 55, 0.3);
}
.btn--primary:hover {
  background: var(--green-darker);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 122, 55, 0.35);
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--ghost:hover { background: var(--navy); color: #fff; }

.text-link { font-weight: 600; }

/* ---------- Layout: centered content column ---------- */
.site-header__inner,
.site-footer__inner,
main > section,
.contact-layout,
.practice-list,
.legal {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main > section { padding-block: var(--section-pad); }

/* Full-bleed bands: the section background spans the viewport while its
   content stays in the centered column. No extra markup needed. */
main > .hero,
main > .cta-band,
main > .highlights {
  max-width: none;
  padding-inline: 0;
  display: grid;
  grid-template-columns: 1fr min(var(--maxw), 100% - 2 * var(--gutter)) 1fr;
}
main > .hero > *,
main > .cta-band > *,
main > .highlights > * { grid-column: 2; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-block: 0.85rem;
}
.brand__logo { height: 40px; width: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  position: relative;
}
.nav-toggle__bar::before { position: absolute; top: -6px; }
.nav-toggle__bar::after { position: absolute; top: 6px; }

.site-nav { flex-basis: 100%; }
.site-nav ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: none;
  flex-direction: column;
}
.site-nav.is-open ul { display: flex; }
/* No-JS fallback: the toggle can't work, so keep the nav list visible */
.no-js .site-nav ul { display: flex; }
.no-js .nav-toggle { display: none; }
/* Hairline dividers between items in the open mobile menu */
.site-nav li + li { border-top: 1px solid var(--border); }
.site-nav a {
  display: block;
  padding: 0.6rem 0.25rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.25rem;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
.site-nav a:hover { color: var(--green-darker); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--green-darker); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  color: #eef1f6;
  background:
    radial-gradient(56rem 30rem at 88% -12%, rgba(35, 162, 74, 0.22), transparent 62%),
    radial-gradient(40rem 26rem at -12% 112%, rgba(76, 196, 110, 0.12), transparent 60%),
    linear-gradient(150deg, #17305c 0%, var(--navy) 45%, var(--navy-dark) 100%);
  padding-block: clamp(4rem, 4vw + 2.5rem, 6.5rem) !important;
}
.hero .eyebrow,
.hero h1,
.hero p { color: inherit; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 3.7rem);
  max-width: 22ch;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-on-dark);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 2px;
  background: var(--green);
}
.hero__lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem); max-width: 52ch; color: #c9d3e4; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }
/* Ghost button on the dark hero needs light border/text to stay visible */
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.hero .btn--ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- Cards / highlights ---------- */
.highlights { background: var(--white); }
.card-grid {
  list-style: none;
  margin: 1.75rem 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card:hover::before { transform: scaleY(1); }
.card h3 { color: var(--navy); }
.card p { margin-bottom: 0; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  color: #eef1f6;
  text-align: center;
  background:
    radial-gradient(48rem 26rem at 50% 130%, rgba(35, 162, 74, 0.2), transparent 65%),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding-block: clamp(3.5rem, 3vw + 2rem, 5rem) !important;
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #c9d3e4; }
.cta-band .btn { margin-top: 0.5rem; }

/* ---------- Page heads ---------- */
.page-head { padding-bottom: 0 !important; }
.page-head h1 { margin-bottom: 0.35em; }
.page-head h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--green);
  margin-top: 0.4em;
  border-radius: 2px;
}
.page-head__lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* ---------- Bio ---------- */
.bio__header { display: grid; gap: 1.75rem; }
.headshot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 240px;
  height: auto;
}
.bio__title { color: var(--green-deep); font-weight: 600; margin-top: -0.25rem; }
.section-note { color: var(--muted); font-style: italic; }

.timeline { list-style: none; padding: 0; margin: 0 0 1rem; border-left: 2px solid var(--border); }
.timeline li {
  padding: 0.75rem 0 0.75rem 1.5rem;
  display: grid;
  gap: 0.15rem;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--offwhite);
}
.timeline__role { font-weight: 600; color: var(--navy); }
.timeline__org { color: var(--ink); }
.timeline__dates { color: var(--muted); font-size: 0.95rem; }

.matters li,
.admissions li,
.education li { margin-bottom: 0.5rem; }

/* ---------- Practice areas ---------- */
.practice {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}
.practice h2 { margin-top: 0; }
.practice p { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-block: 2rem; }
.form-disclaimer {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.contact-details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  align-self: start;
}
.contact-details address { font-style: normal; }
.contact-details__firm { font-weight: 700; color: var(--navy); }

/* ---------- Form ---------- */
.contact-form { max-width: 40rem; }
.form-required-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; color: var(--navy); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c7ccd4;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(35, 162, 74, 0.15);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #b3261e; }
.field .req { color: #b3261e; }
.field .optional { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.field--checkbox { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; }
.field--checkbox input { width: auto; margin-top: 0.3rem; }
.field--checkbox label { font-weight: 400; }
.field--checkbox .field-error { grid-column: 1 / -1; }

.field-error { color: #b3261e; font-size: 0.9rem; margin: 0.35rem 0 0; }
.hp-field { position: absolute; left: -9999px; }

.form-status { margin-top: 1rem; font-weight: 600; }
.form-status.is-error { color: #b3261e; }
.form-status.is-success { color: var(--green-darker); }

/* ---------- Thank you ---------- */
.thank-you { max-width: 46rem; }
.thank-you__lead { font-size: 1.2rem; }

/* ---------- Prose (legal) ---------- */
.prose { max-width: 60rem; padding-block: 2rem; }
.prose h2 { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  border-top: 3px solid var(--green);
  color: #cfd6e2;
  margin-top: var(--section-pad);
}
.site-footer__inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover { color: var(--green-on-dark); }
.footer-firm-name { font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.site-footer address { font-style: normal; line-height: 1.8; }
.footer-disclaimer { font-size: 0.85rem; color: #aeb7c7; }
.footer-meta { font-size: 0.85rem; margin: 0; }

/* =========================================================================
   Tablet / desktop
   ========================================================================= */
@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .site-nav { flex-basis: auto; }
  .site-nav ul {
    display: flex;
    flex-direction: row;
    gap: 1.75rem;
    margin: 0;
  }
  .site-nav li + li { border-top: 0; }
  .site-nav a { padding: 0.35rem 0; }

  .card-grid { grid-template-columns: repeat(3, 1fr); }

  .bio__header { grid-template-columns: 260px 1fr; align-items: start; gap: 2.5rem; }
  .headshot { width: 260px; }

  .contact-layout { grid-template-columns: 1.6fr 1fr; gap: 3rem; }

  .site-footer__inner { grid-template-columns: 1fr 1.4fr; gap: 3rem; }
}
