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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

main {
  display: block;
}

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

h1, h2, h3, h4, h5, h6, figure, p {
  margin: 0;
}

ul[class], ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--orange);
  color: var(--ink);
}

:root {
  --teal: #0A3D3F;
  --teal-light: #0F5C5F;
  --teal-lighter: #177A7E;
  --orange: #FF6B35;
  --orange-pale: #FF9C6B;
  --gray: #2D2D2D;
  --gray-deep: #232323;
  --off-white: #F2F0EC;
  --text-light: #E5E8E8;
  --text-muted: #9AB5B6;
  --ink: #071F20;
  --line: rgba(242, 240, 236, .12);
  --font-display: "DIN Condensed", "Roboto Condensed", "Arial Narrow", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  --header-w: 272px;
  --header-mobile-h: 64px;
  --header-mobile-total: calc(var(--header-mobile-h) + 36px);
  --ease: cubic-bezier(.25, .1, .25, 1);
  --dur: .15s;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  background-color: var(--gray);
  color: var(--text-light);
  min-height: 100vh;
  padding-top: var(--header-mobile-total);
}

#main-content {
  scroll-margin-top: 112px;
}

@media (min-width: 1024px) {
  body {
    padding-top: 0;
    padding-left: var(--header-w);
  }

  #main-content {
    scroll-margin-top: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .01em;
}

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  display: inline-block;
  padding: 10px 18px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}

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

/* ============ SCROLL PROGRESS ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 260;
  pointer-events: none;
  will-change: transform;
}

@media (min-width: 1024px) {
  .scroll-progress {
    left: var(--header-w);
  }
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 240;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease), transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--orange-pale);
}

/* ============ HEADER BASE ============ */
.site-header {
  z-index: 200;
}

.site-header__rail {
  position: relative;
  background-color: var(--teal);
  background-image:
    linear-gradient(rgba(242, 240, 236, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 236, .045) 1px, transparent 1px);
  background-size: 28px 28px;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-brand__logomark {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  padding: 5px 6px;
  color: var(--ink);
  background: var(--orange);
  box-shadow: 2px 2px 0 rgba(255, 107, 53, .28);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.site-brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242, 240, 236, .18);
}

.nav-toggle__bar {
  width: 20px;
  height: 2px;
  background: var(--text-light);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.site-header[data-open="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--orange);
}

.site-header[data-open="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-header[data-open="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--orange);
}

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

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.site-nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--orange);
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease);
}

.site-nav__link:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(15, 92, 95, .55), rgba(15, 92, 95, 0) 80%);
}

.site-nav__link:hover::before {
  height: 100%;
}

.site-nav__link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 107, 53, .28), rgba(255, 107, 53, 0) 70%);
}

.site-nav__link[aria-current="page"]::before {
  height: 100%;
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--orange);
  min-width: 2ch;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: rgba(7, 31, 32, .55);
  border: 1px solid rgba(242, 240, 236, .1);
  padding: 9px 14px 9px 12px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.status-strip__dot, .badge-live {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: var(--orange);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, .16);
}

.status-strip__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ MOBILE HEADER ============ */
@media (max-width: 1023.98px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--teal);
    border-bottom: 2px solid var(--orange);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  }

  .site-header__rail {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    min-height: var(--header-mobile-total);
  }

  .site-header__top {
    width: 100%;
    height: var(--header-mobile-h);
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
  }

  .site-brand__name {
    font-size: 22px;
  }

  .site-brand__sub {
    font-size: 9px;
  }

  .site-brand__logomark {
    font-size: 11px;
    padding: 4px 5px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    order: 3;
    width: 100%;
    max-height: 0;
    overflow-y: hidden;
    transition: max-height .25s var(--ease);
  }

  .site-header[data-open="true"] .site-nav {
    max-height: calc(100vh - var(--header-mobile-total));
    max-height: calc(100dvh - var(--header-mobile-total));
    overflow-y: auto;
    background: rgba(7, 31, 32, .35);
    border-top: 1px solid var(--line);
  }

  .site-nav__link {
    padding: 15px 20px;
    font-size: 16px;
    border-bottom: 1px solid rgba(242, 240, 236, .07);
  }

  .site-nav__item:last-child .site-nav__link {
    border-bottom: 0;
  }

  .status-strip {
    order: 2;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 8px 16px;
    min-height: 36px;
    clip-path: none;
  }
}

/* ============ DESKTOP HEADER ============ */
@media (min-width: 1024px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--header-w);
    border-right: 2px solid var(--orange);
    box-shadow: 8px 0 24px rgba(0, 0, 0, .22);
  }

  .site-header__rail {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .site-header__top {
    padding: 30px 22px 16px;
  }

  .site-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 0 20px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
  }

  .status-strip {
    margin: 0 20px 22px;
  }

  .site-header__rail::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 44px;
    height: 4px;
    background: var(--orange);
  }
}

/* ============ FOOTER ============ */
.site-footer {
  position: relative;
  background-color: var(--ink);
  color: var(--text-muted);
  background-image:
    linear-gradient(rgba(242, 240, 236, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 236, .035) 1px, transparent 1px);
  background-size: 28px 28px;
}

.footer-data-line {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 10px, transparent 10px 20px, var(--teal-light) 20px 28px, transparent 28px 42px);
}

.site-footer__core {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 72px) clamp(20px, 4vw, 40px) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .9fr 1.15fr;
  gap: clamp(32px, 5vw, 56px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.05;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

.footer-brand__about {
  font-size: 14px;
  line-height: 1.8;
  max-width: 38em;
}

.footer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-head::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--orange);
}

.footer-links__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 18px;
}

.footer-links__link {
  position: relative;
  display: inline-block;
  padding: 3px 0 3px 14px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
}

.footer-links__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--teal-light);
  transform: translateY(-50%);
  transition: background-color var(--dur) var(--ease);
}

.footer-links__link:hover {
  color: var(--orange);
}

.footer-links__link:hover::before {
  background: var(--orange);
}

.footer-contact {
  display: flex;
  flex-direction: column;
}

.footer-contact__row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-contact__row::before {
  content: "//";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 44px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-bottom__copy {
  margin: 0;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-legal__link {
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
}

.footer-legal__link:hover {
  color: var(--orange);
}

.footer-bottom__icp {
  margin: 0 0 0 auto;
  color: var(--text-muted);
}

.footer-note {
  margin-top: 14px;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(242, 240, 236, .12);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(154, 181, 182, .75);
}

@media (max-width: 1023.98px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-links__list {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom__icp {
    margin-left: 0;
  }
}

/* ============ LAYOUT UTILITIES ============ */
.jn-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.jn-section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.jn-section--teal {
  background: var(--teal);
}

.jn-section--light {
  background: var(--off-white);
  color: var(--ink);
}

.jn-section--light h1, .jn-section--light h2, .jn-section--light h3, .jn-section--light h4 {
  color: var(--ink);
}

.jn-section--light .jn-index {
  color: var(--teal-light);
}

.jn-section--ink {
  background: var(--ink);
}

.jn-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.jn-section__title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0;
}

.jn-section__note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.jn-section--light .jn-section__note {
  color: var(--teal-light);
}

.jn-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--orange);
}

.jn-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text-light);
  background: var(--teal);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.jn-tag--orange {
  background: var(--orange);
  color: var(--ink);
}

.jn-data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.badge-live {
  display: inline-block;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.btn--primary:hover {
  background: var(--orange-pale);
}

.btn--ghost {
  border-color: rgba(242, 240, 236, .3);
  background: transparent;
  color: var(--text-light);
}

.btn--ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ============ BREADCRUMBS ============ */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  margin-right: 10px;
  color: rgba(154, 181, 182, .55);
}

.breadcrumbs__link {
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
}

.breadcrumbs__link:hover {
  color: var(--orange);
}

.breadcrumbs__item[aria-current="page"] {
  color: var(--text-light);
}

/* ============ PAGE TITLE ============ */
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: inherit;
  margin: 0 0 .4em;
}

.page-title__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

/* ============ GRID & IMAGE ============ */
.panel-grid {
  background-image:
    linear-gradient(rgba(154, 181, 182, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 181, 182, .14) 1px, transparent 1px);
  background-size: 32px 32px;
}

.panel-grid--soft {
  background-image:
    linear-gradient(rgba(242, 240, 236, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 236, .05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--teal);
  color: var(--text-muted);
}

.img-frame::after {
  content: "IMAGE";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--text-muted);
}

.img-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.img-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame--portrait {
  aspect-ratio: 3 / 4;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
