@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --mid: #4a4a4a;
  --serif: "Noto Serif TC", "Songti SC", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans TC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(26, 26, 26, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 62% 48%, rgba(26, 26, 26, 0.04) 0 1px, transparent 1px);
  background-size: 23px 23px, 31px 31px;
  padding-bottom: 200px;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.34;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.05);
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.012em;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.6rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(250, 250, 248, 0.96);
  border-top: 2px solid var(--ink);
  box-shadow: 0 -7px 0 rgba(26, 26, 26, 0.05);
}

.dock-nav {
  order: 2;
  flex: 1 1 100%;
  min-width: 0;
}

.dock-nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 0;
}

.dock-nav p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.78rem;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-0.6deg);
}

.dock-nav p a:nth-child(even) {
  transform: rotate(0.7deg);
}

.dock-nav p a:hover {
  background: var(--ink);
  color: var(--paper);
}

.dock-nav p a.dock-brand {
  order: -1;
  flex: 1 0 100%;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.15rem 0.5rem;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: transparent;
  border: 2px dashed var(--ink);
  border-radius: 4px 16px 6px 14px;
  transform: rotate(-0.8deg);
}

.dock-logo {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
}

.dock-cta {
  order: 3;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 1.1rem;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  transform: rotate(-1deg);
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.22);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.8rem);
  align-content: end;
  padding: clamp(3rem, 9vh, 5.5rem) clamp(1rem, 5vw, 3rem) clamp(12rem, 20vh, 14rem);
  border-bottom-left-radius: 50% 4.5rem;
  border-bottom-right-radius: 50% 4.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f4f3ef 62%, var(--paper) 100%);
}

.hero-ghost {
  position: absolute;
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3.4rem, 17vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: 0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(26, 26, 26, 0.17);
  pointer-events: none;
  z-index: 0;
}

.hero-copy {
  order: -1;
  text-align: right;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.9rem, 6.6vw, 3.4rem);
  letter-spacing: 0.02em;
}

.hero-copy h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 7px;
  margin: 0.6rem 0 0 auto;
  border-radius: 7px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 9px, transparent 9px 15px);
  opacity: 0.55;
}

.hero-lead {
  margin: 0 0 0 auto;
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--mid);
}

.hero-frame {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 100%;
  max-width: 470px;
  min-height: 210px;
  padding: 0.55rem;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 28px;
  transform: rotate(-1.3deg);
  box-shadow: 10px 12px 0 rgba(26, 26, 26, 0.12);
}

.hero-frame::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 26%;
  width: 96px;
  height: 26px;
  border-radius: 2px;
  background: rgba(26, 26, 26, 0.14);
  transform: rotate(-4deg);
}

.hero-print {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
}

.hero-scribble {
  position: absolute;
  right: 0.8rem;
  bottom: 0.6rem;
  width: 110px;
  height: 54px;
  opacity: 0.8;
}

/* ---------- 主体网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 2.5rem);
}

/* ---------- 左栏 ---------- */
.rail {
  align-self: start;
  padding: 1.05rem 1rem 1.2rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 6px 20px 8px 22px;
  box-shadow: 6px 7px 0 rgba(26, 26, 26, 0.09);
  transform: rotate(-0.8deg);
}

.rail small {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: var(--mid);
}

.rail h2 {
  margin: 0.15rem 0 0.85rem;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.05rem;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.15rem 0.2rem;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(26, 26, 26, 0.28);
}

.rail-list a::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
}

.rail-list a:hover {
  background: var(--ink);
  color: var(--paper);
}

.rail-list a:hover::before {
  border-color: var(--paper);
}

/* ---------- 正文流 ---------- */
.stream {
  min-width: 0;
}

.stream > section {
  padding: clamp(1.6rem, 4vw, 2.6rem) 0;
  border-top: 2px dashed rgba(26, 26, 26, 0.22);
  scroll-margin-top: 1rem;
}

.stream > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.stream small {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  color: var(--mid);
}

.stream h2 {
  margin: 0.1rem 0 1rem;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
}

.stream h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  margin-top: 0.55rem;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 14px);
  opacity: 0.5;
}

.stream h3 {
  margin: 1.6rem 0 0.7rem;
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
}

.stream p {
  margin: 0 0 1.15rem;
}

.stream ul,
.stream ol {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
}

.stream li {
  margin: 0.35rem 0;
}

.stream img {
  margin: 0.7rem 0;
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.stream figure {
  margin: 1.4rem 0;
  padding: 0.5rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: 7px 8px 0 rgba(26, 26, 26, 0.1);
  transform: rotate(-0.5deg);
}

.stream figcaption {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--mid);
}

.stream blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  background: #fff;
  border-left: 5px solid var(--ink);
  border-radius: 0 18px 18px 0;
  transform: rotate(-0.3deg);
}

.stream blockquote p:last-child {
  margin-bottom: 0;
}

.stream table {
  width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.stream th,
.stream td {
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(26, 26, 26, 0.4);
  text-align: left;
}

.stream th {
  background: #fff;
}

.stream strong {
  font-weight: 700;
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1180px;
  margin: clamp(2.5rem, 7vw, 5rem) auto 0;
  padding: 2rem clamp(1rem, 5vw, 2.5rem) 2.5rem;
  border-top: 3px solid var(--ink);
}

.foot-cols {
  display: grid;
  gap: 1.8rem;
}

.foot address {
  font-style: normal;
  display: grid;
  gap: 0.4rem;
}

.foot address strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.foot address span {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--mid);
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.9rem;
}

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(26, 26, 26, 0.26);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px dashed rgba(26, 26, 26, 0.3);
  font-size: 0.95rem;
}

.foot-base p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.foot-base a {
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

/* ---------- 动效 ---------- */
.rv {
  opacity: 0;
  transform: translateY(16px) rotate(0.5deg);
}

.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s steps(4, end), transform 0.55s steps(6, end);
}

/* ---------- 桌面 ---------- */
@media (min-width: 860px) {
  body {
    padding-bottom: 118px;
  }

  .dock {
    flex-wrap: nowrap;
    padding: 0.5rem 1.2rem calc(0.55rem + env(safe-area-inset-bottom));
  }

  .dock-nav {
    order: 0;
    flex: 1 1 auto;
  }

  .dock-nav p {
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .dock-nav p a.dock-brand {
    order: 0;
    flex: 0 0 auto;
    font-size: 17px;
  }

  .dock-cta {
    margin-left: 0.7rem;
  }

  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: end;
    padding-inline: clamp(2rem, 6vw, 5rem);
  }

  .hero-frame {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-copy {
    order: 0;
    grid-column: 2;
    grid-row: 1;
  }

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

  .rail {
    position: sticky;
    top: 1.5rem;
  }

  .foot-cols {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .hero-copy h1 {
    font-size: 3.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-frame,
  .rail,
  .stream figure,
  .stream blockquote {
    transform: none;
  }
}

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