/* ==========================================
   ForgeKeep — Aaron T. E. Raymer
   ========================================== */

/* --- Font Faces --- */

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/source-sans-3-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Custom Properties --- */

:root {
  --color-bg: #F7F3EE;
  --color-bg-alt: #EFEBE4;
  --color-text: #2C2825;
  --color-heading: #1A1714;
  --color-muted: #6B6159;
  --color-accent: #8C4B27;
  --color-accent-hover: #73391E;
  --color-border: #DDD5CA;

  --font-heading: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --content-max: 54rem;
  --text-measure: 38rem;
  --label-width: 11rem;
}

/* --- Reset --- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Accessibility --- */

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-heading);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 3px 3px;
  transition: top 0.15s ease;
}

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

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

a:focus:not(:focus-visible) {
  outline: none;
}

/* --- Typography --- */

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.2;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

p + p {
  margin-top: 1em;
}

em {
  font-style: italic;
}

/* --- Header --- */

.site-header {
  padding: var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-heading);
  letter-spacing: -0.01em;
}

.header-contact {
  font-size: 0.9375rem;
  color: var(--color-muted);
  text-decoration: none;
}

.header-contact:hover {
  color: var(--color-accent);
}

/* --- Hero --- */

.hero {
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.hero-positioning {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.8vw, 1.3125rem);
  line-height: 1.55;
  color: var(--color-muted);
  max-width: var(--text-measure);
  margin-top: var(--space-md);
}

/* --- Sections --- */

.section {
  padding: var(--space-xl) var(--space-md);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--ruled {
  border-top: 1px solid var(--color-border);
}

.section-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--label-width) 1fr;
  gap: var(--space-xs) var(--space-lg);
  align-items: start;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-family: var(--font-body);
  padding-top: 0.25em;
  line-height: 1.4;
}

.section-content {
  max-width: var(--text-measure);
}

/* --- Services --- */

.service {
  margin-bottom: var(--space-lg);
}

.service:last-child {
  margin-bottom: 0;
}

.service-name {
  font-size: 1.375rem;
  font-weight: 400;
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

.service-body p {
  color: var(--color-text);
}

/* --- Background --- */

.background-body p {
  color: var(--color-text);
}

/* --- Engagements --- */

.engagement {
  margin-bottom: var(--space-md);
}

.engagement:last-child {
  margin-bottom: 0;
}

.engagement-name {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--color-heading);
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.engagement-body {
  color: var(--color-text);
}

/* --- Footer --- */

.site-footer {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--label-width) 1fr;
  gap: var(--space-xs) var(--space-lg);
  align-items: start;
}

.footer-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-family: var(--font-body);
  padding-top: 0.2em;
}

.footer-content {
  font-size: 0.9375rem;
  color: var(--color-muted);
}

.footer-contact-list {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.footer-contact-list a {
  color: var(--color-muted);
  text-decoration-color: var(--color-border);
}

.footer-contact-list a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.footer-location {
  margin-bottom: var(--space-md);
}

.footer-entity {
  font-size: 0.8125rem;
  color: var(--color-border);
}

/* --- Responsive --- */

@media (max-width: 52rem) {
  :root {
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
  }

  body {
    font-size: 1rem;
  }

  .section-grid,
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .section-label,
  .footer-label {
    padding-top: 0;
    margin-bottom: 0.25rem;
  }

  .hero {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-lg);
  }

  .service-name {
    font-size: 1.25rem;
  }
}

@media (max-width: 30rem) {
  :root {
    --space-xl: 2.5rem;
    --space-2xl: 3.5rem;
  }

  .header-inner {
    flex-direction: column;
    gap: 0.25rem;
  }

  .hero-name {
    font-size: 2rem;
  }
}

/* --- High Contrast --- */

@media (forced-colors: active) {
  .skip-link {
    border: 2px solid;
  }

  a {
    text-decoration: underline;
  }
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0s !important;
  }
}

/* --- Print --- */

@media print {
  .skip-link {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 11pt;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }

  .site-header {
    border-bottom: 1px solid #999;
  }

  .section--alt {
    background: none;
  }
}
