/* =========================================================
   /assets/css/styles.css
   Shared stylesheet for gertkenlaw.com
   ========================================================= */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Bona Nova";
  src: url("../fonts/BonaNova-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bona Nova";
  src: url("../fonts/BonaNova-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Variable.woff") format("woff");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Italic-Variable.woff") format("woff");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Brand tokens ----------
   Navy:       headings, links, footer. White text on navy is fine.
   Text:       all body copy.
   Gray:       section backgrounds, dividers.
   Light blue: backgrounds/decoration only. Never text on white.
   Green:      decoration only (rules, borders). Never text.        */
:root {
  --navy: #2D3F4E;
  --text: #313335;
  --gray: #DFDFE2;
  --gray-soft: #F3F3F5;
  --blue: #84BCDA;
  --green: #70AE6E;
  --white: #FFFFFF;

  --font-heading: "Bona Nova", Constantia, Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 68ch;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --space: clamp(3rem, 8vw, 5.5rem);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.65;
  font-optical-sizing: auto;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-footer :focus-visible { outline-color: var(--blue); }

/* ---------- Utilities ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}
.skip-link:focus { transform: none; outline-color: var(--blue); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--gray);
  background: var(--white);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--navy);
}
.brand img { width: 3.25rem; height: 3.25rem; flex: none; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  line-height: 1.2;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding-block: 0.5rem;     /* 24px+ touch target */
  text-decoration: none;
  font-size: 1rem;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.4em;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space); }
.section--gray { background: var(--gray-soft); border-block: 1px solid var(--gray); }

.eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

/* Opening notice (homepage, temporary) */
.notice {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.6rem 1rem;
  background: var(--blue);
  color: var(--text);
  font-weight: 600;
  border-radius: 3px;
}

/* Hero */
.hero h1 { max-width: 22ch; }
.hero .lede { font-size: 1.25rem; max-width: 58ch; }
.hero-text::after {
  content: "";
  display: block;
  width: 15rem;
  height: 3px;
  margin-top: 2.5rem;
  background: var(--green);
}

.hero-art { display: none; }
@media (min-width: 900px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 4rem;
  }
  .hero-art { display: block; width: 100%; max-width: 22rem; justify-self: end; }
}

/* Button-style link */
.button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.8rem 1.4rem;
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
}
.button:hover { background: var(--white); color: var(--navy); }

/* Practice-area cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-top: 4px solid var(--blue);
  padding: 1.75rem;
}
.card p:last-child { margin-bottom: 0; }
.more-link { margin-top: 2rem; }

/* Two-column text block */
.split {
  display: grid;
  gap: 2rem 4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: start;
}
.facts {
  align-self: center;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 3px solid var(--green);
}
.facts li { padding: 0.35rem 0 0.35rem 1.25rem; }

/* ---------- Legal and text pages ---------- */
.legal .wrap { max-width: 48rem; }
.legal h1 { margin-bottom: 0.25em; }
.legal h2 { margin-top: 2.25rem; font-size: 1.6rem; }
.legal h3 { margin-top: 1.5rem; font-size: 1.25rem; }
.legal .updated { color: var(--text); font-size: 1rem; margin-bottom: 2rem; }
.legal ul { padding-left: 1.25rem; max-width: var(--measure); }
.legal li { margin-bottom: 0.4rem; }
.site-footer a[aria-current="page"] { text-decoration-thickness: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  font-size: 1rem;
  padding-block: 3rem 2rem;
}
.site-footer a { color: var(--white); }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding-block: 0.1rem; }
.site-footer li a { display: inline-block; padding-block: 0.2rem; }  /* 24px+ targets (WCAG 2.5.8) */
.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
}
.footer-legal p { max-width: none; }

/* ---------- Print ---------- */
@media print {
  .skip-link, .site-nav, .button { display: none; }
  .site-footer { background: none; color: #000; }
  .site-footer a { color: #000; }
}
