/* ==========================================================================
   Family & Consumer Law Clinic — base stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&family=Inclusive+Sans:ital,wght@0,300..700;1,300..700&display=swap');

:root {
  /* Color tokens */
  --ink: #0C1030;
  --ink-soft: #696D7D;
  --paper: #F4F0E6;
  --paper-raised: #ffffff;
  --line: rgb(105 109 125 / 32%);
  --teal: #0C1030;
  --teal-dark: #0C1030;
  --teal-darker: #0C1030;
  --brass: #D1AF62;
  --brass-dark: #D1AF62;
  --brand-cream: #F4F0E6;
  --brand-blue: #5C80BC;
  --white: #ffffff;

  /* Type */
  --font-head: 'Afacad', Georgia, serif;
  --font-body: 'Inclusive Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

main { min-height: calc(100vh - 190px); }

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

a { color: var(--teal-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1, h2 { color: var(--teal-dark); }

h1 { font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 68ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.page-container{
  display: flex;
  flex-direction: column; 
  width: 100%;
  gap: 20px; /* Controls the vertical spacing between rows */
  padding: 0 var(--gutter);
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgb(244 240 230 / 96%);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(12px);
}

.site-header.is-scrolled { box-shadow: 0 7px 25px rgb(37 9 54 / 10%); }

.navbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  min-height: 132px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
  justify-self: start;
}

.brand img {
  width: 175px;
  height: auto;
}

.brand span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  justify-self: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--brass);
}

.home-page .site-header:not(.is-scrolled) {
  background: rgb(244 240 230 / 96%);
  border-bottom-color: transparent;
}

.home-page .site-header:not(.is-scrolled) .brand,
.home-page .site-header:not(.is-scrolled) .nav-links a {
  color: var(--ink);
}

.home-page .site-header:not(.is-scrolled) .nav-links a:hover,
.home-page .site-header:not(.is-scrolled) .nav-links a[aria-current="page"] {
  border-color: var(--brass);
}

.home-page .site-header:not(.is-scrolled) .nav-toggle {
  color: var(--teal);
  border-color: var(--line);
}

.home-page .site-header:not(.is-scrolled) a:focus-visible,
.home-page .site-header:not(.is-scrolled) button:focus-visible {
  outline-color: var(--brass);
}

@media (min-width: 861px) {
  .home-page .site-header:not(.is-scrolled) .nav-actions .btn-primary {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--brand-cream);
  }

  .home-page .site-header:not(.is-scrolled) .nav-actions .btn-primary:hover {
    background: var(--brass);
    border-color: var(--brass);
    color: var(--teal);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.75rem;
  margin-left: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
  text-align: center;
}

.btn-primary:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--teal);
  transform: translateY(-1px);
}

.btn-secondary { 
  background: var(--teal-darker);
  color: var(--white);
  border-color: var(--teal-dark);
}
.btn-secondary:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--teal);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .navbar { display: flex; flex-wrap: nowrap; gap: 0.75rem; min-height: 68px; }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100vw - 7.5rem);
    white-space: normal;
    font-size: clamp(0.86rem, 4.2vw, 1.1rem);
    line-height: 1.15;
  }
  .brand img { width: 145px; }
  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: auto;
    right: var(--gutter);
    z-index: 75;
    width: min(18rem, calc(100vw - 2.5rem));
    max-height: calc(100svh - 68px);
    overflow-y: auto;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 14px 25px rgb(37 9 54 / 14%);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle {
    position: relative;
    z-index: 80;
    display: inline-block;
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
  }
  .nav-actions {
    position: absolute;
    right: max(1rem, env(safe-area-inset-right));
    top: calc(100% + 0.75rem);
    bottom: auto;
    z-index: 60;
    margin: 0;
    filter: drop-shadow(0 8px 18px rgb(37 9 54 / 25%));
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav-actions .btn { min-height: 48px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-actions {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.5rem);
  }
  .home-page .site-header:not(.is-scrolled) .nav-links { background: var(--paper); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: var(--teal-dark);
  color: var(--paper-raised);
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(17rem, 0.7fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.hero-eyebrow {
  color: var(--brass);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero h1 {
  color: var(--white);
  max-width: 16ch;
}

.hero p {
  color: var(--brand-cream);
  font-size: 1.1rem;
  max-width: 52ch;
}

.hero-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero .btn-primary,
.cta-band .btn-primary {
  background: var(--white);
  border-color: var(--white);
  color: var(--teal-dark);
}

.hero .btn-primary:hover,
.cta-band .btn-primary:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--teal);
}

.hero-text-link {
  color: var(--white);
  font-weight: 600;
  text-underline-offset: 0.3em;
}

.hero-assurance {
  border: 1px solid var(--brass);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--brand-cream);
  box-shadow: 0 18px 45px rgb(12 16 48 / 18%);
}

.hero-assurance-label,
.section-kicker,
.profile-role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-assurance-label { margin-bottom: 1.25rem; color: var(--teal) !important; }
.hero-assurance ul { list-style: none; margin: 0; padding: 0; }
.hero-assurance li { display: grid; gap: 0.15rem; padding: 1rem 0; border-top: 1px solid rgb(12 16 48 / 18%); }
.hero-assurance li:first-child { border-top: 0; padding-top: 0; }
.hero-assurance li:last-child { padding-bottom: 0; }
.hero-assurance strong { color: var(--teal); }
.hero-assurance span { color: var(--ink-soft); font-size: 0.9rem; }

@media (max-width: 760px) {
  .hero-layout { grid-template-columns: 1fr; gap: 3rem; }
  .hero { padding: 4rem 0; }
}

.hero .btn-outline {
  color: var(--paper-raised);
  border-color: #4a5a58;
}

.hero .btn-outline:hover {
  border-color: var(--paper-raised);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: clamp(1rem, 6vw, 3rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-alt {
  background: var(--paper-raised);
}

.section-head {
  max-width: 60ch;
  margin-bottom: 2.5rem;
}

.grid {
  display: grid;
  gap: 1.75rem;
}

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

.service-grid { align-items: stretch; }
.service-card {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--brand-blue);
}
.service-card p { margin-bottom: 0; }

@media (max-width: 820px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.section-alt .card {
  background: var(--white);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p:last-child { margin-bottom: 0; }

.card-right {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 50%; 
  height: 50%;
  margin-left: auto; 
}
.card-left {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 50%;
  margin-right: auto; 
}

.stat-row {
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  margin-top: 1rem;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--teal-dark);
  display: block;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.divider-quote {
  border-left: 3px solid var(--brass);
  padding-left: 1.25rem;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  max-width: 46ch;
}

/* CTA band */
.cta-band {
  background: var(--teal-dark);
  color: var(--white);
  text-align: left;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.cta-band h2 { color: var(--white); }
.cta-band p { color: #d8e3df; }


.mission-services { margin-top: 2.75rem; }

/* Simple content page layout (mission / who-we-are / what-we-do) */
.page-header {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  border-bottom: 1px solid var(--line);
}

.page-header p { color: var(--ink-soft); font-size: 1.05rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
}

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-plain li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.list-plain li:first-child { border-top: none; }

.list-plain h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.list-plain p { margin-bottom: 0; color: var(--ink-soft); }

/* Branded process panels: blue is structural, while navy remains the text color. */
.process-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.process-list li,
.process-list li:first-child {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-blue);
  border-radius: var(--radius);
  background: rgb(92 128 188 / 10%);
}

.process-list h3 {
  color: var(--teal);
  font-size: 1.15rem;
}

@media (max-width: 700px) {
  .process-list { grid-template-columns: 1fr; }
}

/* Team profiles */
.team-group-heading {
  margin-bottom: 2.25rem;
  padding-left: 1rem;
  border-left: 5px solid var(--brand-blue);
}
.section-kicker, .profile-role { color: var(--teal); margin-bottom: 0.5rem; }
.profile-list { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.profile-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 12px 35px rgb(37 9 54 / 7%);
}
.profile-card--reverse { grid-template-columns: minmax(0, 1.28fr) minmax(220px, 0.72fr); }
.profile-card--reverse .profile-image { order: 2; }
.profile-card--reverse .profile-bio { order: 1; }
.profile-image { width: 100%; height: 100%; min-height: 360px; object-fit: cover; object-position: center; }
.profile-image--anthony { object-position: center 32%; }
.profile-bio { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.profile-bio h3 { color: var(--teal-dark); font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: 0.7em; }
.profile-placeholder { padding: 1rem; border-left: 3px solid var(--teal); background: var(--paper); color: var(--ink-soft); font-style: italic; }

/* Contact page */
.contact-section { padding-top: clamp(2.5rem, 6vw, 5rem); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact-image { width: 100%; min-height: 420px; max-height: 620px; object-fit: cover; border-radius: 8px; box-shadow: 0 14px 40px rgb(37 9 54 / 12%); }
.contact-details { padding-block: 1rem; }
.contact-details::before {
  content: "";
  display: block;
  width: 4rem;
  height: 5px;
  margin-bottom: 1.5rem;
  background: var(--brand-blue);
}
.contact-details > p { color: var(--ink-soft); }
.contact-list { list-style: none; margin: 2rem 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-label { color: var(--teal); font-weight: 600; }
.contact-list address { font-style: normal; }

@media (max-width: 720px) {
  .profile-card, .profile-card--reverse { grid-template-columns: 1fr; }
  .profile-card--reverse .profile-image, .profile-card--reverse .profile-bio { order: initial; }
  .profile-image { height: min(105vw, 430px); min-height: 0; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-image { min-height: 280px; }
}
/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: #b7c0be;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .footer-row { flex-direction: column; }
}

/* At this width the persistent action occupies roughly one-third of the viewport. */
@media (max-width: 540px) {
  .nav-actions {
    display: none;
  }
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: #d8e3df;
}
