/* 海角论坛官网 - hai-jiao.beauty */
:root {
  --brand: #2b78b8;
  --brand-deep: #1a5a8a;
  --brand-soft: #e8f3fa;
  --ink: #1a2b38;
  --ink-muted: #4a6070;
  --sand: #f0f6fa;
  --foam: #ffffff;
  --wave: #7eb8d9;
  --line: rgba(43, 120, 184, 0.18);
  --shadow: 0 18px 40px rgba(26, 90, 138, 0.12);
  --radius: 14px;
  --max: 1120px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Serif SC", "Songti SC", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(126, 184, 217, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 40% at 90% 0%, rgba(43, 120, 184, 0.18), transparent 50%),
    linear-gradient(180deg, #eef6fb 0%, var(--sand) 35%, #f7fbfd 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(238, 246, 251, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-domain {
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--foam);
  color: var(--brand-deep);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
  position: relative;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand-deep);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 3.2rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 280px;
  background: radial-gradient(ellipse, rgba(43, 120, 184, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--brand);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.35;
  margin: 0 0 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin: 0 0 1.6rem;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(43, 120, 184, 0.35);
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--brand-deep);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--brand);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 4px solid rgba(255, 255, 255, 0.85);
  animation: float-in 0.9s ease both;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 12% -8% -8% 18%;
  background: linear-gradient(135deg, rgba(126, 184, 217, 0.35), transparent);
  border-radius: 40% 60% 50% 50%;
  z-index: -1;
  animation: wave-pulse 6s ease-in-out infinite;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wave-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.05) rotate(2deg); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: rise 0.7s ease both;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 243, 250, 0.65));
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 400;
  margin: 0 0 0.7rem;
  letter-spacing: 0.03em;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 2rem 0 0.8rem;
  color: var(--brand-deep);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

/* Feature / media layouts */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.75rem;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse .feature-media {
  order: 2;
}

.feature-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 3px solid rgba(255, 255, 255, 0.9);
  margin-inline: auto;
  max-width: 280px;
}

.feature-copy h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
}

.feature-copy p {
  margin: 0 0 0.9rem;
  color: var(--ink-muted);
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.shot-item {
  text-align: center;
}

.shot-item img {
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  margin: 0 auto 0.75rem;
  max-width: 220px;
  transition: transform 0.35s ease;
}

.shot-item:hover img {
  transform: translateY(-6px);
}

.shot-item figcaption {
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* Guide steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

.step {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.25rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brand);
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: 0.06em;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}

.faq-item h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0 0 0.45rem;
  color: var(--brand-deep);
}

.faq-item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* Page banner (inner pages) */
.page-banner {
  padding: 2.6rem 0 1.8rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
}

.page-banner h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 400;
  margin: 0 0 0.6rem;
}

.page-banner p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 40rem;
}

.page-body {
  padding: 2.5rem 0 3.5rem;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 5.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.side-panel h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0 0 0.85rem;
}

.side-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-panel li {
  margin-bottom: 0.55rem;
}

.side-panel a {
  text-decoration: none;
  font-size: 0.95rem;
}

.side-panel img {
  border-radius: 12px;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--brand);
  line-height: 1;
  margin: 0 0 0.5rem;
  letter-spacing: 0.08em;
}

.error-page h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.error-page p {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

/* Internal link strip */
.link-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.link-chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--brand-soft);
  color: var(--brand-deep);
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.88rem;
  border: 1px solid var(--line);
}

.link-chip:hover {
  background: #fff;
  color: var(--brand);
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  background: linear-gradient(180deg, #1a5a8a 0%, #143f63 100%);
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.site-footer h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  margin: 0 0 0.85rem;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

/* TOC on home */
.toc {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  margin-bottom: 0.4rem;
  break-inside: avoid;
}

.toc a {
  text-decoration: none;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .feature-row,
  .feature-row.reverse,
  .page-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-media {
    order: 0;
  }

  .shot-grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .toc ol {
    columns: 1;
  }

  .side-panel {
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.open {
    display: block;
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: auto;
    min-width: 180px;
    width: max-content;
    max-width: min(280px, calc(100vw - 2rem));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    z-index: 120;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .site-nav li a {
    display: block;
    padding: 0.65rem 1.15rem;
  }

  .site-nav a.active::after {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .shot-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-visual img,
  .feature-media img,
  .shot-item img {
    max-width: 240px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
