:root {
  --brand-primary: #b92531;
  --brand-hover: #b92531;
  --text-primary: #191a1b;
  --text-secondary: #515253;
  --text-muted: #656667;
  --surface-main: #fff;
  --surface-alt: #f3f4f5;
  --surface-warm: #f4f5f6;
  --surface-dark: #1f2021;
  --text-inverse: #fff;
  --text-inverse-secondary: #d5d6d7;
  --border-subtle: #d7d8d9;
  --border-control: #757677;
  --content-width: 1200px;
  --reading-width: 720px;
  --gutter: 24px;
  --section-space: 48px;
  --grid-gap: 16px;
  --heading-gap: 24px;
  --radius: 4px;
  --header-height: 72px;
  --h1: 2rem;
  --h2: 1.75rem;
  --h3: 1.375rem;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --transition-ui: 150ms;
  --transition-slider: 200ms;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--surface-main);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button {
  cursor: pointer;
}

p {
  margin: 0 0 16px;
}

h1, h2, h3 {
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

h1, .hero-title {
  font-size: var(--h1);
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: var(--h3);
  font-weight: 600;
  line-height: 1.3;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

:target {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.container {
  width: min(var(--content-width), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.container > *, .split > *, .card-grid > *, .header-row > * {
  min-width: 0;
}

.section {
  padding-block: var(--section-space);
}

.section-alt {
  background: var(--surface-alt);
}

.section-heading {
  margin-block-end: var(--heading-gap);
}

.section-heading p {
  max-width: 55ch;
  color: var(--text-secondary);
  margin: 0;
}

.section-heading :where(h2:only-child) {
  margin: 0;
}

.split {
  display: grid;
  gap: 24px;
}

.reading-content {
  max-width: var(--reading-width);
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: #fff;
  color: var(--text-primary);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  gap: 8px;
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius);
  background: var(--brand-primary);
  color: var(--text-inverse);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color var(--transition-ui) ease-out, border-color var(--transition-ui) ease-out;
}

.button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.button-inverse {
  background: transparent;
  border-color: #fff;
}

.button-inverse:hover {
  background: #fff;
  color: var(--text-primary);
  border-color: #fff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.site-header {
  position: relative;
  z-index: 40;
  min-height: var(--header-height);
  background: #fff;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 144px;
  flex-shrink: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.utility-link:hover {
  text-decoration: underline;
}

.desktop-navigation, .header-rfq {
  display: none;
}

.site-search {
  position: absolute;
  top: var(--header-offset, var(--header-height));
  inset-inline: 0;
  z-index: 45;
  padding-block: 24px;
  background: #fff;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-control);
}

.search-form label {
  display: block;
  margin-block-end: 8px;
  font-weight: 600;
}

.search-fields {
  display: grid;
  gap: 12px;
}

.search-fields input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-primary);
}

.navigation-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(400px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 24px;
  border: 0;
  background: #fff;
  color: var(--text-primary);
  overflow-y: auto;
}

.navigation-drawer::backdrop {
  background: rgb(0 0 1 / 65%);
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 24px;
}

.drawer-heading h2 {
  font-size: 1.375rem;
}

.navigation-drawer nav {
  display: grid;
  gap: 8px;
}

.drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-block: 12px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.drawer-link:hover {
  text-decoration: underline;
}

.drawer-open {
  overflow: hidden;
}

.navigation-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 16px;
}

.navigation-fallback a {
  min-width: 44px;
  min-height: 44px;
}

.hero {
  position: relative;
  background: var(--surface-dark);
  color: #fff;
  padding-block-end: 24px;
}

.hero-slides {
  display: grid;
}

.hero-slide {
  display: grid;
  grid-area: 1 / 1;
}

.hero-slide[hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}

.hero-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #252627;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-note {
  position: absolute;
  right: 24px;
  bottom: 16px;
  padding: 4px 8px;
  color: var(--text-inverse-secondary);
  background: var(--surface-dark);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hero-copy {
  padding-block: 24px;
}

.hero-copy h1, .hero-copy .hero-title {
  max-width: 32ch;
}

.eyebrow {
  margin-block-end: 16px;
  font-weight: 600;
}

.hero-lead {
  max-width: 55ch;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-inverse-secondary);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block-start: 24px;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 16px;
}

.slider-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #fff;
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}

.slider-button:hover {
  background: #fff;
  color: var(--text-primary);
}

.slide-position[aria-current] {
  background: #fff;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.slide-status {
  font-size: 0.875rem;
  margin-inline-start: 4px;
}

.has-entered {
  animation: slide-fade var(--transition-slider) ease-out;
}

.has-entered .hero-copy {
  animation: text-enter var(--transition-slider) ease-out;
}

@keyframes slide-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes text-enter {
  from {
    transform: translateY(4px);
  }

  to {
    transform: translateY(0);
  }
}

.card-grid {
  display: grid;
  gap: var(--grid-gap);
}

.brand-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
}

.card {
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: #fff;
  overflow-wrap: anywhere;
}

.card:hover, .card:focus-within {
  border-color: var(--text-primary);
}

.card h3 {
  margin-block: 16px 0;
  font-size: 1.25rem;
}

.card-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.card:hover .card-link, .card:focus-within .card-link {
  text-decoration: underline;
}

.brand-card {
  padding: 16px;
}

.brand-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 3 / 2;
  background: var(--surface-alt);
  color: var(--text-secondary);
  text-align: center;
  padding: 8px;
  font-size: 0.875rem;
}

.component-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--surface-alt);
}

.guide-panel {
  padding: 24px;
  background: var(--surface-warm);
  border-radius: var(--radius);
}

.guide-grid {
  display: grid;
  gap: 24px;
  margin: 0 0 24px;
  padding-inline-start: 24px;
}

.guide-grid li {
  padding-inline-start: 4px;
  min-width: 0;
}

.guide-grid h3 {
  margin-block-end: 12px;
}

.guide-grid p {
  margin: 0;
  color: var(--text-secondary);
}

.guide-panel > .button {
  width: 100%;
}

.capability-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.capability {
  padding-block-start: 16px;
  border-top: 1px solid var(--border-control);
}

.capability h3 {
  margin: 0;
}

.about-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--surface-alt);
}

.about-layout p {
  color: var(--text-secondary);
}

.news-empty {
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: #fff;
}

.news-empty p {
  margin: 0;
  color: var(--text-secondary);
}

.heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.heading-row h2 {
  margin: 0;
}

.news-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-block-end: 16px;
}

.news-card time {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.news-card p {
  margin-block: 16px 0;
  color: var(--text-secondary);
}

.rfq-band {
  background: var(--surface-dark);
  color: #fff;
  padding-block: 48px;
}

.rfq-band p {
  color: var(--text-inverse-secondary);
  margin: 0;
}

.rfq-layout .button {
  width: 100%;
}

.site-footer {
  padding-block: 48px 0;
  background: var(--surface-dark);
  color: var(--text-inverse-secondary);
  border-top: 1px solid var(--border-control);
  overflow-wrap: anywhere;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

.site-footer .wordmark {
  color: #fff;
  margin-block-end: 16px;
}

.footer-title {
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.3;
}

.site-footer nav {
  display: grid;
  gap: 8px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-link:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border-control);
  margin-block-start: 48px;
  padding-block: 24px;
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
}

@media (width >= 640px) {
  :root {
    --gutter: 32px;
    --section-space: 64px;
    --grid-gap: 24px;
    --heading-gap: 32px;
    --h1: 2.5rem;
    --h2: 2rem;
    --h3: 1.5rem;
  }

  .brand-grid, .category-grid, .news-grid, .footer-grid, .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-fields {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hero {
    padding: 0;
  }

  .hero-slide {
    position: relative;
    min-height: 480px;
    align-items: center;
  }

  .hero-image {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(31 32 33 / 80%), rgb(31 32 33 / 60%));
  }

  .hero-copy {
    position: relative;
    padding-block: 64px 120px;
  }

  .hero-copy h1, .hero-copy .hero-title {
    max-width: 26ch;
  }

  .hero-actions {
    flex-flow: row wrap;
  }

  .hero-controls {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    justify-content: flex-end;
    margin-block-start: 0;
  }

  .image-note {
    z-index: 1;
    bottom: 88px;
  }

  .guide-panel {
    padding: 32px;
  }

  .guide-panel > .button {
    width: auto;
  }
}

@media (width >= 1024px) {
  :root {
    --gutter: 40px;
    --section-space: 80px;
    --h1: 3rem;
    --h2: 2.25rem;
  }

  .hero-slide {
    min-height: 560px;
  }

  .hero-copy {
    padding-block-start: 120px;
  }

  .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    align-items: center;
  }

  .rfq-band {
    padding-block: 64px;
  }

  .rfq-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
  }

  .rfq-layout .button {
    width: auto;
  }

  .site-footer {
    padding-block-start: 64px;
  }
}

@media (width >= 1200px) {
  .capability-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  :root {
    --header-height: 88px;
  }

  .site-header {
    position: sticky;
    top: 0;
    transition: background-color var(--transition-ui) ease-out, color var(--transition-ui) ease-out;
  }

  .site-header-home {
    margin-block-end: calc(-1 * (var(--header-height) + 1px));
    background: transparent;
    color: #fff;
    border-color: transparent;
  }

  .site-header-home.is-scrolled {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-subtle);
  }

  .header-row {
    gap: 16px;
    flex-wrap: nowrap;
  }

  .wordmark {
    max-width: 176px;
  }

  .desktop-navigation {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 16px;
  }

  .desktop-navigation a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
  }

  .desktop-navigation a:hover {
    text-decoration: underline;
  }

  .header-rfq {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .site-search {
    position: fixed;
  }

  .needs-compact .desktop-navigation, .needs-compact .header-rfq {
    display: none;
  }

  .needs-compact .menu-toggle {
    display: inline-flex;
  }

  .needs-compact .header-row {
    flex-wrap: wrap;
  }

  .site-header.needs-compact {
    position: relative;
    margin-block-end: 0;
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border-subtle);
  }

  .brand-grid, .category-grid, .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Reserve the control row before enhancement to avoid a late layout shift. */

.hero-controls[hidden] {
  display: flex !important;
  visibility: hidden;
}

@media (width >= 1200px) {
  body:has(.navigation-fallback) .site-header-home {
    margin-block-end: 0;
    background: var(--surface-dark);
    color: var(--text-inverse);
  }
}

/* Category and date fallback archives show identity and bounded article summaries. */

.archive-listing .archive-heading {
  padding-block: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.archive-listing .archive-heading h1 {
  margin-block: 0 12px;
}

.archive-listing .archive-eyebrow {
  margin: 0 0 10px;
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-listing .archive-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.archive-listing .archive-context p {
  margin: 0;
  color: var(--text-secondary);
}

.archive-listing .archive-context a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-primary);
  font-weight: 700;
}

.archive-listing article {
  padding-block: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.archive-listing article h2 {
  margin-bottom: 12px;
}

.archive-listing .archive-result-summary {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (width < 600px) {
  .archive-listing .archive-context {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Bounded search text only; keep long words and titles inside the existing layout. */

.search-listing .search-result {
  min-width: 0;
  max-width: 100%;
}

.search-listing .search-result h2 {
  overflow-wrap: anywhere;
}

.search-listing .search-result-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.6;
  max-height: 4.8em;
  overflow: hidden;
  overflow-wrap: anywhere;
}
