/* Park — 数字公共物品商店 / Digital Public Goods Store
   Design Philosophy:
   Isometric Line-Art Engineering & Botanical Commons
   Inspired by Hairline (lucasmarkes) & Minimalist Precision UIs */

@font-face {
  font-family: 'BlexMono Nerd Font';
  src: url('fonts/BlexMonoNerdFontMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'BlexMono Nerd Font';
  src: url('fonts/BlexMonoNerdFontMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #f8f7f2;
  --bg-pattern: rgba(22, 36, 27, 0.04);
  --card: #ffffff;
  --card-hover: #ffffff;
  --card-border: #e3ded2;
  --card-border-hover: #b8b09d;
  --ink: #142017;
  --muted: #495e51;
  --faint: #7a9182;
  --line: #e4ded0;
  --line-strong: #c2baa5;
  --accent: #c85a32;
  --accent-d: #a84520;
  --accent-soft: rgba(200, 90, 50, 0.08);
  --green: #1c6843;
  --green-glow: #2db36e;
  --green-soft: rgba(28, 104, 67, 0.08);
  --gold: #b37f14;
  --gold-soft: rgba(179, 127, 20, 0.08);
  --header-bg: rgba(248, 247, 242, 0.88);
  --banner-border: rgba(28, 104, 67, 0.18);
  --banner-bg: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(244,241,232,0.7));
  --mono: 'BlexMono Nerd Font', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-main: 'Inter', 'Noto Sans Thai', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 23, 0.04);
  --shadow: 0 2px 8px rgba(20, 32, 23, 0.04), 0 16px 36px rgba(20, 32, 23, 0.05);
  --shadow-float: 0 24px 52px rgba(20, 32, 23, 0.09);
  --transition: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #090e0b;
  --bg-pattern: rgba(45, 179, 110, 0.04);
  --card: #101913;
  --card-hover: #15221a;
  --card-border: #1a2b20;
  --card-border-hover: #2e4a38;
  --ink: #eaf5ee;
  --muted: #9bb0a2;
  --faint: #597364;
  --line: #17261d;
  --line-strong: #274030;
  --accent: #e5764d;
  --accent-d: #f38a64;
  --accent-soft: rgba(229, 118, 77, 0.12);
  --green: #34af72;
  --green-glow: #48d98d;
  --green-soft: rgba(52, 175, 114, 0.12);
  --gold: #e2a62b;
  --gold-soft: rgba(226, 166, 43, 0.12);
  --header-bg: rgba(9, 14, 11, 0.88);
  --banner-border: rgba(52, 175, 114, 0.28);
  --banner-bg: linear-gradient(135deg, rgba(16, 25, 19, 0.95), rgba(11, 18, 14, 0.85));
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 20px 48px rgba(0, 0, 0, 0.55);
  --shadow-float: 0 28px 64px rgba(0, 0, 0, 0.75);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(var(--bg-pattern) 1px, transparent 1px);
  background-size: 24px 24px;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-d);
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.mono {
  font-family: var(--mono);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition), border-color var(--transition);
}

.hrow {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 66px;
}

.logo {
  font-weight: 800;
  font-size: 18.5px;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  flex-shrink: 0;
}
.logo b {
  color: var(--accent);
  font-weight: 800;
}
.logo:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  margin-left: 14px;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
  transition: color var(--transition);
}
.nav a:hover,
.nav a.on {
  color: var(--ink);
  font-weight: 600;
}
.nav a.on::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.spacer {
  flex: 1;
}

/* Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lang-picker {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 10px 3px 8px;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.lang-picker:hover {
  border-color: var(--line-strong);
}
.lang-select {
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.lang-select option {
  background: var(--card);
  color: var(--ink);
}

.theme-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-pill);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.theme-btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.theme-btn:active {
  transform: scale(0.92);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.badge.on {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.badge.on .dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 179, 110, 0.25);
}

/* ========================================================
   Hero Banner & Hairline Isometric Cover
   ======================================================== */
.hero-banner-container {
  margin-top: 32px;
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--banner-border);
  background: var(--banner-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 440px;
  transition: all var(--transition);
}

.banner-left {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.banner-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-left: 1px solid var(--banner-border);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .banner-right {
  background: rgba(0, 0, 0, 0.25);
}

/* 线条化背景插画与网格 */
.banner-lineart {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity var(--transition);
}
[data-theme="light"] .banner-lineart {
  background-image: url('hero-wireframe-light.png');
}
[data-theme="dark"] .banner-lineart {
  background-image: url('hero-wireframe-dark.png');
  opacity: 0.45;
}

/* Hairline 动态交互容器 */
.hairline-mount {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.hairline-mount svg {
  width: 90% !important;
  height: 90% !important;
  max-width: 440px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.15));
}
[data-theme="dark"] .hairline-mount svg {
  filter: drop-shadow(0 12px 36px rgba(52, 175, 114, 0.2));
}

.banner-specs {
  position: absolute;
  bottom: 14px;
  right: 18px;
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 4;
  user-select: none;
}
.banner-specs span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.banner-specs span::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

/* Typography in Banner */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(200, 90, 50, 0.2);
  width: fit-content;
}

h1 {
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin: 18px 0 0;
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: 16px;
  color: var(--muted);
  max-width: 620px;
  margin-top: 16px;
  line-height: 1.68;
}

.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.note {
  font-size: 13px;
  color: var(--muted);
}
.note s {
  color: var(--faint);
  margin-right: 5px;
}

/* Buttons */
.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 20px;
  border-radius: 11px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  color: var(--ink);
}
.btn:active {
  transform: scale(0.98);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(200, 90, 50, 0.28);
}
.btn.primary:hover {
  background: var(--accent-d);
  border-color: var(--accent-d);
  color: #ffffff;
}
.btn.ghost {
  background: transparent;
  box-shadow: none;
}
.btn.sm {
  padding: 6px 13px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* Member Card */
.membercard {
  margin-top: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.sbt {
  width: 140px;
  height: 88px;
  border-radius: 12px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #153222, #215939);
  color: #ffffff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(28, 104, 67, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.35s ease;
}
.sbt.locked {
  background: linear-gradient(135deg, #2b3830, #3c4c42);
  color: #9ab0a2;
  box-shadow: none;
}
[data-theme="light"] .sbt.locked {
  background: linear-gradient(135deg, #e3ded2, #cfc8ba);
  color: #6b6456;
}
.sbt .t {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.sbt .id {
  font-family: var(--mono);
  font-size: 9px;
  opacity: 0.85;
}
.membermeta {
  flex: 1;
  min-width: 220px;
}
.membermeta h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.membermeta p {
  font-size: 13.5px;
  color: var(--muted);
}

/* Sections */
section {
  padding: 50px 0;
  border-top: 1px solid var(--line);
  transition: border-color var(--transition);
}
.shead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: -0.025em;
  font-weight: 800;
}
.sdesc {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 24px;
  max-width: 740px;
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(28, 104, 67, 0.2);
}
.pill.warn {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: rgba(179, 127, 20, 0.2);
}
.pill.lock {
  background: rgba(122, 145, 130, 0.12);
  color: var(--muted);
  border-color: var(--line);
}

/* Goods Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2.5px;
  background: linear-gradient(180deg, var(--accent), var(--green));
  opacity: 0.75;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow);
}
.card .ico {
  font-size: 26px;
  line-height: 1;
}
.card h4 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  line-height: 1.55;
}
.meta {
  display: flex;
  gap: 9px;
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
  flex-wrap: wrap;
}
.cardfoot {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 3px;
  flex-wrap: wrap;
}
.lockmsg {
  font-size: 11.5px;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(179, 127, 20, 0.15);
}
.tagline {
  font-size: 11.5px;
  color: var(--faint);
  font-family: var(--mono);
}

/* Service Lanes */
.lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.lane {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.lane.hi {
  border-color: var(--green);
  background: linear-gradient(180deg, var(--green-soft), var(--card));
}
.lane .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.lane h4 {
  font-size: 17px;
  margin: 8px 0 6px;
}
.free {
  color: var(--green);
  font-weight: 700;
}
.paid {
  color: var(--gold);
  font-weight: 700;
}
.lane ul {
  list-style: none;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.lane li::before {
  content: '→';
  color: var(--accent);
  margin-right: 8px;
  font-weight: 700;
}

/* Tables */
.tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 13.5px;
}
th, td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  background: var(--bg);
  font-weight: 600;
}
tr:last-child td {
  border-bottom: none;
}
td.m {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* Forms */
.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.frow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
input, select {
  font: inherit;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  min-width: 180px;
  max-width: 100%;
  font-size: 13.5px;
  transition: all var(--transition);
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="password"] {
  font-family: var(--mono);
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* Seats */
.seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
}
.seat {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 16px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--muted);
}
.seat.used {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--ink);
}
.seat b {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 3px;
}
.seat .key {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* Prose */
.prose {
  max-width: 760px;
}
.prose h3 {
  font-size: 17.5px;
  margin: 28px 0 10px;
  letter-spacing: -0.02em;
}
.prose p {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.68;
}
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.66;
}

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.22s ease;
  z-index: 300;
  box-shadow: var(--shadow-float);
  max-width: 90vw;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modal */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 11, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
#modal.show {
  display: flex;
}
.sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-float);
  text-align: center;
}
.sheet h3 {
  font-size: 20px;
  margin-bottom: 5px;
}
.sheet .amt {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 14px 0 5px;
  color: var(--accent);
}
.sheet .amt small {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.terms {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.terms div::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  margin-right: 8px;
}
.spin {
  width: 32px;
  height: 32px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 10px auto;
  animation: sp 0.8s linear infinite;
}
@keyframes sp {
  to { transform: rotate(360deg); }
}

footer {
  padding: 44px 0 60px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 36px;
}

@media (max-width: 900px) {
  .hero-banner-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .banner-right {
    min-height: 320px;
    border-left: none;
    border-top: 1px solid var(--banner-border);
  }
  .banner-left {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
}
