/* ============================================
   EXIGENT — exigentinc.ca
   Design System
   ============================================ */

/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: #0E1419;
  color: #F2F4F7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Typography */
.serif {
  font-family: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4 {
  font-family: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.875rem, 3.25vw, 2.75rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.25rem;
  color: #D6DBE2;
}

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

p.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: #E5E9EF;
}

p.note {
  font-size: 0.95rem;
  color: #9AA4B2;
}

.muted {
  color: #9AA4B2;
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9AA4B2;
  margin-bottom: 1rem;
  display: block;
}

/* Inline links */
.inline-link {
  color: #F2F4F7;
  border-bottom: 1px solid rgba(232, 130, 14, 0.5);
  padding-bottom: 1px;
  transition: border-color 200ms ease;
}

.inline-link:hover {
  border-bottom-color: #E8820E;
}

/* Layout */
.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: clamp(4rem, 9vw, 8rem) 0;
}

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

/* Rule */
.rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(232, 130, 14, 0.35) 50%, transparent 100%);
  margin: 0;
  border: 0;
}

.rule-thin {
  width: 64px;
  height: 2px;
  background: #E8820E;
  margin: 0 0 2rem 0;
  border: 0;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 20, 25, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  font-family: 'Black Ops One', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #F2F4F7;
  display: inline-block;
}

.wordmark .accent {
  color: #E8820E;
}

nav.primary {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}

nav.primary a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #D6DBE2;
  transition: color 200ms ease;
  position: relative;
}

nav.primary a:hover {
  color: #F2F4F7;
}

nav.primary a.active {
  color: #F2F4F7;
}

nav.primary a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background: #E8820E;
}

/* Hero (home) */
.hero {
  position: relative;
  min-height: clamp(540px, 80vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url('assets/images/wildfire-hero.jpg');
  background-size: cover;
  background-position: center 30%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(14, 20, 25, 0.5) 0%,
    rgba(14, 20, 25, 0.7) 50%,
    rgba(14, 20, 25, 0.95) 100%);
}

.hero .container {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.75rem;
  max-width: 32ch;
}

.hero .lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  max-width: 56ch;
  color: #E5E9EF;
}

/* Page header (interior pages) */
.page-header {
  padding: clamp(5rem, 8vw, 7rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-header h1 {
  margin-bottom: 1rem;
  max-width: 28ch;
}

.page-header .lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  max-width: 56ch;
  color: #C8CFD9;
}

/* Practice section blocks */
.practice-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.practice-block:last-of-type {
  border-bottom: none;
}

.practice-block h2 {
  margin-bottom: 1rem;
}

.practice-block h3 {
  margin-top: 2rem;
}

.practice-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem 2rem;
}

.practice-list li {
  font-size: 0.97rem;
  color: #D6DBE2;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.practice-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #E8820E;
  opacity: 0.7;
}

.callout {
  margin-top: 2.5rem;
  padding: 2rem 0 0 1.75rem;
  border-left: 2px solid #E8820E;
}

.callout p {
  font-size: 1.02rem;
  color: #D6DBE2;
  margin-bottom: 0;
}

.modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.modes .mode {
  padding-left: 1.5rem;
  border-left: 1px solid rgba(232, 130, 14, 0.4);
}

.modes .mode strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #F2F4F7;
  font-weight: 600;
  font-size: 1.05rem;
}

.modes .mode span {
  color: #B7BFCC;
  font-size: 0.97rem;
  line-height: 1.55;
}

/* Section image inline */
.section-image {
  margin: 2.5rem 0 0;
  border-radius: 2px;
  overflow: hidden;
}

.section-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.85) contrast(1.05);
}

/* Credentials block (home) */
.credentials {
  background: #0A0F13;
  position: relative;
}

.credentials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 2px;
  background: #E8820E;
}

.credentials h2 {
  margin-bottom: 1.5rem;
}

.credentials p {
  font-size: 1.05rem;
  line-height: 1.65;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat .num {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 2.25rem;
  color: #E8820E;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat .label {
  font-size: 0.95rem;
  color: #9AA4B2;
  line-height: 1.45;
  display: block;
}

/* Approach section */
.approach h2 {
  max-width: 18ch;
}

/* Practice preview (home) */
.practice-preview .item {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.practice-preview .item:last-child {
  border-bottom: none;
}

.practice-preview .item h3 {
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.005em;
}

.practice-preview .item h3 .accent {
  color: #E8820E;
}

.practice-preview .item p {
  color: #C8CFD9;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 64ch;
}

.read-more-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: #F2F4F7;
  border-bottom: 1px solid rgba(232, 130, 14, 0.5);
  padding-bottom: 2px;
  transition: border-color 200ms ease;
}

.read-more-link:hover {
  border-bottom-color: #E8820E;
}

/* Closing section */
.closing {
  background: #0A0F13;
}

.closing h2 {
  max-width: 22ch;
  margin-bottom: 1.5rem;
}

/* Team page */
.bio {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bio:last-of-type {
  border-bottom: none;
}

.bio h2 {
  margin-bottom: 0.25rem;
  font-size: 1.875rem;
}

.bio .role {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9AA4B2;
  margin-bottom: 1.5rem;
  display: block;
}

.bio p {
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 64ch;
}

.cadre-note {
  margin-top: 2rem;
  padding: 1.75rem 0 0;
  font-size: 0.97rem;
  color: #9AA4B2;
  font-style: italic;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-top: 2rem;
}

.contact-block .label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9AA4B2;
  margin-bottom: 0.75rem;
  display: block;
}

.contact-block .firm-name {
  font-family: 'Black Ops One', 'Inter', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  display: block;
}

.contact-block address {
  font-style: normal;
  color: #C8CFD9;
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.contact-block a.email {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: #F2F4F7;
  border-bottom: 1px solid rgba(232, 130, 14, 0.5);
  padding-bottom: 2px;
  transition: border-color 200ms ease;
}

.contact-block a.email:hover {
  border-bottom-color: #E8820E;
}

.contact-block .note p {
  color: #B7BFCC;
  font-size: 0.97rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 4rem 0 3rem;
  background: #0A0F13;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.site-footer .wordmark {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.site-footer .tagline {
  color: #B7BFCC;
  max-width: 44ch;
  margin-bottom: 1.5rem;
  font-style: italic;
  font-family: 'Newsreader', serif;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
}

.site-footer .contact-mini {
  color: #9AA4B2;
  line-height: 1.7;
}

.site-footer .contact-mini a {
  color: #D6DBE2;
  border-bottom: 1px solid rgba(232, 130, 14, 0.4);
  padding-bottom: 1px;
}

.site-footer .copyright {
  color: #6B7280;
  font-size: 0.85rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 1rem;
}

/* Responsive */
@media (min-width: 768px) {
  body {
    font-size: 18px;
  }

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

  .contact-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
  }

  .site-footer .container {
    grid-template-columns: 1.5fr 1fr;
  }

  .practice-block {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  nav.primary {
    gap: 1.25rem;
  }

  nav.primary a {
    font-size: 0.88rem;
  }

  .wordmark {
    font-size: 1.2rem;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #E8820E;
  color: #0E1419;
  padding: 0.5rem 1rem;
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #E8820E;
  outline-offset: 3px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
