/* Inkwave — 哔咔漫画 p-c.lol 独立视觉体系 */
@import url("https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&family=Noto+Sans+SC:wght@400;500;700&display=swap");

:root {
  --iw-fog: #eef6f4;
  --iw-mist: #d7ebe6;
  --iw-paper: #fbf8f2;
  --iw-ink: #1a2f36;
  --iw-ink-soft: #3d5560;
  --iw-teal: #0f8a7d;
  --iw-teal-deep: #0a5c54;
  --iw-coral: #e85d4c;
  --iw-coral-soft: #ff8f7a;
  --iw-gold: #d4a017;
  --iw-glass: rgba(255, 255, 255, 0.55);
  --iw-glass-line: rgba(15, 138, 125, 0.18);
  --iw-shadow: 0 18px 48px rgba(26, 47, 54, 0.12);
  --iw-radius: 22px;
  --iw-max: 1120px;
  --iw-nav-h: 64px;
  --iw-font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --iw-font-body: "Noto Sans SC", "PingFang SC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--iw-font-body);
  color: var(--iw-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 138, 125, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(232, 93, 76, 0.12), transparent 50%),
    linear-gradient(180deg, var(--iw-fog) 0%, var(--iw-paper) 42%, #f3f0e8 100%);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--iw-coral);
}

.iw-skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.iw-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

/* 顶部推广区 */
.iw-promo {
  background: linear-gradient(90deg, rgba(15, 138, 125, 0.1), rgba(232, 93, 76, 0.08));
  border-bottom: 1px solid var(--iw-glass-line);
  padding: 10px 12px 6px;
}

.iw-promo-grid,
.iw-dock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  max-width: var(--iw-max);
  margin: 0 auto;
  justify-items: center;
}

@media (min-width: 900px) {
  .iw-promo-grid,
  .iw-dock-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.iw-ad-cell {
  width: 100%;
  max-width: 78px;
  text-align: center;
}

.iw-ad-cell a {
  display: block;
  text-decoration: none;
  color: var(--iw-ink-soft);
}

.iw-ad-cell img {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(26, 47, 54, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.iw-ad-cell a:hover img {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 26px rgba(26, 47, 54, 0.2);
}

.iw-ad-cell span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航 */
.iw-mast {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(251, 248, 242, 0.82);
  border-bottom: 1px solid var(--iw-glass-line);
}

.iw-mast-inner {
  max-width: var(--iw-max);
  margin: 0 auto;
  min-height: var(--iw-nav-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.iw-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--iw-ink);
}

.iw-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.iw-brand strong {
  font-family: var(--iw-font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.iw-nav {
  display: none;
  gap: 18px;
  align-items: center;
}

.iw-nav a {
  text-decoration: none;
  color: var(--iw-ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.iw-nav a:hover,
.iw-nav a.is-on {
  color: var(--iw-teal-deep);
}

.iw-menu-btn {
  border: 1px solid var(--iw-glass-line);
  background: var(--iw-glass);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.iw-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--iw-ink);
  margin: 2px 0;
  border-radius: 2px;
}

.iw-drawer {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--iw-glass-line);
  background: rgba(251, 248, 242, 0.96);
}

.iw-drawer.is-open {
  display: grid;
  gap: 10px;
}

.iw-drawer a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 138, 125, 0.06);
  color: var(--iw-ink);
}

@media (min-width: 860px) {
  .iw-nav {
    display: flex;
  }
  .iw-menu-btn,
  .iw-drawer {
    display: none !important;
  }
}

/* 滚动后固定下载条 */
.iw-dock {
  position: sticky;
  top: var(--iw-nav-h);
  z-index: 55;
  background: rgba(238, 246, 244, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--iw-glass-line);
  padding: 8px 12px;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.iw-dock.is-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Hero — 品牌优先，无下载按钮 */
.iw-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 16px 36px;
}

.iw-hero::before {
  content: "";
  position: absolute;
  inset: 8% -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(232, 93, 76, 0.22), transparent 68%);
  filter: blur(8px);
  animation: iw-drift 9s ease-in-out infinite alternate;
}

.iw-hero::after {
  content: "";
  position: absolute;
  inset: auto auto -20% -15%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(15, 138, 125, 0.2), transparent 70%);
  animation: iw-drift 11s ease-in-out infinite alternate-reverse;
}

@keyframes iw-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(24px, -18px) scale(1.08);
  }
}

.iw-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--iw-max);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .iw-hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

.iw-hero-copy h1 {
  font-family: var(--iw-font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.25;
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.iw-hero-copy p {
  margin: 0;
  color: var(--iw-ink-soft);
  font-size: 1.05rem;
  max-width: 36em;
}

.iw-hero-visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--iw-shadow);
  min-height: 280px;
  background: linear-gradient(145deg, #0f8a7d, #1a2f36 55%, #e85d4c);
}

.iw-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  opacity: 0.92;
  animation: iw-soft-zoom 12s ease-in-out infinite alternate;
}

@keyframes iw-soft-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.iw-glow-ring {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  pointer-events: none;
}

/* 通用布局 */
.iw-wrap {
  max-width: var(--iw-max);
  margin: 0 auto;
  padding: 0 16px 48px;
}

.iw-section {
  margin: 42px 0;
}

.iw-section h2 {
  font-family: var(--iw-font-display);
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  margin: 0 0 12px;
  font-weight: 400;
}

.iw-section h3 {
  font-family: var(--iw-font-display);
  font-size: 1.2rem;
  margin: 22px 0 8px;
  font-weight: 400;
  color: var(--iw-teal-deep);
}

.iw-lead {
  color: var(--iw-ink-soft);
  margin: 0 0 18px;
}

.iw-prose p {
  margin: 0 0 1em;
  color: var(--iw-ink);
}

.iw-prose p:last-child {
  margin-bottom: 0;
}

/* 图文交错 */
.iw-split {
  display: grid;
  gap: 22px;
  align-items: center;
  margin: 28px 0;
}

@media (min-width: 820px) {
  .iw-split {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .iw-split.is-flip .iw-split-media {
    order: 2;
  }
  .iw-split.is-flip .iw-split-text {
    order: 1;
  }
}

.iw-frame {
  border-radius: var(--iw-radius);
  overflow: hidden;
  box-shadow: var(--iw-shadow);
  background: #fff;
  border: 1px solid var(--iw-glass-line);
}

.iw-frame img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  max-height: 520px;
}

@media (min-width: 820px) {
  .iw-frame img {
    aspect-ratio: 3 / 4;
    max-height: 560px;
  }
}

/* 卡片矩阵 */
.iw-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .iw-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .iw-card-grid.is-trio {
    grid-template-columns: repeat(3, 1fr);
  }
}

.iw-card {
  background: var(--iw-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--iw-glass-line);
  border-radius: var(--iw-radius);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(26, 47, 54, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.iw-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--iw-shadow);
}

.iw-card h3 {
  margin-top: 0;
}

.iw-card img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 12px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* 纯文本带 */
.iw-inkband {
  position: relative;
  padding: 28px 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 138, 125, 0.08), rgba(232, 93, 76, 0.06));
  border: 1px solid var(--iw-glass-line);
  overflow: hidden;
}

.iw-inkband::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -30px;
  top: -40px;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.25), transparent 70%);
}

/* 功能轨道 */
.iw-rail {
  display: grid;
  gap: 14px;
}

.iw-rail-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--iw-glass-line);
}

.iw-rail-item img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

.iw-rail-item h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.iw-rail-item p {
  margin: 0;
  color: var(--iw-ink-soft);
  font-size: 0.95rem;
}

/* CTA 区（非 hero / 非导航） */
.iw-cta {
  margin: 36px 0;
  padding: 28px 22px;
  border-radius: 26px;
  background: linear-gradient(120deg, #0a5c54, #0f8a7d 45%, #1a2f36);
  color: #fff;
  display: grid;
  gap: 14px;
  box-shadow: var(--iw-shadow);
}

.iw-cta h2 {
  margin: 0;
  color: #fff;
}

.iw-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.iw-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.iw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.iw-btn:hover {
  transform: translateY(-2px);
}

.iw-btn-coral {
  background: linear-gradient(135deg, var(--iw-coral), var(--iw-coral-soft));
  color: #fff;
  box-shadow: 0 8px 20px rgba(232, 93, 76, 0.35);
}

.iw-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.iw-btn-solid {
  background: var(--iw-teal);
  color: #fff;
}

/* 面包屑 */
.iw-crumb {
  max-width: var(--iw-max);
  margin: 0 auto;
  padding: 18px 16px 0;
  font-size: 0.9rem;
  color: var(--iw-ink-soft);
}

.iw-crumb a {
  color: var(--iw-teal-deep);
  text-decoration: none;
}

.iw-crumb span {
  margin: 0 6px;
  opacity: 0.5;
}

/* 法律页 */
.iw-legal {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--iw-glass-line);
  border-radius: 24px;
  padding: 24px 18px;
  margin-top: 12px;
}

.iw-legal h1 {
  font-family: var(--iw-font-display);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0 0 12px;
  font-weight: 400;
}

.iw-legal h2 {
  font-family: var(--iw-font-display);
  font-size: 1.25rem;
  margin: 28px 0 10px;
  font-weight: 400;
  color: var(--iw-teal-deep);
}

.iw-legal p,
.iw-legal li {
  color: var(--iw-ink-soft);
}

.iw-legal ul {
  padding-left: 1.2em;
}

/* 错误页 */
.iw-error {
  min-height: 58vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
}

.iw-error h1 {
  font-family: var(--iw-font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 0 0 10px;
  font-weight: 400;
}

.iw-error p {
  color: var(--iw-ink-soft);
  max-width: 28em;
  margin: 0 auto 18px;
}

/* 页脚 */
.iw-foot {
  margin-top: 20px;
  padding: 36px 16px 28px;
  background: linear-gradient(180deg, transparent, rgba(26, 47, 54, 0.06));
  border-top: 1px solid var(--iw-glass-line);
}

.iw-foot-inner {
  max-width: var(--iw-max);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.iw-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.iw-foot-links a {
  text-decoration: none;
  color: var(--iw-ink-soft);
  font-size: 0.92rem;
}

.iw-foot-links a:hover {
  color: var(--iw-teal-deep);
}

.iw-copy {
  font-size: 0.85rem;
  color: #6a7d86;
  margin: 0;
}

/* 混排 mosaic */
.iw-mosaic {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .iw-mosaic {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.iw-mosaic .iw-card:nth-child(1) {
  grid-row: span 2;
}

.iw-tagline {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--iw-coral);
  margin-bottom: 8px;
}

.iw-quote {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--iw-coral);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 14px 14px 0;
  color: var(--iw-ink-soft);
  font-style: normal;
}

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