/* ==========================================================================
   North Star Law — Design System
   ========================================================================== */

:root {
  /* Brand palette — anchored to the exact teal baked into the logo file (#003339) */
  --teal: #003339;
  --teal-dark: #001f22;
  --teal-light: #0f545a;
  --white: #ffffff;
  --sage: #c5d1c5;
  --gold: #d4b464;
  --gold-dark: #b6934a;
  --navy: #14213d;
  --moss: #3b6263;
  --moss-light: #587f80;

  /* Text */
  --text-dark: #14213d;
  --text-body: #2c3a3a;
  --text-muted: #5c6b6b;
  --text-on-dark: #f4f6f4;

  /* Surfaces */
  --bg-page: #ffffff;
  --bg-alt: #e4ede4;
  --bg-soft: #e4ede4;
  --border-soft: #d3decd;

  /* Type */
  --font-heading: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --container-max: 1180px;
  --header-height: 104px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(20, 33, 61, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 64, 64, 0.14);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 700; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.section--tight { padding-block: clamp(32px, 5vw, 64px); }
.section--soft { background: var(--bg-soft); }

/* Collapse the doubled gap where two same-toned sections sit back to back */
.section--soft + .section--soft { padding-top: 0; }
.section--soft + .gallery { padding-top: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover, .btn:focus-visible { transform: translateY(-2px); }

.btn--gold {
  background: var(--gold);
  color: var(--teal-dark);
}
.btn--gold:hover, .btn--gold:focus-visible { background: var(--gold-dark); }

.btn--outline-light {
  border-color: rgba(255,255,255,0.75);
  color: var(--white);
  background: transparent;
}
.btn--outline-light:hover, .btn--outline-light:focus-visible {
  background: rgba(255,255,255,0.12);
}

.btn--teal {
  background: var(--teal);
  color: var(--white);
}
.btn--teal:hover, .btn--teal:focus-visible { background: var(--teal-light); }

.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 {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--teal);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition);
  font-family: var(--font-heading);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

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

/* ============================== Header ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-height);
  background: var(--teal);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 14px rgba(0,0,0,0.18);
}

.site-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.site-header__logo {
  grid-column: 2;
  display: flex;
  justify-content: center;
}

.site-header__logo img {
  height: 64px;
  width: auto;
}

.menu-toggle {
  grid-column: 3;
  justify-self: end;
  background: transparent;
  border: none;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 46px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Slide-in nav panel */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 20, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 600;
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: var(--teal);
  z-index: 700;
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 28px 30px 40px;
  overflow-y: auto;
}
.site-nav.is-open { transform: translateX(0); }

.site-nav__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.nav-close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.site-nav__list > li {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-nav__list > li:first-child {
  border-top: 1px solid rgba(255,255,255,0.12);
}

.site-nav__list a {
  display: block;
  padding: 15px 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  transition: color var(--transition), padding-left var(--transition);
}
.site-nav__list a:hover, .site-nav__list a:focus-visible {
  color: var(--gold);
  padding-left: 10px;
}

.site-nav__group-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  padding: 18px 4px 6px;
  margin: 0;
}

.site-nav__sub {
  list-style: none;
  padding-left: 12px;
}
.site-nav__sub a {
  font-size: 0.98rem;
  font-weight: 600;
  padding: 11px 4px;
  color: var(--white);
}
.site-nav__sub a:hover, .site-nav__sub a:focus-visible {
  color: var(--gold);
  padding-left: 10px;
}

body.nav-open { overflow: hidden; }

/* ============================== Hero (home) ============================== */
.hero {
  position: relative;
  height: clamp(360px, 46vw, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,20,20,0.45) 0%, rgba(0,20,20,0.2) 38%, rgba(0,20,20,0.55) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 24px;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px);
  text-align: center;
  background: rgba(0, 40, 40, 0.38);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero__content h1 {
  color: var(--white);
  margin-bottom: 0.4em;
}

.hero__content p {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-on-dark);
  margin-bottom: 0;
}

/* ============================== Page hero (interior pages) ============================== */
.page-hero {
  background: var(--teal);
  color: var(--white);
  padding-block: clamp(40px, 6vw, 64px);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.3em; }
.page-hero p { color: var(--sage); max-width: 640px; margin-bottom: 0; font-size: 1.05rem; }

/* ============================== Service boxes ============================== */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.service-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.service-card:hover, .service-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.07);
}

.service-card__title {
  padding: 22px 16px 16px;
  text-align: center;
  min-height: 5.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card__title h3 { margin: 0; }

.service-card__icon-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px 40px;
}

.service-card__icon {
  width: 84px;
  height: 84px;
}

.service-card--teal .service-card__title { background: var(--teal-light); }
.service-card--teal .service-card__icon-wrap { background: var(--teal); }
.service-card--teal, .service-card--teal h3 { color: var(--white); }

.service-card--gold .service-card__title { background: #a88a52; }
.service-card--gold .service-card__icon-wrap { background: #8f7238; }
.service-card--gold, .service-card--gold h3 { color: var(--white); }

.service-card--navy .service-card__title { background: #223458; }
.service-card--navy .service-card__icon-wrap { background: var(--navy); }
.service-card--navy, .service-card--navy h3 { color: var(--white); }

.service-card--sage .service-card__title { background: #8a9289; }
.service-card--sage .service-card__icon-wrap { background: #6c736c; }
.service-card--sage, .service-card--sage h3 { color: var(--white); }

.service-card--moss .service-card__title { background: var(--moss-light); }
.service-card--moss .service-card__icon-wrap { background: var(--moss); }
.service-card--moss, .service-card--moss h3 { color: var(--white); }

/* ============================== Intro / Personable section ============================== */
.intro {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.intro__photo-wrap { text-align: center; }

.intro__bio { max-width: 52ch; font-size: 1.05rem; line-height: 1.65; }
.intro__bio p:last-child { margin-bottom: 0; }

.intro__bio-name { margin-bottom: 0.15em; }
.intro__bio-name a:hover, .intro__bio-name a:focus-visible { color: var(--teal); }
.intro__bio-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--teal);
  margin-bottom: 0;
}
.intro__bio .intro__rule { margin-top: 14px; margin-bottom: 16px; }

.intro__photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 26px;
}

.intro__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: var(--radius-md);
}

.intro__caption-box {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -20px;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  text-align: left;
}
.intro__caption-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.08rem;
  margin: 0;
  color: var(--white);
}
.intro__caption-role {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
  margin: 2px 0 0;
  color: var(--sage);
}

.intro__words {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  color: var(--teal);
  line-height: 1.2;
  margin-bottom: 26px;
}
.intro__words span { display: block; }
.intro__words span:nth-child(2) { color: var(--navy); }
.intro__words span:nth-child(3) { color: var(--gold-dark); }

.intro__rule {
  width: 72px;
  height: 3px;
  background: var(--gold);
  border: none;
  margin: 0 0 22px;
}

.intro__tagline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--navy);
  margin-bottom: 0;
}

/* ============================== Gallery slider ============================== */
.gallery {
  background: var(--bg-alt);
  padding-block: clamp(40px, 6vw, 64px);
  overflow: hidden;
}

.gallery .container { position: relative; }

.gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  background: var(--sage);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.gallery:hover .gallery__btn,
.gallery:focus-within .gallery__btn {
  opacity: 1;
}
.gallery__btn:hover, .gallery__btn:focus-visible { background: var(--teal); color: var(--white); }
.gallery__btn--prev { left: 8px; }
.gallery__btn--next { right: 8px; }

.gallery__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }

.gallery__item {
  flex: 0 0 auto;
  width: clamp(220px, 28vw, 300px);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}
.gallery__item:hover img { transform: scale(1.06); }

/* ============================== Footer ============================== */
.site-footer {
  background: var(--teal);
  color: var(--text-on-dark);
  padding-block: 56px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.footer-col h3 {
  color: var(--white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1em;
}

.footer-col p, .footer-col address { margin: 0 0 0.6em; font-style: normal; color: var(--sage); }
.footer-col a { color: var(--white); font-weight: 600; }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--gold); }

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col ul a { color: var(--sage); font-weight: 500; }
.footer-col ul a:hover, .footer-col ul a:focus-visible { color: var(--gold); }

.footer-office {
  margin-bottom: 18px;
}
.footer-office strong { color: var(--white); display: block; margin-bottom: 0.2em; }

.footer-logo img { height: 34px; margin-bottom: 14px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--sage);
}
.footer-bottom a { color: var(--sage); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================== Interior page layout ============================== */
.page-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.page-layout__main ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 1.4em 0;
}

.page-layout__main ul li {
  position: relative;
  padding-left: 26px;
  font-size: 1.05rem;
}

.page-layout__main ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--gold);
}

.contact-box {
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.contact-box h2 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 1em;
}

.contact-person {
  display: block;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
}
.contact-person:hover, .contact-person:focus-visible { color: var(--gold); }
.contact-person:has(+ .contact-box__phone) { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.contact-box__phone {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.4);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}
.contact-box__phone a { color: var(--white); }
.contact-box__phone a:hover { color: var(--gold); }

/* ============================== Who We Are ============================== */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border-soft);
  margin-top: 8px;
}

.staff-card {
  padding: 30px 26px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.staff-card h3 { margin-bottom: 0.2em; }

.staff-card__role {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-body);
  font-weight: 400;
  margin-bottom: 14px;
}

.staff-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.staff-card ul li {
  font-size: 0.95rem;
  color: var(--text-body);
  padding-left: 22px;
  position: relative;
}
.staff-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--gold);
}

.staff-card a {
  color: var(--teal);
  font-weight: 700;
  word-break: break-word;
}
.staff-card a:hover, .staff-card a:focus-visible { color: var(--gold-dark); }

/* ============================== Contact page ============================== */
.contact-hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
}
.contact-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 8px;
}

.contact-tile {
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 28px 26px;
}

.contact-tile__icon {
  width: 40px;
  height: 40px;
  color: var(--teal);
  margin-bottom: 14px;
}

.contact-tile h3 { margin-bottom: 0.35em; }
.contact-tile a { color: var(--teal); font-weight: 700; }
.contact-tile a:hover, .contact-tile a:focus-visible { color: var(--gold-dark); }

/* ============================== Responsive ============================== */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .contact-box { position: static; }
  .intro {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .intro__photo-wrap { max-width: 320px; margin-inline: auto; }
  .intro__bio { margin-inline: auto; }
  .intro__rule { margin-inline: auto; }
}

@media (max-width: 640px) {
  .site-header__logo img { height: 46px; }
  :root { --header-height: 84px; }
  .staff-card { border-right: none; }
}
