:root {
  --bg-1: #2a120b;
  --bg-2: #4f1f0e;
  --bg-3: #120909;
  --panel: rgba(54, 22, 14, 0.74);
  --line: rgba(255, 208, 158, 0.18);
  --text: #fff7ef;
  --muted: #f2c9ae;
  --accent: #ff9f43;
  --accent-2: #ffd27a;
  --accent-3: #ff6b35;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 177, 71, 0.28), transparent 22%),
    radial-gradient(circle at 85% 12%, rgba(255, 122, 61, 0.2), transparent 18%),
    radial-gradient(circle at 50% 110%, rgba(255, 199, 120, 0.14), transparent 30%),
    linear-gradient(180deg, #6f2d11 0%, #3a170e 42%, #170b0a 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background-image:
    linear-gradient(rgba(255, 223, 188, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 223, 188, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 92%);
}

body::after {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 238, 204, 0.07), transparent 24%),
    radial-gradient(circle at 80% 22%, rgba(255, 238, 204, 0.05), transparent 18%);
  animation: haze 14s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 72px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(34, 13, 10, 0.52);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  animation: rise 0.8s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 12px 28px rgba(255, 143, 67, 0.34);
  position: relative;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  background: rgba(255, 249, 239, 0.76);
  border-radius: 2px 10px 2px 10px;
  transform: rotate(45deg);
}

.brand-mark::before {
  left: 7px;
}

.brand-mark::after {
  right: 7px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  transition: transform 0.28s ease, background 0.28s ease, color 0.28s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 26px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero-copy,
.profile-shell,
.feature-card,
.ritual-card,
.invite-panel,
.command-bar {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(79, 32, 19, 0.74), rgba(31, 13, 10, 0.86));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  overflow: hidden;
  animation: rise 1s ease both;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: auto auto -55px -40px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 78, 0.25), transparent 68%);
  animation: pulseGlow 5s ease-in-out infinite;
}

.hero-copy::after {
  content: "狐";
  position: absolute;
  right: 26px;
  top: 18px;
  font-size: 76px;
  color: rgba(255, 224, 186, 0.08);
  line-height: 1;
}

.label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 179, 77, 0.12);
  color: var(--accent-2);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 0.95;
  max-width: 520px;
}

.lead {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.button,
.button-secondary {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.button {
  color: #2d1209;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 18px 34px rgba(255, 161, 67, 0.34);
}

.button-secondary {
  background: rgba(255, 249, 239, 0.05);
  border: 1px solid rgba(255, 225, 184, 0.18);
  color: var(--text);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-4px) scale(1.01);
}

.button:active,
.button-secondary:active {
  transform: translateY(-1px) scale(0.99);
}

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

.stat {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 238, 221, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 223, 188, 0.1);
  transform: translateY(0);
  animation: floatCard 5s ease-in-out infinite;
}

.stat:nth-child(2) {
  animation-delay: 0.45s;
}

.stat:nth-child(3) {
  animation-delay: 0.9s;
}

.stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: 26px;
  color: var(--accent-2);
}

.stat span {
  color: var(--muted);
  font-size: 14px;
}

.profile-shell {
  border-radius: 34px;
  overflow: visible;
  position: relative;
  animation: rise 1.05s ease both;
  animation-delay: 0.08s;
}

.profile-shell::before {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 177, 79, 0.2), transparent 68%);
  z-index: 0;
  animation: pulseGlow 4.8s ease-in-out infinite;
}

.profile-banner {
  height: 220px;
  background:
    linear-gradient(180deg, rgba(37, 13, 8, 0.16), rgba(37, 13, 8, 0.35)),
    url("../images/banner.gif") center/cover no-repeat;
  position: relative;
  overflow: hidden;
  border-radius: 34px 34px 0 0;
}

.profile-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 184, 97, 0.08), rgba(20, 9, 8, 0.42)),
    radial-gradient(circle at right, rgba(255, 213, 142, 0.18), transparent 26%);
}

.profile-content {
  position: relative;
  z-index: 1;
  padding: 0 26px 28px;
}

.avatar-wrap {
  width: 122px;
  height: 122px;
  margin-top: -61px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
  animation: avatarGlow 4.5s ease-in-out infinite;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(42, 17, 11, 0.92);
  background: #2a120b;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 18px 0 12px;
}

.profile-main h2 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1;
}

.presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffe7bd;
  font-size: 13px;
  line-height: 1;
}

.presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6dff99;
  box-shadow: 0 0 0 8px rgba(109, 255, 153, 0.12);
  animation: ping 2.2s infinite;
  flex: 0 0 9px;
}

.profile-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 3;
}

.profile-icon {
  width: 38px;
  height: 38px;
  position: relative;
  border: 1px solid rgba(255, 231, 197, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.09), rgba(255, 248, 240, 0.04));
  color: #e2e4e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: default;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(8, 8, 12, 0.14);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.profile-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 219, 168, 0.28);
  background: rgba(255, 248, 240, 0.11);
}

.profile-icon-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.profile-icon-mark svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  stroke: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-icon::before,
.profile-icon::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-icon::before {
  content: attr(data-label);
  top: calc(100% + 12px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(18, 18, 24, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.profile-icon::after {
  content: "";
  top: calc(100% + 6px);
  bottom: auto;
  width: 10px;
  height: 10px;
  background: rgba(18, 18, 24, 0.92);
  transform: translateX(-50%) rotate(45deg);
}

.profile-icon:hover::before,
.profile-icon:hover::after {
  opacity: 1;
}

.profile-icon:hover::before {
  transform: translateX(-50%) translateY(0);
}

.profile-copy {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
}

.profile-grid {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 248, 240, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 232, 199, 0.08);
}

.profile-row strong {
  color: var(--text);
  font-weight: 700;
}

.command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 26px;
  padding: 18px;
  margin-bottom: 26px;
  animation: rise 1.15s ease both;
}

.command-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 173, 78, 0.12);
  color: #ffe5bc;
  border: 1px solid rgba(255, 209, 145, 0.16);
  font-size: 14px;
}

.section {
  margin-top: 18px;
}

.section-header {
  margin-bottom: 20px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.section-title {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 46px);
}

.section-copy {
  margin-bottom: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

.feature-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: visible;
  transition: transform 0.25s ease, border-color 0.25s ease;
  animation: rise 0.9s ease both;
}

.feature-card:nth-child(2) { animation-delay: 0.08s; }
.feature-card:nth-child(3) { animation-delay: 0.16s; }
.feature-card:nth-child(4) { animation-delay: 0.24s; }
.feature-card:nth-child(5) { animation-delay: 0.32s; }
.feature-card:nth-child(6) { animation-delay: 0.40s; }

.feature-card::before {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 83, 0.18), transparent 68%);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 214, 153, 0.24);
}

.feature-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 224, 163, 0.28), rgba(255, 151, 83, 0.12));
  color: #ffd998;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.feature-card:hover .feature-icon {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(255, 159, 67, 0.18);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
  stroke: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.96;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.75;
}

.ritual-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}

.ritual-card {
  border-radius: var(--radius-xl);
  padding: 26px;
  position: relative;
  overflow: hidden;
  animation: rise 1s ease both;
}

.ritual-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 126, 0.12), transparent 72%);
}

.ritual-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.ritual-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 249, 239, 0.04);
  border: 1px solid rgba(255, 231, 197, 0.08);
}

.ritual-item strong {
  display: block;
  margin-bottom: 4px;
}

.ritual-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.ritual-num {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2d1209;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.mini-board {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mini-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 246, 233, 0.05);
  border: 1px solid rgba(255, 231, 197, 0.08);
}

.mini-panel-action {
  display: block;
  color: inherit;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.mini-panel-action:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 214, 153, 0.2);
  background: rgba(255, 246, 233, 0.07);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.mini-panel-body {
  min-width: 0;
}

.mini-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
}

.mini-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.mini-panel-action strong {
  margin-bottom: 4px;
}

.invite-panel {
  margin-top: 22px;
  border-radius: 30px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  animation: rise 1.1s ease both;
}

.invite-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 720px;
}

.footer {
  margin-top: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  animation: rise 1.2s ease both;
}

.footer a {
  color: var(--accent-2);
  transition: color 0.24s ease;
}

.footer a:hover {
  color: #fff2d1;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes avatarGlow {
  0%, 100% {
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow: 0 24px 56px rgba(255, 163, 67, 0.24);
  }
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(109, 255, 153, 0.2);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(109, 255, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(109, 255, 153, 0);
  }
}

@keyframes haze {
  from {
    opacity: 0.7;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(10px);
  }
}

@media (max-width: 1024px) {
  .hero,
  .ritual-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 18px, var(--max-width));
  }

  .topbar {
    border-radius: 26px;
    padding: 16px;
  }

  .hero-copy,
  .profile-content,
  .ritual-card,
  .invite-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-copy {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .profile-head,
  .profile-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-icons {
    margin-top: 4px;
  }

  .profile-icon::before {
    white-space: normal;
    width: max-content;
    max-width: 160px;
    text-align: center;
  }
}

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