@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink: #26171a;
  --ink-2: #3a2328;
  --ink-3: #2c1a1f;
  --rose: #eb879c;
  --rose-2: #ffb6c1;
  --paper: #fdf5f6;
  --paper-2: #f8e9ec;
  --txt: #f6e6e9;
  --muted: #c9a7b0;
  --r: 10px;
  --shadow: 0 2px 4px rgba(20, 9, 12, .35), 0 14px 30px rgba(20, 9, 12, .45);
  --shadow-soft: 0 2px 4px rgba(20, 9, 12, .18), 0 10px 22px rgba(20, 9, 12, .16), inset 0 1px 0 rgba(255, 255, 255, .6);
  --t: 240ms cubic-bezier(.2, .7, .3, 1);
  --font: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  background-image: radial-gradient(120% 60% at 50% 0, rgba(235, 135, 156, .16), rgba(38, 23, 26, 0) 62%);
  color: var(--txt);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .01em;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--rose-2); }

:focus-visible {
  outline: 3px solid var(--rose-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 92px 20px 78px;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ink-3);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 182, 193, .22) 1px, rgba(0, 0, 0, 0) 1px),
    linear-gradient(150deg, #331d23 0%, #26171a 62%, #1e1215 100%);
  background-size: 22px 22px, auto;
  border-bottom: 1px solid rgba(235, 135, 156, .28);
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(115% 85% at 50% 42%, rgba(38, 23, 26, .34), rgba(38, 23, 26, .9) 72%),
    linear-gradient(180deg, rgba(235, 135, 156, .26), rgba(30, 18, 21, .94));
}

.hero-inner {
  position: relative;
  max-width: 780px;
  text-align: center;
}

.hero-brand {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--rose-2);
  text-transform: none;
}

.hero-title {
  margin: 0;
  font-size: clamp(30px, 6.4vw, 56px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  text-shadow: 0 3px 18px rgba(20, 9, 12, .55);
}

.hero-desc {
  margin: 20px auto 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.9;
  color: #f2dbe0;
  text-shadow: 0 2px 12px rgba(20, 9, 12, .6);
}

/* ---------- stage / section ---------- */
.stage {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px 0;
}

.paper {
  display: grid;
  grid-template-columns: 194px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.paper > div {
  grid-column: 2;
  min-width: 0;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  color: var(--ink);
  border-radius: var(--r);
  padding: 26px 26px 30px;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(255, 255, 255, .55);
  scroll-margin-top: 24px;
}

.paper > div > *:last-child { margin-bottom: 0; }

.paper h2,
.paper h3 {
  color: #1d1013;
  line-height: 1.42;
  letter-spacing: -.005em;
}

.paper h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  margin: .15em 0 .5em;
}

.paper h3 {
  font-size: 18px;
  margin: 1.6em 0 .4em;
}

.paper hr {
  height: 0;
  border: 0;
  border-top: 2px dashed rgba(235, 135, 156, .6);
  margin: 0 0 18px;
}

.paper p { margin: 0 0 1.05em; color: #3d282d; }

.paper ul,
.paper ol { margin: 0 0 1.05em; padding-left: 1.25em; }

.paper li { margin: 0 0 .4em; color: #3d282d; }

.paper a {
  color: #a8335a;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.paper a:hover { color: #7d1f40; }

.paper strong { color: #1d1013; font-weight: 700; }

.paper blockquote {
  margin: 0 0 1.1em;
  padding: 12px 16px;
  border-left: 4px solid var(--rose);
  background: #fbeaee;
  border-radius: 0 var(--r) var(--r) 0;
  color: #3d282d;
}

.paper blockquote > *:last-child { margin-bottom: 0; }

.paper code {
  background: #f2dee3;
  border-radius: 6px;
  padding: 1px 5px;
  font-size: .92em;
}

.paper pre {
  overflow-x: auto;
  background: #f2dee3;
  border-radius: var(--r);
  padding: 14px;
}

.paper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 0 0 1.1em;
}

.paper th,
.paper td {
  border-bottom: 1px solid rgba(38, 23, 26, .16);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

.paper th { background: rgba(235, 135, 156, .16); }

/* ---------- rail (aside, left) ---------- */
.rail {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 22px;
  min-width: 0;
  background: linear-gradient(180deg, #3a2328, #2b1a1e);
  border: 1px solid rgba(235, 135, 156, .28);
  border-radius: var(--r);
  padding: 15px 13px 13px;
  box-shadow: var(--shadow);
}

.rail-title {
  margin: 0 0 9px;
  font-size: 12.5px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--rose-2);
  font-weight: 700;
}

.rail hr {
  height: 0;
  border: 0;
  border-top: 2px solid rgba(235, 135, 156, .45);
  margin: 0 0 8px;
}

.rail-list { list-style: none; margin: 0; padding: 0; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 9px;
  border-radius: 8px;
  color: #f3d9df;
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.5;
  transition: background var(--t), color var(--t), transform var(--t);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: rgba(255, 182, 193, .16);
  color: #fff;
  transform: translateX(2px);
}

/* ---------- footer ---------- */
.foot {
  max-width: 1120px;
  margin: 54px auto 0;
  padding: 0 20px 122px;
}

.foot-brand {
  margin: 0 0 24px;
  padding-top: 22px;
  border-top: 2px solid rgba(235, 135, 156, .4);
  font-size: clamp(38px, 11vw, 92px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
  opacity: .93;
}

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

.foot-nav dl { margin: 0; min-width: 0; }

.foot-nav dt { margin: 0 0 4px; }
.foot-nav dd { margin: 0; }

.foot-nav dt a,
.foot-nav dd a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--muted);
  transition: color var(--t);
}

.foot-nav dt a { color: var(--rose-2); }

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-copy {
  margin: 26px 0 0;
  font-size: 13.5px;
  color: #a1808a;
  letter-spacing: .06em;
}

/* ---------- dock ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(38, 23, 26, .94);
  border-top: 1px solid rgba(235, 135, 156, .34);
  box-shadow: 0 -10px 26px rgba(12, 5, 7, .45);
  backdrop-filter: blur(10px);
}

.dock-brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.dock-nav { flex: none; }

.menu { position: relative; }

.menu-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: var(--r);
  border: 1px solid rgba(235, 135, 156, .42);
  background: rgba(235, 135, 156, .16);
  color: #ffd8e0;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}

.menu-btn::-webkit-details-marker { display: none; }

.menu-btn:hover { background: rgba(235, 135, 156, .3); color: #fff; }

.menu[open] .menu-btn { background: var(--rose); color: #2a161a; border-color: var(--rose); }

.menu-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(88vw, 400px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(235, 135, 156, .35);
  background: var(--ink-3);
  box-shadow: var(--shadow);
}

.menu-panel .g-label {
  margin: 0 0 6px;
  font-size: 11.5px;
  letter-spacing: .24em;
  text-indent: .24em;
  color: var(--rose);
}

.menu-panel ul { list-style: none; margin: 0; padding: 0; }

.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 9px;
  border-radius: 8px;
  color: #f3d9df;
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.45;
  transition: background var(--t), color var(--t);
}

.menu-panel a:hover,
.menu-panel a:focus-visible { background: rgba(255, 182, 193, .18); color: #fff; }

.dock-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.dock-search input {
  width: 100%;
  max-width: 220px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid rgba(235, 135, 156, .34);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: background var(--t), border-color var(--t);
}

.dock-search input::placeholder { color: #b08e98; }

.dock-search input:focus {
  background: rgba(255, 255, 255, .12);
  border-color: var(--rose-2);
}

/* ---------- reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * { transition-duration: 1ms !important; }
}

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  body { font-size: 16.5px; }

  .hero {
    min-height: 68vh;
    padding: 74px 16px 64px;
  }

  .stage { padding: 22px 14px 0; }

  .paper {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .paper > div { grid-column: 1; padding: 22px 17px 26px; }

  .rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  .rail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }

  .rail-list a { font-size: 14px; }

  .foot { padding: 0 16px 118px; }

  .foot-nav { gap: 10px; }

  .foot-nav dt a,
  .foot-nav dd a { font-size: 13.5px; }

  .menu-panel { width: min(90vw, 360px); gap: 8px; padding: 12px; }

  .dock { gap: 8px; padding-left: 12px; padding-right: 12px; }

  .dock-brand { font-size: 14px; letter-spacing: .04em; }

  .menu-btn { padding: 0 11px; }

  .dock-search input { max-width: none; }
}

@media (max-width: 380px) {
  .menu-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

button[aria-expanded]{min-width:44px;min-height:44px}
