/* =========================================================
   Editorial Mill — 杂志叙事 · Soft Editorial
   保留章节版式，棱角/描边/投影改为柔和
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&family=Libre+Bodoni:ital,wght@0,500;0,600;0,700;1,500&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@500;600;700&family=Public+Sans:wght@400;500;600;700&display=swap");

:root {
  --ink: #1c1917;
  --paper: #f7f5f2;
  --white: #ffffff;
  --muted: #78716c;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --accent: #d97706;
  --accent-soft: #fff7ed;
  --accent-ink: #1c1917;
  --band-dark: #292524;
  --font-display: "Libre Bodoni", "Noto Serif SC", "Songti SC", serif;
  --font-body: "Public Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --border: 1px solid var(--line);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-hard: 0 12px 32px rgba(28, 25, 23, 0.08);
  --shadow-soft: 0 4px 16px rgba(28, 25, 23, 0.05);
  --header-h: 68px;
  --ease: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

/* ===== Masthead ===== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: var(--border);
}

.masthead__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav li.active > a {
  background: var(--accent-soft);
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: background var(--ease), transform var(--ease);
}

.header-cta:hover {
  background: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hard);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-invert {
  background: var(--ink);
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ===== Cover hero (magazine) ===== */
.cover {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  padding: 24px;
  border-bottom: var(--border);
  background: var(--paper);
}

.cover__visual {
  position: relative;
  min-height: 420px;
  border: 0;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  background:
    linear-gradient(180deg, rgba(28, 25, 23, 0.12), rgba(28, 25, 23, 0.48)),
    url("../img/intro-bg.jpg") center / cover no-repeat;
}

.cover__visual::after {
  content: "COVER / 01";
  position: absolute;
  left: 20px;
  bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(28, 25, 23, 0.72);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
}

.cover__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
  background: var(--white);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-soft);
  border: var(--border);
}

.cover__kicker {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cover__brand {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.cover h1 {
  margin: 0 0 18px;
  max-width: 10em;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
}

.cover__lead {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: 1.05rem;
  color: var(--muted);
}

.cover.plain .cover__lead,
.cover.plain .actions {
  display: none;
}

/* alias for main.js sailor logic */
.hero.plain .hero__lead,
.hero.plain .actions,
.cover.plain .cover__lead,
.cover.plain .actions {
  display: none !important;
}

/* ===== Chapters ===== */
.chapter {
  border-bottom: var(--border);
  padding: clamp(48px, 8vw, 88px) 0;
}

.chapter--ink {
  background: var(--band-dark);
  color: #fff;
}

.chapter--ink h2,
.chapter--ink h3,
.chapter--ink .chapter__title,
.chapter--ink strong {
  color: #fff;
}

.chapter--ink p,
.chapter--ink .chapter__lead {
  color: #a1a1aa;
}

.chapter--accent {
  background: var(--accent);
}

.chapter--accent p,
.chapter--accent .chapter__lead {
  color: #3f3f46;
}

.chapter__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.chapter--ink .chapter__meta {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.chapter__no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter__title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 12em;
}

.chapter__lead {
  margin: 0 0 36px;
  max-width: 40em;
  font-size: 1.1rem;
}

/* Editorial feature columns — not soft cards */
.ed-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  border: 0;
}

.ed-cols article {
  padding: 26px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ed-cols article:nth-child(2n) {
  border-right: var(--border);
}

.chapter--ink .ed-cols article {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.ed-cols .idx {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.ed-cols h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.ed-cols p {
  margin: 0;
}

/* Manifesto split */
.manifesto {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  border: 0;
  background: transparent;
}

.manifesto__text {
  padding: clamp(24px, 4vw, 36px);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.chapter--ink .manifesto__text {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.manifesto__media {
  min-height: 320px;
  background: #ddd center / cover no-repeat;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
}

.manifesto__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
  filter: grayscale(0.15) contrast(1.02);
}

.pullquote {
  margin: 24px 0;
  padding: 18px 0 18px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
}

.chapter--ink .pullquote {
  background: rgba(217, 119, 6, 0.12);
  color: #fff;
}

.checklist {
  margin-top: 20px;
  display: grid;
  gap: 10px;
  border: 0;
}

.checklist li {
  padding: 14px 16px;
  border: var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  background: var(--white);
}

.checklist li:last-child {
  border-bottom: var(--border);
}

.checklist li::before {
  content: "● ";
  color: var(--accent);
}

/* Service ledger */
.ledger {
  border: 0;
  background: transparent;
  display: grid;
  gap: 10px;
}

.ledger__row {
  display: grid;
  grid-template-columns: 72px 180px 1fr;
  gap: 16px;
  padding: 18px 20px;
  border: var(--border);
  border-radius: var(--radius-sm);
  align-items: start;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ledger__row:last-child {
  border-bottom: var(--border);
}

.ledger__row:nth-child(odd) {
  background: var(--accent-soft);
}

.ledger__num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.ledger strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding-top: 2px;
}

.ledger p {
  margin: 0;
  padding-top: 4px;
}

/* Portfolio strip */
.folio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  border: 0;
}

.folio a {
  display: block;
  position: relative;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.folio a:nth-child(3n) {
  border-right: 0;
}

.folio img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(0.25);
  transition: filter 240ms ease, transform 320ms ease;
}

.folio a:hover img {
  filter: none;
  transform: scale(1.03);
}

.folio span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.82), transparent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Highlight manifesto list */
.strike-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  border: 0;
}

.strike-list div {
  padding: 22px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.strike-list div:nth-child(3n) {
  border-right: var(--border);
}

.strike-list strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.strike-list p {
  margin: 0;
  font-size: 0.95rem;
}

/* Contact composition */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
  border: 0;
}

.contact-card {
  margin: 0;
  padding: 28px;
  background: var(--band-dark);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.contact-card dt {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-card dt:first-child {
  margin-top: 0;
}

.contact-card dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  font-weight: 600;
}

.form-panel {
  padding: 28px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: box-shadow var(--ease), border-color var(--ease), background var(--ease);
}

.field input:focus,
.field textarea:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
}

/* Page top for inner pages */
.page-cover {
  padding: clamp(48px, 8vw, 88px) 0;
  border-bottom: var(--border);
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}

.page-cover__meta {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-cover h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 6vw, 4rem);
  max-width: 12em;
}

.page-cover p {
  margin: 0;
  max-width: 38em;
  font-size: 1.08rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #a1a1aa;
  padding: 40px 0 28px;
  border-top: var(--border);
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  background: transparent;
  color: var(--accent);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 10px;
}

.site-footer h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
}

.site-footer__beian {
  padding-top: 18px;
  border-top: 1px solid #3f3f46;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .header-cta:hover {
    transform: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .cover,
  .manifesto,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cover {
    padding: 16px;
    gap: 16px;
  }

  .cover__visual {
    border-right: 0;
    border-bottom: 0;
    min-height: 280px;
  }

  .manifesto__text {
    border-right: 0;
    border-bottom: 0;
  }

  .contact-card {
    border-right: 0;
    border-bottom: 0;
  }

  .ed-cols,
  .strike-list,
  .folio,
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .ledger__row {
    grid-template-columns: 56px 1fr;
  }

  .ledger__row p {
    grid-column: 2;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .masthead__inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: var(--border);
    padding: 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    border-left: 0;
    border-radius: var(--radius-sm);
    min-height: 48px;
  }

  .header-cta {
    display: none;
  }

  .ed-cols,
  .strike-list,
  .folio,
  .form-row,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .ed-cols article,
  .strike-list div,
  .folio a {
    border-right: 0;
  }
}

/* Checkout & payment demo (Alipay audit) */
.demo-banner {
  padding: 10px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  color: #9a3412;
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.checkout-panel,
.pay-panel {
  padding: 28px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.checkout-panel h2,
.pay-panel h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.order-table th,
.order-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.order-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.order-table td:last-child,
.order-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.checkout-summary {
  display: grid;
  gap: 10px;
}

.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.98rem;
}

.checkout-summary__row--total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  font-size: 1.15rem;
  font-weight: 700;
}

.checkout-summary__row--total span:last-child {
  color: var(--accent);
}

.pay-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.pay-meta__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.pay-meta__row strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-meta__row span:last-child {
  font-weight: 600;
  text-align: right;
}

.pay-amount {
  margin: 8px 0 24px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.btn-alipay {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #1677ff;
  color: #fff;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}

.btn-alipay:hover {
  background: #0958d9;
}

.btn-alipay:active {
  transform: translateY(1px);
}

.pay-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}
