:root {
  --navy: #1e407c;
  --navy-deep: #001e44;
  --navy-soft: #2b5194;
  --red: #c8102e;
  --red-soft: #e2374f;
  --paper: #f7f8fa;
  --white: #ffffff;
  --ink: #12213a;  --muted: #5a6b85;  --muted-light: #9fb0c9;  --radius: 18px;
  --max-width: 1480px;
}

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

html { scroll-behavior: smooth; }

body {
  position: relative;
  font-family: "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1e407c;
  border-bottom: 3px solid var(--red);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  color: var(--white);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;

  margin-left: 246px;
}

.brand span { color: var(--red-soft); }

.site-nav {
  display: flex;
  gap: 8px;

  margin-right: -86px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 50px;
}

.site-nav a.active {
  color: var(--white);
  background: var(--red);
}

.hero {
  --hero-box: 1420px;
  --hero-gap: 76px;
  background: var(--white);
  color: var(--ink);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero-fade {
  height: 96px;
  background: #e9eff6;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(0, 12fr);
  gap: var(--hero-gap);
  align-items: center;
  max-width: var(--hero-box);
  margin-left: auto;
  margin-right: auto;
}

.hero-text {
  position: relative;
  z-index: 1;
  grid-column: 2 / -1;
  width: 100%;
  left: 70px;
}

.hero-photo {
  position: relative;

  width: 114%;
  margin-left: max(-30px, min(0px, (1420px - 100vw) / 2));

  aspect-ratio: 1100 / 795;
  align-self: center;
  z-index: 0;
  pointer-events: none;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% center;
  filter: saturate(0.95);
}

.hero-photo .photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  color: rgba(18, 33, 58, 0.35);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.hero-text .eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-text h1 {
  font-size: clamp(42px, 6.2vw, 62px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-text h1 em { font-style: normal; color: var(--red); }

.hero-text p.tagline {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19.5px;
  max-width: none;
  text-align: justify;
  hyphens: auto;
}

.hero-text .text-box {

  width: min(582px, calc(50vw - 58px));
  margin-top: 24px;
  margin-left: 0;
  margin-right: max(-70px, calc((min(100vw, var(--hero-box)) - 100vw) / 2 - 24px));
  background: none;
}

.hero-text .text-box p {
  margin: 14px 0 0;
  color: #26374f;
  font-size: 20px;
  line-height: 1.75;
  text-align: justify;
  text-justify: inter-word;
}

.hero-text .text-box p:first-child {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.6;
}

.hero-text .text-box .tagline {
  max-width: none;
  text-align: justify;
  hyphens: auto;
}

.projects {
  padding: 88px 0 96px;
  background: var(--white);
  position: relative;
  z-index: 0;
  overflow-x: clip;
}

.section-head { margin-bottom: 24px; }

.section-head .kicker {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 800;
  margin-top: 8px;
}

.project-row {
  position: relative;
  padding: 40px 36px 44px;
  border-radius: 18px;
  border: 1px solid #d8dde8;
  background: var(--white);
  scroll-margin-top: 96px;
}

.project-row + .project-row {
  margin-top: 202px;
}

.project-row + .project-row::before {
  content: "";
  position: absolute;
  top: -102px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 2px;
  background: var(--red);
}

.project-row:nth-of-type(even) { background: #eef2f9; }

.project-row:nth-of-type(even)::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -102px;
  bottom: -102px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: #eef2f9;
}

.row-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e407c;
  margin-bottom: 44px;
}

.row-more { flex: 0 0 auto; margin-bottom: 4px; }

.row-title {
  font-size: clamp(32px, 3.8vw, 42px);
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1.2;
  margin-top: 6px;
}

.row-title .num { color: var(--red); }

.row-subs { margin-top: 16px; }

.sub-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 65px 0;
}

.sub-item + .sub-item { border-top: 1px solid #1e407c; }

.see-more.is-clickable { cursor: pointer; }

.row-subs .sub-item:nth-child(odd) .sub-media { order: -1; }

.sub-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.sub-gallery {
  position: absolute;
  inset: 0;
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-align: center;
}

.gallery-slide .slide-label {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.gallery-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-slide img.is-missing { visibility: hidden; }

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.gallery-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.gallery-dots button.active {
  background: var(--red-soft);
  width: 16px;
  border-radius: 50px;
}

.sub-body h4 {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 800;
  color: var(--navy-deep);
  margin-bottom: 12px;
  line-height: 1.3;
}

.sub-body p {
  font-size: 18.5px;
  color: var(--muted);
  margin-bottom: 20px;
  text-align: justify;
}

.sub-feature .sub-body h4 {
  font-size: clamp(30px, 3.4vw, 38px);
  margin-bottom: 14px;
}

.sub-feature .sub-body p {
  font-size: 21.5px;
  line-height: 1.8;
}

.page-hero {
  background: var(--white);
  color: var(--ink);
  padding: 88px 0 88px;
  text-align: center;
  border-bottom: 1px solid rgba(30, 64, 124, 0.10);
}

.page-hero .kicker {
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.page-hero h1 {
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 12px auto 0;
  max-width: 980px;
}

.stat {
  background: #eef2fa;
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 16px 22px;
  min-width: 180px;
}

.stat b {
  display: block;
  font-size: 23px;
  color: var(--navy-deep);
  line-height: 1.3;
}

.stat span { font-size: 14px; color: var(--muted); }

.site-footer {
  background: var(--navy-deep);
  color: var(--muted-light);
  padding: 48px 0;
  border-top: 4px solid var(--red);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.site-footer .brand { font-size: 17px; }

.site-footer a { color: var(--white); }

.footer-note { font-size: 14px; }

.back-top {
  position: fixed;

  right: max(28px, calc(50% - var(--max-width) / 2 + 24px - 160px));
  bottom: 28px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.side-rail {
  --rail-line: rgba(30, 64, 124, 0.7);
  --rail-ghost: rgba(30, 64, 124, 0.32);
  --rail-accent: rgba(200, 16, 46, 0.55);
  position: absolute;
  top: 0;
  height: 0;
  width: min(200px, calc(50vw - 780px));
  display: none;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.side-rail { --rail-col: 740px; }
body.cx .side-rail { --rail-col: 580px; }

.side-rail-left {
  left: clamp(4px, calc(50% - var(--rail-col) - 92px), 100px);
}
.side-rail-right {
  right: clamp(4px, calc(50% - var(--rail-col) - 92px), 100px);
}

.side-rail .rail-inner {
  position: sticky;
  top: 140px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.side-rail-right .rail-inner {
  left: auto;
  right: 18px;
  align-items: flex-end;
}

.side-rail .rail-hair {
  width: 92px;
  height: 1px;
  background: var(--rail-line);
  opacity: 0.6;
}

.side-rail .rail-hair-accent { background: var(--rail-accent); opacity: 0.9; }

.side-rail .rail-chip {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--rail-line);
  opacity: 0.85;
}

.side-rail-left .rail-chip { transform: rotate(180deg); }

.side-rail .rail-chip-dim { opacity: 0.5; letter-spacing: 0.44em; }

.side-rail .rail-dot {
  width: 8px;
  height: 8px;
  background: var(--rail-accent);
  opacity: 0.9;
}

.side-rail .rail-mark {
  writing-mode: vertical-rl;
  font-size: clamp(28px, 4vh, 54px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--rail-ghost);
}

.side-rail-left .rail-mark { transform: rotate(180deg); }

.side-rail .rail-index {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 62px;
  margin-top: 2px;
}

.side-rail .rail-index a {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 17px;
  pointer-events: auto;
}

.side-rail .rail-i-num {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  color: rgba(30, 64, 124, 0.72);
  transition: color 0.2s ease;
}

.side-rail .rail-i-rule {
  width: 46px;
  height: 6px;
  border-top: 3px solid rgba(30, 64, 124, 0.28);
  border-radius: 3px;
  transition: width 0.2s ease, border-top-color 0.2s ease;
}

.side-rail .rail-index a:hover .rail-i-num { color: var(--navy); }
.side-rail .rail-index a:hover .rail-i-rule { border-top-color: rgba(30, 64, 124, 0.55); }

.side-rail .rail-index a.is-on .rail-i-num { color: var(--red); }
.side-rail .rail-index a.is-on .rail-i-rule {
  width: 64px;
  border-top-width: 6px;
  border-top-color: var(--red);
}

@media (min-width: 1700px) {
  .side-rail { display: block; }
}

@media (min-width: 1968px) {
  .side-rail .rail-inner { gap: 22px; }
  .side-rail .rail-hair { width: 116px; }
  .side-rail .rail-chip { font-size: 13px; }
  .side-rail .rail-dot { width: 10px; height: 10px; }
  .side-rail .rail-mark { -webkit-text-stroke-width: 2px; }

  .side-rail .rail-index { gap: 66px; }
  .side-rail .rail-index a { gap: 18px; }
  .side-rail .rail-i-num { font-size: 30px; }
  .side-rail .rail-i-rule { width: 48px; }
  .side-rail .rail-index a.is-on .rail-i-rule { width: 66px; }
}

@media (max-width: 720px) {
  .back-top { right: 16px; bottom: 16px; width: 40px; height: 40px; font-size: 18px; }
}

@media (max-width: 860px) {
  .row-subs { margin-top: 8px; }
  .sub-item { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .sub-media { order: -1; }
  .project-row { padding: 32px 24px 36px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-text { grid-column: auto; margin-left: 0; width: 100%; }
  .hero-text .text-box { width: auto; margin-left: 0; margin-right: 0; }

  .hero-photo {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.08;
    max-width: 340px;
    min-height: 280px;
    margin: 0 auto;
    pointer-events: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-footer .container { flex-direction: column; text-align: center; }
}

body.home .site-header { border-bottom: 0; }

body.home .site-nav a { position: relative; }

body.home .site-nav a.active {
  color: var(--white);
  background: transparent;
}
body.home .site-nav a.active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  height: 3px;
  background: var(--red);
}

body.home .row-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--navy-deep);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

body.home .row-more .arw,
body.home .see-more .arw {
  display: inline-block;
  transition: transform 0.22s ease;
}

body.home .row-more:hover,
body.home .row-more:focus-visible {
  background: var(--red);
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.22);
}

body.home .row-more:hover .arw,
body.home .row-more:focus-visible .arw,
body.home .see-more:hover .arw,
body.home .see-more:focus-visible .arw { transform: translateX(4px); }

body.home .see-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

body.home .see-more:hover,
body.home .see-more:focus-visible {
  background: #a60d26;
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.20);
}

@media (max-width: 860px) {
  body.home .row-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.footer-version { font-size: 12px; opacity: 0.6; }

@media (max-width: 667px) {
  .footer-right { align-items: center; }
}

body.home .row-subs .sub-item .sub-media { width: 90%; justify-self: center; }
body.home .row-subs .sub-item .sub-body { zoom: 0.9; }
