/* Northview Production site layout. Brand tokens and shared components live in
   design-system/tokens.css and design-system/components.css. */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  min-width: 320px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: var(--nv-cyan);
  color: var(--nv-black);
  font-weight: 600;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
  box-shadow: var(--focus);
}

.site-header {
  position: relative;
  z-index: 2;
  background: var(--nv-black);
  border-bottom: 1px solid var(--nv-line);
}

.site-header__inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.site-header .brand img,
.site-footer .brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  font-family: var(--ff-cond);
  font-size: var(--fs-nav);
  font-weight: 700;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--nv-text-2);
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--nv-cyan);
  border-color: var(--nv-cyan);
}

.hero {
  overflow: hidden;
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: clamp(64px, 8vw, 112px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__title {
  max-width: 9ch;
  margin-top: var(--s2);
  font-size: clamp(54px, 7vw, 88px);
  line-height: 0.98;
}

.hero__copy {
  max-width: 48ch;
  margin-top: var(--s2);
  font-size: 19px;
}

.hero__content .btn {
  margin-top: var(--s4);
}

.hero__photo {
  aspect-ratio: 1.22 / 1;
  margin: 0;
  border: 1px solid var(--nv-line);
}

.hero__photo img {
  object-position: 50% 53%;
}

.hero__photo-label {
  position: absolute;
  left: 30px;
  bottom: 30px;
  z-index: 1;
  color: var(--nv-text);
  font-family: var(--ff-cond);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-heading {
  max-width: 680px;
  margin-bottom: var(--s4);
}

.section-heading h2 {
  margin-top: var(--s1);
}

.section-heading > p:last-child {
  margin-top: var(--s1);
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s2);
}

.system-card {
  min-height: 216px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--s2);
  overflow: hidden;
  background: var(--nv-surface);
  border-radius: var(--radius-card);
  border-bottom: 8px solid var(--nv-raised);
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}

.system-card:hover,
.system-card:focus-visible {
  background: #222731;
  border-bottom-color: var(--nv-cyan);
  transform: translateY(-4px);
}

.system-card__number,
.system-section__number {
  color: var(--nv-text-3);
  font-family: var(--ff-cond);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.system-card__name {
  margin-top: auto;
  color: var(--nv-text);
  font-family: var(--ff-cond);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.system-card__detail {
  margin-top: 8px;
  color: var(--nv-text-2);
  font-size: var(--fs-small);
}

.system-card__arrow {
  position: absolute;
  top: var(--s2);
  right: var(--s2);
  color: var(--nv-cyan);
  font-size: 22px;
  line-height: 1;
  transition: transform var(--ease);
}

.system-card:hover .system-card__arrow,
.system-card:focus-visible .system-card__arrow {
  transform: translate(3px, -3px);
}

.system-section {
  scroll-margin-top: 24px;
}

.system-section__heading {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--nv-line);
}

.system-section__number {
  padding-top: 6px;
  color: var(--nv-cyan);
}

.system-section__heading h2 {
  margin-top: 6px;
}

.system-details {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  align-items: start;
  gap: var(--s2);
  margin-top: var(--s2);
}

.system-details__gear,
.system-details__budget {
  min-height: 156px;
  padding: var(--s2);
  background: var(--nv-surface);
  border-radius: var(--radius-card);
  border-bottom: 4px solid var(--nv-raised);
}

.system-details__gear h3 {
  font-size: 26px;
}

.system-details__budget {
  border-bottom-color: var(--nv-cyan);
}

.placeholder {
  margin-top: var(--s2);
  color: var(--nv-text-3);
}

.gear-list {
  margin: var(--s1) 0 0;
  padding: 0;
  list-style: none;
}

.gear-item {
  padding: var(--s1) 0;
  border-top: 1px solid var(--nv-line);
}

.gear-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.gear-item__name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 9px;
  max-width: none;
  color: var(--nv-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.gear-item__name a,
.gear-item__resource {
  color: var(--nv-cyan);
  text-decoration-line: underline;
  text-decoration-color: rgb(83 218 236 / 45%);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--ease), text-decoration-color var(--ease);
}

.gear-item__name a:hover,
.gear-item__resource:hover,
.gear-item__name a:focus-visible,
.gear-item__resource:focus-visible {
  color: var(--nv-text);
  text-decoration-color: currentColor;
}

.gear-item__link-mark {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.8em;
  text-decoration: none;
}

.gear-item__meta {
  max-width: none;
  margin-top: 5px;
  color: var(--nv-text-3);
  font-size: var(--fs-small);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.gear-item__resource {
  font-weight: 600;
}

.gear-item__quantity {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 8px;
  color: var(--nv-cyan);
  background: rgb(83 218 236 / 10%);
  border: 1px solid rgb(83 218 236 / 35%);
  border-radius: var(--radius);
  font-family: var(--ff-cond);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.gear-note {
  max-width: none;
  margin-top: var(--s2);
  padding: 12px 14px;
  color: var(--nv-text-2);
  background: var(--nv-ink);
  border-left: 3px solid var(--nv-cyan);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: var(--fs-small);
}

.led-raster {
  margin: var(--s2) 0 var(--s3);
  padding: var(--s2);
  overflow: hidden;
  background: var(--nv-surface);
  border-radius: var(--radius-card);
  border-bottom: 4px solid var(--nv-raised);
}

.led-raster__scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nv-line) transparent;
}

.led-raster__scroll:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.led-raster__scroll img {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
}

.led-raster__caption {
  margin-top: 12px;
  color: var(--nv-text-3);
  font-size: 14px;
}

.led-raster__table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  color: var(--nv-text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: left;
}

.led-raster__table .led-raster__wall-column { width: 27%; }
.led-raster__table .led-raster__grid-column { width: 36%; }
.led-raster__table .led-raster__resolution-column { width: 37%; }

.led-raster__table th,
.led-raster__table td {
  padding: 8px 6px;
  border-top: 1px solid var(--nv-line);
}

.led-raster__table thead th {
  color: var(--nv-text-3);
  font-family: var(--ff-cond);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.led-raster__table tbody th,
.led-raster__table tfoot th {
  color: var(--nv-text);
  font-weight: 600;
}

.led-raster__table tfoot th,
.led-raster__table tfoot td {
  border-top: 1px solid var(--nv-cyan);
  color: var(--nv-cyan);
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.system-details__budget .placeholder {
  color: var(--nv-text-2);
  font-family: var(--ff-cond);
  font-size: 20px;
  font-weight: 600;
}

.site-footer {
  padding: var(--s3) 0;
  background: var(--nv-ink);
  border-top: 1px solid var(--nv-line);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.site-footer__top {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nv-text-2);
  font-family: var(--ff-cond);
  font-weight: 700;
}

.site-footer__top span {
  color: var(--nv-cyan);
  font-size: 20px;
}

.not-found {
  min-height: min(720px, calc(100vh - 192px));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.not-found__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: var(--s8) 0;
}

.not-found h1 {
  margin-top: var(--s1);
  font-size: clamp(56px, 9vw, 96px);
}

.not-found__copy {
  margin-top: var(--s2);
  font-size: 19px;
}

.not-found .btn {
  margin-top: var(--s4);
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: var(--s3);
  }

  .hero__title {
    font-size: clamp(50px, 7vw, 68px);
  }

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

@media (max-width: 760px) {
  html {
    scroll-padding-top: 16px;
  }

  .site-header__inner {
    min-height: 0;
    display: block;
    padding-top: 16px;
    padding-bottom: 0;
  }

  .site-header .brand {
    width: max-content;
    min-height: 44px;
  }

  .site-nav {
    margin: 8px calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter);
    gap: 26px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .site-nav a {
    flex: 0 0 auto;
    font-size: 19px;
  }

  .hero {
    padding-top: var(--s6);
    padding-bottom: var(--s6);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }

  .hero__title {
    max-width: 11ch;
    font-size: var(--fs-h1);
  }

  .hero__copy {
    font-size: 17px;
  }

  .hero__content .btn {
    margin-top: var(--s3);
  }

  .hero__photo {
    aspect-ratio: 1.35 / 1;
  }

  .system-card {
    min-height: 190px;
    padding: 18px;
  }

  .system-card__name {
    font-size: 30px;
  }

  .system-card__detail {
    max-width: 13ch;
  }

  .system-details {
    grid-template-columns: 1fr;
  }

  .system-details__gear,
  .system-details__budget {
    min-height: 0;
  }

  .system-details__budget .placeholder {
    margin-top: var(--s1);
  }
}

@media (max-width: 420px) {
  .led-raster {
    padding: 12px;
  }

  .led-raster__caption {
    font-size: 13px;
  }

  .led-raster__table {
    font-size: 12px;
  }

  .led-raster__table th,
  .led-raster__table td {
    padding: 8px 3px;
  }

  .led-raster__table thead th {
    font-size: 11px;
    letter-spacing: 0;
  }

  .brand__word {
    font-size: 23px;
  }

  .system-grid {
    gap: 12px;
  }

  .system-card {
    min-height: 176px;
    padding: 16px;
  }

  .system-card__arrow {
    top: 16px;
    right: 16px;
  }

  .system-card__detail {
    font-size: 14px;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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