@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

/* ===== 基础变量 ===== */
:root {
  --c-rose: #eb879c;
  --c-pink: #ffb6c1;
  --c-dark: #26171a;
  --c-dark2: #3d2028;
  --c-light: #fff5f7;
  --c-muted: #6e4a53;
  --c-border: #f0b8c4;
  --c-card-bg: #fff9fa;
  --font-deco: 'Poiret One', 'Didact Gothic', serif;
  --font-body: 'Didact Gothic', system-ui, -apple-system, sans-serif;
  --radius-pill: 999px;
  --radius-card: 10px;
  --shadow-soft: 0 2px 6px rgba(235,135,156,0.13), 0 1px 3px rgba(38,23,26,0.08);
  --shadow-hover: 0 6px 18px rgba(235,135,156,0.22), 0 2px 8px rgba(38,23,26,0.10);
  --nav-h: 64px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  background: var(--c-light);
  color: var(--c-dark);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 通用 ===== */
a { color: var(--c-rose); text-decoration: none; }
a:hover { color: var(--c-dark2); }
a:focus-visible {
  outline: 2px solid var(--c-rose);
  outline-offset: 3px;
  border-radius: 4px;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-deco); line-height: 1.3; }
h1 { font-size: clamp(2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
p { font-size: 1rem; line-height: 1.75; margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
hr { border: none; border-top: 1.5px solid var(--c-border); margin: 1rem 0 1.2rem; }
ul, ol { padding-left: 1.4em; margin-bottom: 1em; }
li { margin-bottom: .35em; }
time { color: var(--c-muted); font-size: .88rem; }

/* ===== 站点包裹 ===== */
.site-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(38,23,26,0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -2px 12px rgba(235,135,156,0.18);
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-brand {
  padding: 8px 0 4px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.brand-logo { display: flex; align-items: center; }
.brand-text {
  font-family: var(--font-deco);
  font-size: 1.3rem;
  color: var(--c-pink);
  letter-spacing: .08em;
}
.logo-img { height: 28px; width: auto; }

.header-nav {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.header-nav::-webkit-scrollbar { display: none; }

.nav-pill-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  white-space: nowrap;
  margin: 0;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--c-rose);
  color: var(--c-pink);
  font-family: var(--font-deco);
  font-size: .88rem;
  letter-spacing: .04em;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.nav-pill:hover, .nav-pill:focus-visible {
  background: var(--c-rose);
  color: #fff;
  border-color: var(--c-rose);
  box-shadow: 0 2px 8px rgba(235,135,156,0.35);
}

/* ===== MAIN ===== */
.site-main {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + 64px);
}

/* ===== HERO ===== */
.hero-section {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(150deg, var(--c-dark) 0%, var(--c-dark2) 60%, #5a2535 100%);
  overflow: hidden;
  padding: 3rem 1.5rem;
  gap: 1.5rem;
}

.hero-aside {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}
.aside-deco {
  font-family: var(--font-deco);
  font-size: clamp(3rem, 10vw, 7rem);
  color: rgba(255,182,193,0.07);
  letter-spacing: .15em;
  writing-mode: vertical-rl;
  line-height: 1;
}

.hero-figure {
  text-align: center;
  max-width: 720px;
  position: relative;
  z-index: 1;
}
.hero-title {
  color: var(--c-pink);
  margin-bottom: .6rem;
  letter-spacing: .06em;
}
.hero-sub {
  color: rgba(255,182,193,0.78);
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===== CONTENT SECTION ===== */
.content-section {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.2rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

/* aside 在内容左侧 */
.content-aside {
  flex: 0 0 200px;
  position: sticky;
  top: 1rem;
  background: var(--c-card-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.2rem 1rem;
  box-shadow: var(--shadow-soft);
}
.aside-heading {
  font-family: var(--font-deco);
  font-size: 1rem;
  color: var(--c-rose);
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.aside-hr { margin: .5rem 0 .8rem; }
.aside-link {
  display: block;
  color: var(--c-muted);
  font-size: .9rem;
  padding: .32rem 0;
  border-bottom: 1px solid var(--c-border);
  transition: color var(--transition), padding-left var(--transition);
}
.aside-link:last-child { border-bottom: none; }
.aside-link:hover, .aside-link:focus-visible {
  color: var(--c-rose);
  padding-left: .4rem;
}

.content-body {
  flex: 1;
  min-width: 0;
}

/* page.content 内部样式 */
.content-body h2 {
  color: var(--c-dark);
  margin-top: 2.2rem;
  margin-bottom: .3rem;
}
.content-body h2:first-child { margin-top: 0; }
.content-body h2 + hr {
  border-top-color: var(--c-rose);
  margin-bottom: 1rem;
}
.content-body h3 {
  color: var(--c-dark2);
  margin-top: 1.6rem;
  margin-bottom: .4rem;
}
.content-body div {
  margin-bottom: 2.8rem;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.content-body p { color: var(--c-dark); }
.content-body ul, .content-body ol {
  color: var(--c-dark);
}
.content-body a {
  color: var(--c-rose);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.content-body a:hover { color: var(--c-dark2); }

/* div 内 figure/aside 交错 — build 注入内容里的图文块 */
.content-body figure {
  margin: 1.5rem 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1.5px solid var(--c-border);
  background: var(--c-card-bg);
  box-shadow: var(--shadow-soft);
}
.content-body figure img {
  width: 100%;
  height: auto;
}
.content-body figcaption {
  padding: .6rem 1rem;
  font-size: .88rem;
  color: var(--c-muted);
}
.content-body aside {
  background: linear-gradient(135deg, #fff0f4 0%, #fff9fa 100%);
  border-left: 3px solid var(--c-rose);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: .9rem 1.1rem;
  margin: 1.2rem 0;
  font-size: .96rem;
  color: var(--c-dark2);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--c-dark);
  color: var(--c-pink);
  padding-bottom: calc(var(--nav-h) + 16px);
}

.footer-cta-block {
  background: linear-gradient(135deg, var(--c-rose) 0%, #d4607c 100%);
  padding: 2.2rem 1.5rem;
  text-align: center;
}
.footer-cta-text {
  font-family: var(--font-deco);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: #fff;
  letter-spacing: .05em;
  margin-bottom: 0;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,182,193,0.12);
}

.footer-bar-logo a { display: flex; align-items: center; }
.footer-logo-img { height: 24px; width: auto; }
.footer-brand-text {
  font-family: var(--font-deco);
  font-size: 1.1rem;
  color: var(--c-pink);
  letter-spacing: .07em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
}
.footer-nav-link {
  color: rgba(255,182,193,0.72);
  font-size: .85rem;
  transition: color var(--transition);
  padding: .25rem 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.footer-nav-link:hover { color: var(--c-pink); }

.footer-copy {
  color: rgba(255,182,193,0.4);
  font-size: .82rem;
  margin-bottom: 0;
}

/* ===== BACK TOP ===== */
.back-top {
  position: fixed;
  right: 1.2rem;
  bottom: calc(var(--nav-h) + 16px);
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--c-rose);
  background: rgba(38,23,26,0.92);
  color: var(--c-pink);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  line-height: 1;
}
.back-top:hover {
  background: var(--c-rose);
  color: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.back-top:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
}

/* ===== SCROLL REVEAL ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 280ms ease, transform 280ms ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .content-body div {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 260ms ease, transform 260ms ease;
  }
  .content-body div.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .nav-pill {
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition),
                transform 200ms ease;
  }
  .nav-pill:hover { transform: translateY(-1px); }
  .aside-link { transition: color var(--transition), padding-left var(--transition); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    padding: 0 2rem;
    bottom: 0;
  }
  .header-brand { padding: 10px 0; width: auto; margin-right: 1.5rem; flex-shrink: 0; }
  .header-nav { padding-bottom: 0; }
  .nav-pill-row { gap: 8px; }
  .nav-pill { height: 44px; padding: 0 18px; font-size: .92rem; }
  .content-aside { display: block; }
}

@media (max-width: 767px) {
  .content-section {
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem auto;
  }
  .content-aside {
    position: static;
    flex: none;
    width: 100%;
  }
  .hero-section {
    min-height: 45vh;
    padding: 2.5rem 1.2rem;
  }
  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
  }
  .footer-nav { gap: .3rem .6rem; }
}

@media (min-width: 1024px) {
  .content-aside { flex: 0 0 220px; }
  .hero-section { padding: 4rem 2rem; }
}

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

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