/* Phair Law & Mediation -- generated stylesheet.
   Colors/fonts come from content/config.md; tokens like #2A74B3
   are substituted by scripts/build.py. Hand-edit this template, not
   anything under output/. */

@font-face {
  font-family: "Italianno";
  src: url("fonts/Italianno-Regular.c91c4b8b38.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-base: #2A74B3;
  --color-pop: #F1F1EF;
  --color-adjacent: #299EB3;
  --color-ink: #26282b;
  --color-ink-soft: #52555a;
  --font-display: "Italianno", cursive;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 72rem;
  --speed-slow: 900ms;
  --speed-medium: 450ms;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-pop);
  line-height: 1.65;
  animation: page-fade-in var(--speed-slow) ease both;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

a {
  color: var(--color-base);
  text-decoration: none;
  transition: color var(--speed-medium) ease;
}

a:hover,
a:focus-visible {
  color: var(--color-adjacent);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-base);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- */
/* Header + navigation (pure CSS checkbox hamburger, no JavaScript)  */
/* ---------------------------------------------------------------- */

.site-header {
  background: var(--color-pop);
  border-bottom: 1px solid rgba(42, 116, 179, 0.15);
  position: relative;
  z-index: 10;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.logo-line1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--color-base);
}

.logo-line2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-base);
  margin-top: -0.3rem;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  background: var(--color-base);
  transition: transform var(--speed-medium) ease, opacity var(--speed-medium) ease;
}

.nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--speed-slow) ease;
}

.nav-toggle:checked ~ .site-nav {
  max-height: 20rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
}

.site-nav a {
  display: block;
  padding: 0.6rem 0.1rem;
  color: var(--color-ink);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-base);
}

@media (min-width: 800px) {
  .nav-toggle-label {
    display: none;
  }

  .site-nav {
    flex-basis: auto;
    max-height: none;
    overflow: visible;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 2rem;
    padding: 0;
  }

  .site-nav a {
    padding: 0.4rem 0.1rem;
  }
}

/* ---------------------------------------------------------------- */
/* Hero sections                                                    */
/* ---------------------------------------------------------------- */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  animation: hero-settle 1.4s ease both;
}

/* The home hero photo (a full-length statue) keeps more of its subject
   in frame on short/wide viewports if the crop favors the top third. */
.hero .hero-img {
  object-position: center 15%;
}

@keyframes hero-settle {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 30, 40, 0.55), rgba(20, 30, 40, 0.72));
}

.hero {
  min-height: 70vh;
}

.page-hero {
  min-height: 34vh;
}

.hero-content,
.page-hero h1 {
  position: relative;
  z-index: 1;
  padding: 2rem 1.25rem;
}

.hero-wordmark-1 {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 6.5rem);
  line-height: 1;
}

.hero-wordmark-2 {
  display: block;
  font-family: var(--font-display);
  /* Sized/spaced at the same ratio to hero-wordmark-1 as .logo-line2
     is to .logo-line1 (~0.62x the size, ~-0.23em of overlap), so the
     big home hero reads as a scaled-up version of the header logo. */
  font-size: clamp(2.2rem, 6.8vw, 4rem);
  line-height: 1;
  margin-top: -0.23em;
  color: var(--color-pop);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  color: #fff;
  margin: 0;
}

/* ---------------------------------------------------------------- */
/* Home page table-of-contents cards                                */
/* ---------------------------------------------------------------- */

.toc-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.toc-card {
  display: block;
  padding: 1.5rem 1.5rem 1.6rem;
  background: #fff;
  border: 1px solid rgba(42, 116, 179, 0.15);
  border-radius: 6px;
  transition: transform var(--speed-medium) ease, box-shadow var(--speed-medium) ease, border-color var(--speed-medium) ease;
}

.toc-card:hover,
.toc-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--color-adjacent);
  box-shadow: 0 10px 24px rgba(41, 158, 179, 0.14);
}

.toc-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4em;
}

.toc-card p {
  color: var(--color-ink-soft);
  margin: 0;
}

/* ---------------------------------------------------------------- */
/* Content pages                                                    */
/* ---------------------------------------------------------------- */

.content {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 4rem;
}

.content h1 {
  font-size: 1.9rem;
}

.definition-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
  .definition-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.definition {
  padding: 1.25rem 1.4rem;
  background: #fff;
  border: 1px solid rgba(42, 116, 179, 0.15);
  border-left: 3px solid var(--color-adjacent);
  border-radius: 4px;
}

.definition h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4em;
}

.definition p {
  margin: 0;
  color: var(--color-ink-soft);
}

/* ---------------------------------------------------------------- */
/* Footer                                                            */
/* ---------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid rgba(42, 116, 179, 0.15);
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
}

.site-footer p {
  max-width: 40rem;
  margin: 0 auto 0.6em;
}

.site-footer a {
  color: var(--color-ink-soft);
  text-decoration: underline;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-base);
}

/* ---------------------------------------------------------------- */
/* Motion preferences: keep everything minimal, subtle, slow -- and  */
/* respect anyone who has asked for less motion altogether.          */
/* ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
