:root {
  --bg: #0b090a;
  --surface: #151013;
  --elevated: #1e1619;
  --fg: #f6efe9;
  --muted: #a39690;
  --berry: #e11d48;
  --berry-deep: #be123c;
  --berry-fg: #fff7f8;
  --live: #7dd3c7;
  --border: #2c2426;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 0 0 1px rgba(246, 239, 233, 0.08);
  --shadow-hover: 0 0 0 1px rgba(246, 239, 233, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --text-display: clamp(2.6rem, 1.1rem + 6.4vw, 6.25rem);
  --text-title: clamp(1.7rem, 1.15rem + 2.1vw, 2.85rem);
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
}

img {
  max-width: 100%;
  display: block;
  outline: 1px solid rgba(246, 239, 233, 0.1);
  outline-offset: -1px;
}

h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

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

button, [role="button"] { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 80;
  background: var(--live);
  color: var(--bg);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.site-header.is-scrolled,
.site-header.is-open {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: var(--shadow);
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
}
.wordmark svg { color: var(--berry); }
.wordmark span { color: var(--muted); margin-left: 0.35rem; font-weight: 600; }

.nav-desk {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
.nav-desk a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 150ms;
}
.nav-desk a:hover { color: var(--fg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status {
  display: none;
  height: 2.25rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: var(--elevated);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.live-dot, .offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.live-dot {
  background: var(--live);
  animation: pulse 2.4s ease-out infinite;
}
.offline-dot { background: var(--muted); }
.status.is-online { color: var(--live); }

.icon-btn, .menu-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 0;
  background: transparent;
  color: var(--fg);
}
.menu-btn { border: 1px solid var(--border); }
.icon-btn { display: none; }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 1rem 1.25rem 1.25rem;
}
.nav-mobile.is-open { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-mobile a {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  transition: transform 150ms var(--ease), background-color 150ms, box-shadow 150ms;
}
.btn:active { transform: scale(0.96); }
.btn-berry { background: var(--berry); color: var(--berry-fg); }
.btn-berry:hover { background: var(--berry-deep); }
.btn-ghost {
  background: var(--elevated);
  color: var(--fg);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { box-shadow: var(--shadow-hover); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
}
.hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: kenburns 48s var(--ease) alternate infinite;
  transform-origin: 62% 58%;
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-wash-m {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg), color-mix(in srgb, var(--bg) 65%, transparent) 55%, color-mix(in srgb, var(--bg) 25%, transparent));
}
.hero-wash-d { display: none; }
.hero-inner {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 7rem 0 4rem;
}
.hero .live { color: var(--live); }
.hero h1 {
  margin-top: 1rem;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 0.92;
}
.hero h1 .berry { color: var(--berry); }
.hero h1 small {
  display: block;
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero p.lead {
  margin-top: 1.5rem;
  max-width: 28rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stagger-in > * { animation: rise 0.7s var(--ease) both; }
.stagger-in > *:nth-child(1) { animation-delay: 40ms; }
.stagger-in > *:nth-child(2) { animation-delay: 120ms; }
.stagger-in > *:nth-child(3) { animation-delay: 200ms; }
.stagger-in > *:nth-child(4) { animation-delay: 280ms; }

section { padding: 5rem 0; }
.band { background: var(--surface); border-top: 1px solid var(--border); }
.title { font-size: var(--text-title); font-weight: 600; margin-top: 0.75rem; }

.join-grid, .why-grid {
  display: grid;
  gap: 2.5rem;
}
.seg {
  display: inline-flex;
  padding: 0.25rem;
  margin-top: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow);
}
.seg button {
  height: 2.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
}
.seg button.is-on { background: var(--elevated); color: var(--fg); }

.copy-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.copy-btn {
  width: 100%;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--elevated);
  color: var(--fg);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.copy-btn svg { width: 1rem; height: 1rem; color: var(--muted); flex-shrink: 0; }
.port-hint { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

.steps { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.steps li {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  background: var(--bg);
  box-shadow: var(--shadow);
}
.steps .n { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; color: var(--berry); }
.steps h3 { font-size: 1.125rem; }
.steps p { margin-top: 0.25rem; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }

.dest-grid, .plugin-grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.dest {
  display: block;
  border-radius: 36px;
  background: var(--surface);
  padding: 0.5rem;
  box-shadow: var(--shadow);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.dest:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.dest-img { position: relative; overflow: hidden; border-radius: var(--radius-xl); }
.dest-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 500ms var(--ease); }
.dest:hover .dest-img img { transform: scale(1.03); }
.dest-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 80%, transparent), transparent);
}
.dest-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1rem;
}
.dest .kicker { color: var(--berry); }
.dest h3 { margin-top: 0.5rem; font-size: 1.5rem; }
.dest p { margin-top: 0.25rem; max-width: 24rem; font-size: 0.9rem; color: var(--muted); }
.dest-go {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--elevated);
}

.plugin-grid { grid-template-columns: 1fr 1fr; }
.card, .hl {
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card { background: var(--bg); }
.hl { background: var(--surface); display: flex; gap: 1rem; }
.ico {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--elevated);
  color: var(--berry);
}
.card h3, .hl h3 { margin-top: 0; font-size: 1.125rem; }
.card h3 { margin-top: 1.25rem; }
.card p, .hl p { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }

.berry-photo { overflow: hidden; border-radius: 36px; }
.berry-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.discord-band {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  border-radius: 36px;
  background: var(--elevated);
  box-shadow: var(--shadow);
}
.discord-band h2 { font-size: 1.5rem; }
.discord-band p { margin-top: 0.5rem; max-width: 28rem; font-size: 0.9rem; color: var(--muted); }
.discord-actions { display: flex; flex-direction: column; gap: 0.75rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-brand p { font-size: 0.9rem; color: var(--muted); }

.page-main { padding: 7rem 0 5rem; }
.page-grid { display: grid; gap: 2.5rem; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.back:hover { color: var(--fg); }
.dl-list { display: grid; gap: 1rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.dl-list li {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.dl-list .meta { margin-top: 0.25rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.aside {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
}
.aside img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.aside .cap {
  position: absolute;
  inset: auto 0 0;
  padding: 1.5rem;
  background: linear-gradient(to top, var(--bg), color-mix(in srgb, var(--bg) 70%, transparent), transparent);
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 211, 199, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(125, 211, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 211, 199, 0); }
}

@media (min-width: 640px) {
  .status { display: inline-flex; }
  .icon-btn { display: inline-flex; }
  .hero-actions, .copy-row, .discord-actions { flex-direction: row; align-items: center; }
  .copy-btn { width: auto; min-width: 20rem; }
  .dl-list li { flex-direction: row; align-items: center; justify-content: space-between; }
  .berry-photo img { aspect-ratio: 4 / 5; }
}

@media (min-width: 768px) {
  .nav-desk { display: flex; }
  .menu-btn, .nav-mobile { display: none !important; }
}

@media (min-width: 1024px) {
  .hero img.bg,
  .hero-media { object-position: right center; }
  .hero-wash-m { display: none; }
  .hero-wash-d {
    display: block;
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to right, var(--bg), color-mix(in srgb, var(--bg) 75%, transparent) 55%, transparent),
      linear-gradient(to top, var(--bg), transparent 40%, color-mix(in srgb, var(--bg) 40%, transparent));
  }
  .hero-inner { justify-content: center; padding-bottom: 0; }
  .join-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .dest-grid { grid-template-columns: 1fr 1fr; }
  .plugin-grid { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .discord-band, .footer-inner, .page-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .page-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .aside { position: sticky; top: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero img.bg, .stagger-in > *, .live-dot {
    animation: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-media { display: none; }
  .grain { display: none; }
}
