@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --black: #000000;
  --white: #ffffff;
  --offwhite: #f5f5f0;
  --border: 3px solid #000;
  --shadow: 5px 5px 0px #000;
  --shadow-sm: 3px 3px 0px #000;
  --radius-card: 18px;
  --radius-pill: 999px;
  --nav-h: 64px;
  --sidebar-w: 180px;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: 'Raleway', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body.nb-body {
  background: var(--offwhite);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- 点阵底纹 ---- */
.dot-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, #00000018 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ===== NAVIGATION ===== */
.nav-details {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-top: var(--border);
  box-shadow: 0 -4px 0 var(--black);
}

.nav-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: var(--nav-h);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.nav-summary::-webkit-details-marker { display: none; }

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: var(--border);
  border-radius: 8px;
}

.brand-icon-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--blue);
  border: var(--border);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

.nav-toggle-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  display: none;
}

.nav-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 260px;
  border: var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.nav-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: transparent;
  min-width: 0;
}

.nav-search button {
  border: none;
  background: var(--blue);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1rem;
  border-left: 2px solid var(--black);
  min-height: 40px;
}

.nav-hamburger {
  font-size: 1.4rem;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  list-style: none;
  border-top: 2px solid var(--black);
  background: var(--white);
}

.nav-details:not([open]) .nav-menu {
  display: none;
}

.nav-pill {
  display: inline-block;
  padding: 8px 18px;
  background: var(--blue);
  border: 2px solid var(--black);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--black);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-pill:hover {
  background: var(--red);
  color: var(--white);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--black);
}

/* ===== PAGE LAYOUT ===== */
.page-wrap {
  display: flex;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 20px);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 24px 0 24px 16px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-inner {
  background: var(--white);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px 12px;
}

.sidebar-eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
  border-bottom: 2px solid var(--black);
  padding-bottom: 6px;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: block;
  padding: 6px 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  border-radius: 6px;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidebar-link:hover {
  background: var(--blue);
  border-color: var(--black);
  box-shadow: 2px 2px 0 var(--black);
}

/* ===== CONTENT COLUMN ===== */
.content-col {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
}

/* ===== HERO ===== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-height: 45vh;
  padding: 40px 0 32px;
  border-bottom: var(--border);
  margin-bottom: 40px;
  position: relative;
}

.hero-text {
  text-align: right;
  max-width: 600px;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.hero-h1 {
  font-family: var(--font-ui);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--black);
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: var(--blue);
  color: var(--black);
  border: var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 48px;
}

.btn-primary:hover {
  background: var(--red);
  color: var(--white);
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--black);
}

.hero-media {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45%;
  max-height: 42vh;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 860px;
}

.content-section {
  margin-bottom: 60px;
}

.content-article {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 32px 36px;
}

/* ===== CONTENT ARTICLE INNER STYLES ===== */
.content-article h2 {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--black);
  color: var(--black);
}

.content-article h2:first-child {
  margin-top: 0;
}

.content-article h3 {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--black);
}

.content-article p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.75;
}

.content-article ul,
.content-article ol {
  margin: 12px 0 16px 24px;
}

.content-article li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.content-article a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.content-article a:hover {
  color: var(--red);
}

.content-article section {
  scroll-margin-top: calc(var(--nav-h) + 16px);
  padding: 20px 0;
  border-bottom: 2px dashed #ccc;
}

.content-article section:last-child {
  border-bottom: none;
}

.content-article blockquote {
  border-left: 5px solid var(--blue);
  background: #e8f6ff;
  padding: 14px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.content-article strong {
  font-weight: 700;
}

.content-article code {
  font-family: 'Courier New', monospace;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid #ccc;
}

.content-article pre {
  background: var(--black);
  color: var(--white);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: var(--border);
  box-shadow: var(--shadow-sm);
}

/* section scroll offset for fixed bottom nav */
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* ===== SMALL EYEBROW (契约要求 small + h2 同级) ===== */
small + h2,
small + h3 {
  margin-top: 4px;
}

small.eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--black);
  color: var(--white);
  border-top: 4px solid var(--blue);
  padding: 48px 24px 80px;
  margin-bottom: var(--nav-h);
}

.footer-brand-row {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 2px solid #333;
  padding-bottom: 28px;
}

.footer-brand-big {
  font-family: var(--font-ui);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue);
  text-shadow: 5px 5px 0 var(--red);
  line-height: 1;
}

.footer-cols {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  justify-content: center;
}

.footer-dl {
  flex: 1;
  min-width: 160px;
  max-width: 260px;
}

.footer-dl dt {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  border-bottom: 2px solid #333;
  padding-bottom: 6px;
}

.footer-dl dd {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #ccc;
  line-height: 1.5;
}

.footer-dl dd a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.15s;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-dl dd a:hover {
  color: var(--blue);
}

.footer-bottom {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: #777;
  border-top: 1px solid #333;
  padding-top: 20px;
}

/* ===== SCROLL REVEAL ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
  .content-article section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .content-article section.visible {
    opacity: 1;
    transform: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .page-wrap {
    flex-direction: column;
  }

  .content-col {
    padding: 0 12px;
  }

  .hero-section {
    align-items: flex-start;
    min-height: auto;
    padding: 28px 0 24px;
  }

  .hero-text {
    text-align: left;
    max-width: 100%;
  }

  .hero-desc {
    margin-left: 0;
  }

  .hero-media {
    position: relative;
    width: 100%;
    max-height: 200px;
    margin-top: 20px;
  }

  .content-article {
    padding: 20px 18px;
  }

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

  .footer-dl {
    max-width: 100%;
  }

  .nav-toggle-label {
    display: block;
  }

  .nav-search {
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    font-size: 1.6rem;
  }

  .nav-search {
    max-width: 130px;
  }

  .content-article {
    border-radius: 10px;
    padding: 16px 14px;
  }

  .footer-brand-big {
    font-size: 2.2rem;
  }
}

/* ===== PARALLAX SUBTLE ===== */
@media (prefers-reduced-motion: no-preference) {
  .dot-bg {
    animation: dotPan 30s linear infinite;
  }

  @keyframes dotPan {
    from { background-position: 0 0; }
    to   { background-position: 200px 200px; }
  }
}

/* ===== NEUBRUTALISM EXTRAS ===== */
::selection {
  background: var(--blue);
  color: var(--black);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
