:root {
  --bg: #050b12;
  --bg-soft: #09131f;
  --panel: rgba(12, 25, 39, 0.82);
  --panel-strong: #0d1c2c;
  --line: rgba(174, 222, 255, 0.14);
  --line-bright: rgba(174, 222, 255, 0.28);
  --text: #f4f9fc;
  --muted: #9cb1c3;
  --sky: #61d6ff;
  --sky-strong: #17bfff;
  --mint: #7cf0cf;
  --gold: #ffc95f;
  --pink: #ff7fc4;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  --radius-lg: 30px;
  --radius-md: 20px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(23, 191, 255, 0.11), transparent 26rem),
    radial-gradient(circle at 88% 40%, rgba(124, 240, 207, 0.07), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

::selection { color: #041019; background: var(--sky); }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: #041019;
  background: var(--sky);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  transition: padding 180ms ease, background 180ms ease, border-color 180ms ease;
}
.site-header.scrolled {
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 11, 18, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(100%, 1280px);
  min-height: 58px;
  margin-inline: auto;
  padding: 0.45rem 0.55rem 0.45rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(5, 11, 18, 0.58);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.site-header.scrolled .header-inner {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.brand { display: inline-flex; align-items: center; gap: 0.72rem; }
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 214, 255, 0.35);
  border-radius: 13px;
  color: #021019;
  background: linear-gradient(135deg, #b9f0ff, var(--sky));
  box-shadow: 0 0 24px rgba(23, 191, 255, 0.2);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy strong { font-size: 0.98rem; letter-spacing: 0.01em; }
.brand-copy small { margin-top: 0.22rem; color: var(--muted); font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 1.8rem; color: #d9e6ef; font-size: 0.88rem; }
.site-nav a { position: relative; }
.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.5rem;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--sky);
  transform: scaleX(0);
  transition: transform 180ms ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }
.header-action {
  padding: 0.68rem 1rem;
  border: 1px solid rgba(97, 214, 255, 0.28);
  border-radius: 12px;
  color: #dff7ff;
  background: rgba(97, 214, 255, 0.09);
  font-size: 0.82rem;
  font-weight: 750;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.header-action:hover { border-color: var(--sky); background: rgba(97, 214, 255, 0.16); transform: translateY(-1px); }

.hero {
  position: relative;
  min-height: 720px;
  height: 82svh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero-media, .hero-shade, .hero-grid { position: absolute; inset: 0; }
.hero-media {
  z-index: -4;
  background-image: url("assets/palworld-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.025);
  animation: hero-in 1.5s ease-out both;
}
.hero-shade {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(2, 8, 14, 0.94) 0%, rgba(3, 11, 18, 0.78) 37%, rgba(3, 11, 18, 0.24) 66%, rgba(3, 11, 18, 0.48) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(5, 11, 18, 0.28) 22%, rgba(5, 11, 18, 0.08) 62%, rgba(5, 11, 18, 0.52) 100%);
}
.hero-grid {
  z-index: -2;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(123, 206, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 206, 255, 0.13) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(90deg, black, transparent 65%);
  mask-image: linear-gradient(90deg, black, transparent 65%);
}
.hero-content { padding-top: 7.5rem; }
.hero-content > * { max-width: 670px; }
.eyebrow, .kicker {
  margin: 0 0 1rem;
  color: var(--sky);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 0.7rem; }
.eyebrow span { width: 29px; height: 1px; background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.palworld-logo { width: min(480px, 86vw); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45)); }
.server-name {
  margin: -0.25rem 0 1.2rem;
  color: var(--gold);
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  font-weight: 1000;
  letter-spacing: 0.42em;
  text-shadow: 0 0 25px rgba(255, 201, 95, 0.28);
}
.hero-copy {
  margin: 1.5rem 0 0;
  color: #d0dde7;
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.75;
}
.hero-actions, .community-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.button {
  min-height: 50px;
  padding: 0.78rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 820;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.button svg { width: 19px; height: 19px; }
.button-primary {
  color: #031018;
  background: linear-gradient(135deg, #b5efff, var(--sky));
  box-shadow: 0 10px 32px rgba(23, 191, 255, 0.22);
}
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(23, 191, 255, 0.32); }
.button-secondary {
  color: #eef9ff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(7, 18, 28, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.button-secondary:hover { transform: translateY(-2px); border-color: rgba(97, 214, 255, 0.48); background: rgba(15, 34, 50, 0.72); }
.hero-facts {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.hero-facts span {
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #bfd0dc;
  background: rgba(4, 12, 19, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
}
.hero-facts strong { margin-right: 0.15rem; color: white; }
.scroll-cue {
  position: absolute;
  right: 50%;
  bottom: 2rem;
  width: 28px;
  height: 46px;
  display: grid;
  place-items: start center;
  padding-top: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transform: translateX(50%);
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 999px; background: var(--sky); animation: scroll-cue 1.6s ease-in-out infinite; }

.section { padding: clamp(5rem, 10vw, 8rem) 0; }
.join-section { position: relative; }
.join-section::before {
  content: "";
  position: absolute;
  top: 8%;
  left: -12rem;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: rgba(23, 191, 255, 0.07);
  filter: blur(80px);
  pointer-events: none;
}
.join-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 1.25rem 4rem;
  align-items: center;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.7vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section-heading > p:last-child { max-width: 650px; margin: 1.2rem 0 0; color: var(--muted); font-size: 1.02rem; }
.section-heading.centred { max-width: 760px; margin: 0 auto 3.2rem; text-align: center; }
.section-heading.centred > p:last-child { margin-inline: auto; }
.connect-card {
  position: relative;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(97, 214, 255, 0.1), transparent 42%),
    rgba(10, 22, 34, 0.84);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.connect-card::after {
  content: "";
  position: absolute;
  top: -10rem;
  right: -8rem;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(97, 214, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(97, 214, 255, 0.025), 0 0 0 84px rgba(97, 214, 255, 0.018);
  pointer-events: none;
}
.hero-connect-card {
  max-width: 700px;
  margin-top: 1.5rem;
  padding: 1.15rem 1.3rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(97, 214, 255, 0.14), transparent 50%),
    rgba(5, 14, 23, 0.76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.hero-connect-card .address-row { margin-top: 0.7rem; }
.hero-connect-card .address-row code { font-size: clamp(1.05rem, 2vw, 1.45rem); }
.connect-hint {
  position: relative;
  z-index: 1;
  margin: 0.7rem 0 0;
  color: #b8cad7;
  font-size: 0.82rem;
  line-height: 1.5;
}
.connect-topline { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(124, 240, 207, 0.4); animation: pulse 2s infinite; }
.address-row { position: relative; z-index: 1; margin-top: 1rem; display: flex; align-items: center; gap: 1rem; }
.address-row code { min-width: 0; color: white; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: clamp(1.1rem, 2.3vw, 1.65rem); font-weight: 800; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.icon-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 214, 255, 0.26);
  border-radius: 13px;
  color: var(--sky);
  background: rgba(97, 214, 255, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.icon-button:hover { transform: translateY(-2px); background: rgba(97, 214, 255, 0.15); }
.icon-button svg { width: 21px; height: 21px; }
.steps { grid-column: 1 / -1; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; list-style: none; }
.steps li { padding: 1.2rem; display: flex; gap: 1rem; border-top: 1px solid var(--line); }
.steps li > span { color: var(--sky); font-family: ui-monospace, monospace; font-size: 0.78rem; font-weight: 850; }
.steps strong { display: block; margin-bottom: 0.2rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.85rem; }

.gallery-strip {
  width: min(calc(100% - 2rem), 1480px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 0.75rem;
}
.gallery-panel {
  position: relative;
  min-height: 360px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel-strong);
}
.gallery-panel img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(.2,.8,.2,1); }
.gallery-panel:hover img { transform: scale(1.045); }
.gallery-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 9, 15, 0.9), transparent 58%); }
.gallery-panel figcaption { position: absolute; z-index: 2; right: 1.35rem; bottom: 1.2rem; left: 1.35rem; font-weight: 750; }
.gallery-panel figcaption span { display: block; margin-bottom: 0.2rem; color: var(--sky); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; }

.settings-section { position: relative; }
.settings-section::before {
  content: "";
  position: absolute;
  inset: 10% 0 auto;
  height: 45rem;
  z-index: -1;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(97, 214, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 214, 255, 0.1) 1px, transparent 1px);
  background-size: 70px 70px;
  -webkit-mask-image: radial-gradient(circle, black, transparent 70%);
  mask-image: radial-gradient(circle, black, transparent 70%);
}
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.setting-card {
  position: relative;
  min-height: 280px;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(14, 29, 44, 0.92), rgba(8, 18, 29, 0.88));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.setting-card:hover { transform: translateY(-5px); border-color: rgba(97, 214, 255, 0.35); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22); }
.setting-card.featured { background: linear-gradient(145deg, rgba(17, 48, 65, 0.96), rgba(8, 23, 35, 0.92)); }
.setting-card.featured::after {
  content: "";
  position: absolute;
  top: -5rem;
  right: -5rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: rgba(97, 214, 255, 0.17);
  filter: blur(35px);
}
.setting-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 214, 255, 0.24);
  border-radius: 12px;
  color: var(--sky);
  background: rgba(97, 214, 255, 0.08);
}
.setting-icon svg { width: 22px; height: 22px; }
.setting-value { margin: 1.25rem 0 0; color: white; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 950; line-height: 1; letter-spacing: -0.06em; }
.setting-card h3 { margin: 0.75rem 0 0; font-size: 1.06rem; }
.setting-card > p:last-child { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.65; }
.community-section {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.community-background, .community-overlay { position: absolute; inset: 0; }
.community-background { z-index: -3; background: url("assets/palworld-keyart.png") center 38% / cover no-repeat; transform: scale(1.04); }
.community-overlay { z-index: -2; background: linear-gradient(90deg, rgba(4, 11, 18, 0.97) 0%, rgba(4, 11, 18, 0.85) 44%, rgba(4, 11, 18, 0.38) 76%, rgba(4, 11, 18, 0.72) 100%), linear-gradient(0deg, var(--bg), transparent 28%, transparent 74%, var(--bg)); }
.community-content { padding-block: 4rem; }
.community-content h2 { max-width: 730px; margin: 0; font-size: clamp(2.5rem, 5.5vw, 4.7rem); line-height: 1.02; letter-spacing: -0.055em; }
.community-content > p:not(.kicker) { max-width: 650px; margin: 1.4rem 0 0; color: #d4e1e9; font-size: 1.06rem; }
.community-content strong { color: white; }

.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); background: #03080d; }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.footer-brand > div { display: grid; line-height: 1.2; }
.footer-brand span:not(.brand-mark) { color: var(--muted); font-size: 0.72rem; }
.legal, .copyright { margin: 0; color: #6f8495; font-size: 0.72rem; }
.copyright { white-space: nowrap; }

.toast {
  position: fixed;
  z-index: 100;
  right: 1.2rem;
  bottom: 1.2rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(124, 240, 207, 0.26);
  border-radius: 12px;
  color: #dffff6;
  background: rgba(6, 25, 27, 0.92);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes hero-in { from { opacity: 0; transform: scale(1.09); } to { opacity: 1; transform: scale(1.025); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(124, 240, 207, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 240, 207, 0); } }
@keyframes scroll-cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(17px); } }

@media (max-width: 980px) {
  .site-nav { display: none; }
  .join-layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery-strip { grid-template-columns: 1fr 1fr; }
  .gallery-panel-wide { grid-column: 1 / -1; }
  .gallery-panel { min-height: 320px; }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; }
  .legal { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 660px) {
  .site-header { padding: 0.65rem; }
  .header-inner { min-height: 54px; border-radius: 15px; }
  .brand-mark { width: 39px; height: 39px; }
  .header-action { padding: 0.62rem 0.78rem; font-size: 0.75rem; }
  .hero { min-height: 760px; height: auto; }
  .hero-media { background-position: 61% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(2, 8, 14, 0.95), rgba(2, 8, 14, 0.6)), linear-gradient(0deg, var(--bg), transparent 38%, rgba(4, 10, 17, 0.45)); }
  .hero-content { padding: 7rem 0 4.5rem; }
  .server-name { letter-spacing: 0.26em; }
  .button { width: 100%; }
  .hero-facts { gap: 0.45rem; }
  .hero-facts span { font-size: 0.71rem; }
  .scroll-cue { display: none; }
  .section { padding-block: 4.5rem; }
  .connect-card { border-radius: 22px; }
  .hero-connect-card { padding: 1rem; }
  .hero-connect-card .address-row code { font-size: 0.96rem; }
  .connect-hint { font-size: 0.76rem; }
  .address-row { align-items: start; }
  .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .gallery-strip { grid-template-columns: 1fr; }
  .gallery-panel-wide { grid-column: auto; }
  .gallery-panel { min-height: 280px; }
  .settings-grid { grid-template-columns: 1fr; }
  .setting-card { min-height: 245px; }
  .community-section { min-height: 650px; }
  .community-background { background-position: 45% center; }
  .community-overlay { background: linear-gradient(90deg, rgba(4, 11, 18, 0.95), rgba(4, 11, 18, 0.65)), linear-gradient(0deg, var(--bg), transparent 28%, var(--bg)); }
  .footer-inner { grid-template-columns: 1fr; }
  .legal, .copyright { grid-column: auto; grid-row: auto; }
  .toast { right: 0.8rem; bottom: 0.8rem; left: 0.8rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
