/* ============================================================
   Su Chuang International LLC — Global Stylesheet
   Aesthetic: technical / blueprint-industrial
   Palette (5): ink navy, paper, steel gray, amber accent, line
   Fonts: self-hosted Inter (sans) + JetBrains Mono — fully local
   ============================================================ */

/* Self-hosted Latin web fonts — no external CDN. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-700.woff2") format("woff2");
}

:root {
  --ink: #0f2130;          /* deep navy — dark sections, headings */
  --ink-2: #16324a;        /* secondary navy */
  --paper: #f4f3ee;        /* warm off-white background */
  --paper-2: #ffffff;      /* card surface */
  --steel: #51606b;        /* muted body text */
  --accent: #d8862a;       /* amber engineering accent */
  --accent-deep: #b96a15;
  --line: rgba(15, 33, 48, 0.14);
  --line-light: rgba(244, 243, 238, 0.16);

  --font-sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Consolas",
    "Liberation Mono", Menlo, monospace;

  --wrap: 1180px;
  --radius: 2px;
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Utility: technical label ---------- */
.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.accent {
  color: var(--accent);
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 33, 48, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-light);
  color: var(--paper);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-name span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 0.86rem;
  color: rgba(244, 243, 238, 0.78);
  border-radius: var(--radius);
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover {
  color: var(--paper);
  background: rgba(216, 134, 42, 0.14);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-light);
  color: var(--paper);
  width: 42px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line-light);
    padding: 8px 16px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open {
    max-height: 460px;
  }
  .nav-links a {
    padding: 12px 8px;
    border-bottom: 1px solid var(--line-light);
  }
}

/* ============================================================
   Section scaffolding
   ============================================================ */
.section {
  padding: 88px 0;
}

.section.tight {
  padding: 64px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 52px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

.section-head p {
  color: var(--steel);
  margin-top: 16px;
  font-size: 1.05rem;
}

.dark {
  background: var(--ink);
  color: var(--paper);
}

.dark .section-head p,
.dark .lead {
  color: rgba(244, 243, 238, 0.72);
}

/* ============================================================
   Page hero (chapter pages)
   ============================================================ */
.page-hero {
  background: var(--ink);
  color: var(--paper);
  padding: 76px 0 64px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.5;
  pointer-events: none;
}

.page-hero .wrap {
  position: relative;
  z-index: 1;
}

.page-hero .chapter-no {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-top: 8px;
}

.page-hero .lead {
  max-width: 640px;
  margin-top: 20px;
  color: rgba(244, 243, 238, 0.78);
  font-size: 1.1rem;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 243, 238, 0.55);
  margin-bottom: 28px;
}

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

/* ============================================================
   Grids & cards
   ============================================================ */
.grid {
  display: grid;
  gap: 24px;
}

.g-2 {
  grid-template-columns: repeat(2, 1fr);
}
.g-3 {
  grid-template-columns: repeat(3, 1fr);
}
.g-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .g-3,
  .g-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .g-2,
  .g-3,
  .g-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(15, 33, 48, 0.4);
}

.card .idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-deep);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--steel);
  font-size: 0.96rem;
}

.dark .card {
  background: var(--ink-2);
  border-color: var(--line-light);
  color: var(--paper);
}

.dark .card p {
  color: rgba(244, 243, 238, 0.7);
}

/* ---------- Stat blocks ---------- */
.stat-row {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 720px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  background: var(--paper-2);
  padding: 30px 24px;
}

.dark .stat-row {
  background: var(--line-light);
  border-color: var(--line-light);
}
.dark .stat {
  background: var(--ink);
}

.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat .label {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--steel);
}

.dark .stat .label {
  color: rgba(244, 243, 238, 0.66);
}

/* ---------- Feature list with images ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split.reverse .split-media {
  order: 2;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .split.reverse .split-media {
    order: 0;
  }
}

.split-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.split h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 16px;
}

.split p {
  color: var(--steel);
  font-size: 1.02rem;
  margin-bottom: 14px;
}

.dark .split p {
  color: rgba(244, 243, 238, 0.72);
}

/* ---------- Bulleted / checklist ---------- */
.ticklist {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.ticklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  color: var(--steel);
}

.dark .ticklist li {
  color: rgba(244, 243, 238, 0.78);
}

.ticklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

/* ---------- Process / timeline table ---------- */
.phase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.phase-table th,
.phase-table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.phase-table th {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent-deep);
}

.phase-table td:first-child {
  font-weight: 700;
  width: 34%;
}

.phase-table td:last-child {
  color: var(--steel);
}

/* ---------- Chip / tag ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--steel);
}

.dark .chip {
  border-color: var(--line-light);
  color: rgba(244, 243, 238, 0.72);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  padding: 14px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-light);
  color: var(--paper);
}

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

.btn-dark {
  border-color: var(--line);
  color: var(--ink);
}

.btn-dark:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ============================================================
   Home hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  color: var(--paper);
  overflow: hidden;
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(15, 33, 48, 0.94) 30%,
    rgba(15, 33, 48, 0.5) 100%
  );
  z-index: 1;
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  max-width: 16ch;
}

.hero .lead {
  max-width: 560px;
  margin-top: 24px;
  font-size: 1.16rem;
  color: rgba(244, 243, 238, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line-light);
}

.hero-meta .num {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-meta .label {
  font-size: 0.82rem;
  color: rgba(244, 243, 238, 0.68);
}

/* ---------- Chapter index cards (home) ---------- */
.chapter-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.22s ease, border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.chapter-link:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 22px 48px -28px rgba(15, 33, 48, 0.45);
}

.chapter-link .no {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--line);
  transition: color 0.22s ease;
}

.chapter-link:hover .no {
  color: var(--accent);
}

.chapter-link h3 {
  font-size: 1.3rem;
  margin: 14px 0 8px;
}

.chapter-link p {
  color: var(--steel);
  font-size: 0.92rem;
}

.chapter-link .go {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* ---------- Media band ---------- */
.media-band {
  position: relative;
  color: var(--paper);
  padding: 120px 0;
  overflow: hidden;
  background: var(--ink);
}

.media-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
}

.media-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(15, 33, 48, 0.9),
    rgba(15, 33, 48, 0.55)
  );
  z-index: 1;
}

.media-band .wrap {
  position: relative;
  z-index: 2;
}

.media-band h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  max-width: 18ch;
}

.media-band p {
  max-width: 560px;
  margin-top: 18px;
  color: rgba(244, 243, 238, 0.8);
  font-size: 1.08rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(244, 243, 238, 0.72);
  padding: 64px 0 32px;
  border-top: 3px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

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

.footer-grid h4 {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

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

.footer-brand p {
  font-size: 0.94rem;
  margin-top: 14px;
  max-width: 34ch;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 243, 238, 0.5);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- misc helpers ---------- */
.lead {
  font-size: 1.1rem;
  color: var(--steel);
}
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.max-720 { max-width: 720px; }
.mx-auto { margin-left: auto; margin-right: auto; }
