/* 海南矩阵互动 — 浅色几何矩阵 / Bento 资讯 */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #f3f8f6;
  --surface: #ffffff;
  --ink: #0b1f1c;
  --muted: #4a635e;
  --line: #c9ddd7;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --teal-soft: #e6f5f2;
  --cta: #0c4a45;
  --danger: #b42318;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Outfit", "Noto Sans SC", sans-serif;
  --body: "Work Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1120px;
  --z-nav: 40;
  --z-toast: 80;
  --z-pay: 90;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background:
    linear-gradient(rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    radial-gradient(900px 420px at 90% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button, .btn, a.cell, .plan-cell, .clickable { cursor: pointer; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Floating top nav ---------- */
.topbar {
  position: sticky;
  top: 14px;
  z-index: var(--z-nav);
  margin: 14px auto 0;
  width: min(var(--max), calc(100% - 28px));
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
  margin-bottom: 4px;
}
.brand-mark i {
  width: 8px;
  height: 8px;
  background: var(--teal);
  display: block;
}
.brand-mark i:nth-child(2) { background: var(--teal-bright); opacity: 0.7; }
.brand-mark i:nth-child(3) { background: var(--teal-bright); opacity: 0.7; }
.brand-mark i:nth-child(4) { background: var(--cta); }

.brand-zh {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-en {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  padding: 8px 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover,
.nav a.active {
  color: var(--ink);
  background: var(--teal-soft);
}

.user-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.vip-badge {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-size: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--cta);
  background: var(--cta);
  color: #fff;
  font-size: 14px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--teal); border-color: var(--teal); }
.btn:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 3px; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--teal); }
.btn-teal { background: var(--teal); border-color: var(--teal); }
.btn-teal:hover { background: #0d9488; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 48px 0 36px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.2vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.hero p {
  margin-top: 14px;
  max-width: 42ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-panel {
  background: var(--ink);
  color: #e8f5f2;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
}
.hero-panel .label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 245, 242, 0.55);
}
.hero-panel strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal-bright);
}
.hero-panel p { color: rgba(232, 245, 242, 0.72); font-size: 14px; }

/* ---------- Bento news ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 36px 0 16px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
}
.section-head p { font-size: 13px; color: var(--muted); }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-bottom: 48px;
}

.cell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 180px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.cell:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.cell.wide { grid-column: span 2; }
.cell .idx {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--teal);
}
.cell h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
}
.cell .excerpt {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}
.cell .meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.lock-hint { color: var(--teal); font-size: 11px; letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  background: rgba(255, 255, 255, 0.55);
}
.footer-brand {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.footer-contact { font-size: 13px; color: var(--muted); }
.footer-contact li { margin-bottom: 6px; }
.footer-contact a:hover { color: var(--teal); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0 10px;
  font-size: 13px;
}
.footer-links a:hover { color: var(--teal); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ---------- Inner pages ---------- */
.page-kicker {
  padding-top: 36px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
}
.page-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 10px;
}
.page-desc { color: var(--muted); max-width: 52ch; }

/* Article */
.article-shell { padding: 28px 0 56px; max-width: 720px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}
.article-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 22px;
}
.article-content p { margin-bottom: 16px; }
.article-preview { position: relative; }
.fade-mask {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.lock-panel {
  margin-top: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.lock-panel h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.lock-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Recharge matrix */
.plan-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}
.plan-cell {
  text-align: left;
  padding: 22px 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.plan-cell.is-selected {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.plan-cell .name {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 8px;
}
.plan-cell .price {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.plan-cell .price span { font-size: 0.85rem; font-weight: 500; }
.plan-cell .desc { margin-top: 10px; font-size: 13px; color: var(--muted); }

.confirm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
}
.form-footer { margin: 14px 0 40px; font-size: 13px; color: var(--muted); }
.form-footer a { color: var(--teal); text-decoration: underline; }

/* Auth */
.auth-card {
  max-width: 420px;
  margin: 28px 0 48px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.auth-card h1 {
  font-family: var(--display);
  font-size: 1.8rem;
  margin: 6px 0 8px;
}
.hint { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  color: var(--muted);
}
.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 10px 12px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-msg { display: none; margin-top: 12px; font-size: 13px; }
.form-msg.show { display: block; }
.form-msg.ok { color: var(--teal); }
.form-msg.err { color: var(--danger); }

/* Contact matrix */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0 36px;
}
.contact-cell {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.contact-cell dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-cell dd { font-size: 15px; }
.contact-cell a:hover { color: var(--teal); }
.contact-form {
  max-width: 520px;
  padding-bottom: 40px;
}
.contact-form h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 14px;
}

/* Pay dialog */
.pay-mask {
  position: fixed;
  inset: 0;
  z-index: var(--z-pay);
  background: rgba(11, 31, 28, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pay-mask[hidden] { display: none !important; }
.pay-dialog {
  width: min(400px, 100%);
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
}
.pay-dialog h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.pay-summary { font-size: 16px; margin-bottom: 8px; }
.pay-hint { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.pay-actions { display: flex; gap: 10px; justify-content: flex-end; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: var(--z-toast);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .hero,
  .bento,
  .plan-matrix,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .cell.wide { grid-column: auto; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    margin-left: 0;
  }
  .nav.open { display: flex; }
  .user-chip { width: 100%; }
  .brand-zh { white-space: normal; }
}
