:root {
  color-scheme: dark;
  --bg: #0b0c0d;
  --bg-soft: #121416;
  --panel: #17191c;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f4f1ea;
  --muted: #b8b2a8;
  --quiet: #827d76;
  --red: #e14242;
  --red-dark: #9d2529;
  --silver: #d6d0c5;
  --brass: #b6935f;
  --ink: #050607;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --max: 1180px;
  font-family:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

body.editor-open {
  overflow: hidden;
}

html:not(.admin-mode) .edit-toggle,
html:not(.admin-mode) .editor-shell,
html:not(.admin-mode) .editor-backdrop {
  display: none !important;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

figure {
  margin: 0;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 10, 0.76);
  backdrop-filter: blur(20px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  background: rgba(225, 66, 66, 0.12);
  color: var(--red);
  font-weight: 800;
  line-height: 1;
}

.brand-text {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 34px);
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.icon-button,
.editor-panel button,
.editor-actions button,
.import-label {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  min-height: 40px;
  padding: 0 14px;
}

.icon-button:hover,
.editor-panel button:hover,
.editor-actions button:hover,
.import-label:hover {
  border-color: rgba(225, 66, 66, 0.7);
  background: rgba(225, 66, 66, 0.14);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  padding: 120px clamp(18px, 5vw, 72px) 72px;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.9) 0%, rgba(5, 6, 7, 0.58) 44%, rgba(5, 6, 7, 0.2) 100%),
    linear-gradient(0deg, rgba(5, 6, 7, 0.96) 0%, rgba(5, 6, 7, 0.28) 38%, rgba(5, 6, 7, 0.68) 100%);
  content: "";
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 28vh;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 12, 13, 0) 100%);
  content: "";
}

.hero-inner {
  width: min(820px, 100%);
}

.kicker {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 16px 0 20px;
  font-size: clamp(48px, 9vw, 118px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--silver);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 18px;
  color: var(--text);
}

.button-link.primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.button-link:hover {
  transform: translateY(-1px);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(780px, 100%);
  margin-top: 50px;
  border: 1px solid var(--line);
  background: var(--line);
}

.meta-item {
  min-height: 78px;
  padding: 18px;
  background: rgba(11, 12, 13, 0.7);
}

.meta-item span {
  display: block;
  color: var(--quiet);
  font-size: 12px;
  text-transform: uppercase;
}

.meta-item strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
}

.section {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(72px, 10vw, 124px) clamp(18px, 5vw, 72px);
}

.section[data-selected="true"] {
  outline: 1px solid rgba(225, 66, 66, 0.7);
  outline-offset: -6px;
}

.section-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.section.split .section-inner,
.section.media-left .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
}

.section.media-left .section-copy {
  order: 2;
}

.section.media-left .section-media {
  order: 1;
}

.section.statement {
  background: var(--bg-soft);
}

.section.statement .section-inner {
  width: min(940px, 100%);
}

.section.grid .section-copy {
  max-width: 780px;
  margin-bottom: 38px;
}

.section h2 {
  margin: 14px 0 18px;
  font-size: clamp(32px, 5vw, 66px);
  line-height: 1.03;
  letter-spacing: 0;
}

.section-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.82;
  white-space: pre-wrap;
}

.point-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.point-list li {
  position: relative;
  padding: 0 0 0 22px;
  color: var(--silver);
  line-height: 1.6;
}

.point-list li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--red);
  content: "";
}

.section-media {
  display: grid;
  gap: 16px;
}

.media-frame {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.media-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  color: var(--silver);
  font-size: 13px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.media-grid .media-frame {
  min-height: 260px;
}

.team-list,
.contact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--line);
}

.team-member,
.contact-item {
  min-height: 160px;
  padding: 24px;
  background: var(--bg-soft);
}

.team-member h3,
.contact-item h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.team-member p,
.contact-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(18px, 5vw, 72px);
  color: var(--quiet);
  font-size: 14px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.editor-shell {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--line-strong);
  background: #111315;
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

body.editor-open .editor-shell {
  transform: translateX(0);
}

.editor-backdrop {
  position: fixed;
  z-index: 45;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.48);
}

body.editor-open .editor-backdrop {
  display: block;
}

.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.editor-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.editor-tab {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.editor-tab.active {
  background: rgba(225, 66, 66, 0.16);
  color: var(--text);
}

.editor-panel {
  display: none;
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.editor-panel.active {
  display: block;
}

.editor-panel label,
.import-label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.editor-panel input,
.editor-panel textarea,
.editor-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0c0d0f;
  color: var(--text);
  padding: 11px 12px;
}

.editor-panel textarea {
  resize: vertical;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  margin-bottom: 14px;
}

.media-editor-list {
  display: grid;
  gap: 10px;
}

.media-editor-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.media-editor-thumb {
  width: 64px;
  height: 44px;
  overflow: hidden;
  border-radius: 4px;
  background: #050607;
}

.media-editor-thumb img,
.media-editor-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-editor-title {
  min-width: 0;
  color: var(--silver);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-note {
  margin: 18px 0 0;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.6;
}

.server-status {
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.server-status[data-status="ok"] {
  border-color: rgba(88, 190, 112, 0.55);
  color: #a8e8b6;
}

.server-status[data-status="error"] {
  border-color: rgba(225, 66, 66, 0.65);
  color: #ffb0b0;
}

.server-status[data-status="working"] {
  border-color: rgba(182, 147, 95, 0.75);
  color: #f0d19a;
}

.empty-media {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--quiet);
}

[data-editable="true"] {
  cursor: pointer;
}

body.editor-open [data-editable="true"]:hover {
  outline: 1px solid rgba(225, 66, 66, 0.7);
  outline-offset: 5px;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .section.split .section-inner,
  .section.media-left .section-inner {
    grid-template-columns: 1fr;
  }

  .section.media-left .section-copy,
  .section.media-left .section-media {
    order: initial;
  }

  .media-grid,
  .team-list,
  .contact-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 88vh;
    padding-top: 110px;
  }

  .hero h1 {
    font-size: clamp(42px, 16vw, 72px);
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
  }

  .brand-text {
    display: none;
  }
}
