/* Palworld Operator landing — world-keeper theme (original art) */

:root {
  --sky: #5eb8d4;
  --sky-deep: #1a6f78;
  --teal: #2aa8a0;
  --teal-bright: #5ed4c8;
  --grass: #4cb85a;
  --grass-deep: #2d6a40;
  --sun: #ffd56a;
  --amber: #e8a030;
  --coral: #f07848;
  --sand: #fff3d6;
  --ink: #1c2e28;
  --ink-muted: #3d554c;
  --paper: #f2f7f4;
  --line: rgba(28, 46, 40, 0.12);

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;

  --radius: 0.7rem;
  --space: clamp(1rem, 3vw, 2rem);
  --wrap: 68rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sky-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--grass-deep);
}

code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: rgba(42, 168, 160, 0.14);
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sand);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(100% - 2 * var(--space), var(--wrap));
  margin-inline: auto;
}

.wrap--readable {
  width: min(100% - 2 * var(--space), 44rem);
}

/* ——— Hero: full-bleed world-keeper art ——— */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--ink);
  background: #3a9ab0;
}

.hero__media {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 42%;
  transform: scale(1.06);
  animation: ken-drift 28s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(28, 70, 72, 0.72) 0%,
      rgba(28, 70, 72, 0.48) 34%,
      rgba(20, 50, 55, 0.18) 58%,
      rgba(20, 50, 55, 0.08) 100%
    ),
    linear-gradient(
      180deg,
      rgba(20, 50, 55, 0.15) 0%,
      transparent 28%,
      rgba(20, 45, 48, 0.35) 78%,
      rgba(18, 40, 42, 0.55) 100%
    );
}

.hero__spark {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 28%, rgba(255, 243, 214, 0.55) 0 1.5px, transparent 3px),
    radial-gradient(circle at 42% 18%, rgba(255, 213, 106, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 55%, rgba(94, 212, 200, 0.45) 0 1.5px, transparent 3px),
    radial-gradient(circle at 12% 72%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px);
  opacity: 0.7;
  animation: spark-drift 22s linear infinite;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--space), 36rem);
  margin: 0 auto clamp(2.25rem, 7vh, 4.5rem);
  padding: clamp(1.25rem, 3vw, 2rem) 0 0;
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  margin: 0 0 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.15rem, 6.5vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--sand);
  text-shadow:
    0 2px 0 rgba(18, 40, 42, 0.25),
    0 8px 28px rgba(18, 40, 42, 0.45);
}

.brand__by {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 243, 214, 0.78);
}

.hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.15;
  color: #fffaf0;
  max-width: 16ch;
  text-shadow: 0 2px 16px rgba(18, 40, 42, 0.45);
}

.hero__lede {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 600;
  color: rgba(255, 243, 214, 0.9);
  max-width: 36ch;
}

.hero__lede code {
  background: rgba(255, 243, 214, 0.2);
  color: #fffaf0;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 2.5px solid transparent;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn--primary {
  background: var(--sand);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(18, 40, 42, 0.35);
}

.btn--primary:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(18, 40, 42, 0.3);
  background: #fffaf0;
}

.btn--primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(18, 40, 42, 0.35);
}

.btn--ghost {
  background: rgba(18, 40, 42, 0.28);
  color: var(--sand);
  border-color: rgba(255, 243, 214, 0.45);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  color: var(--sand);
  background: rgba(18, 40, 42, 0.45);
  border-color: var(--sand);
  transform: translateY(-2px);
}

/* ——— Motion ——— */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ken-drift {
  from {
    transform: scale(1.06) translate(0, 0);
  }
  to {
    transform: scale(1.12) translate(-1.2%, 1%);
  }
}

@keyframes spark-drift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
  to {
    background-position: 36px -18px, -28px 14px, 20px 24px, -14px -10px;
  }
}

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

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.75;
  }
}

.divider__orbs {
  animation: orb-bob 5.5s ease-in-out infinite;
}

.divider__glow {
  animation: glow-pulse 7s ease-in-out infinite;
}

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

  .hero__photo {
    transform: none;
  }
}

/* ——— Wave + divider ——— */

.wave {
  position: relative;
  z-index: 3;
  margin-top: -1px;
  line-height: 0;
  background: transparent;
}

.wave svg {
  width: 100%;
  height: clamp(2.5rem, 6vw, 5rem);
}

.divider {
  line-height: 0;
  overflow: hidden;
}

.divider__scene {
  width: 100%;
  height: clamp(4.5rem, 11vw, 8rem);
}

/* ——— Sections ——— */

.section {
  padding: clamp(3.25rem, 9vw, 5.5rem) 0;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 3.8vw, 2.55rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section__lede {
  margin: 0 0 2rem;
  color: var(--ink-muted);
  font-size: 1.08rem;
  font-weight: 600;
  max-width: 38ch;
}

.section__lede--wide {
  max-width: 52ch;
}

.section__intro {
  margin-bottom: 0.5rem;
}

.section--local {
  background:
    radial-gradient(ellipse 50% 40% at 10% 20%, rgba(232, 160, 48, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 50% at 90% 80%, rgba(42, 168, 160, 0.1), transparent 50%),
    var(--sand);
}

.section--promise {
  background:
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(94, 212, 200, 0.2), transparent 55%),
    var(--paper);
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.pillars__item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.pillars__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pillars h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sky-deep);
}

.pillars p {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 500;
  max-width: 42ch;
}

.section--how {
  background: linear-gradient(180deg, #e8f4ec 0%, var(--paper) 100%);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.steps__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.steps__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.steps__icon {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}

.steps__icon svg {
  width: 100%;
  height: 100%;
}

.steps h3 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 500;
}

.section__cta {
  margin: 2rem 0 0;
  font-weight: 800;
}

.section--connect {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(94, 212, 200, 0.22), transparent 55%),
    linear-gradient(180deg, #eef6f2 0%, var(--paper) 100%);
}

.subhead {
  margin: 2rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.subhead:first-of-type {
  margin-top: 0.5rem;
}

.guide {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.guide li {
  margin-bottom: 0.45rem;
}

.guide strong {
  color: var(--ink);
  font-weight: 800;
}

.codeblock {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: #1c2e28;
  color: #e8f4ec;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.45;
}

.codeblock code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.ports {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.ports li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.ports li:first-child {
  border-top: 1px solid var(--line);
}

.ports--passwords li {
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
}

.ports__label {
  font-weight: 800;
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.92rem;
}

.ports__value {
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sky-deep);
}

.ports--passwords .ports__value {
  font-family: var(--font-body);
  font-weight: 600;
}

.section--connect > .wrap > p {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.fineprint {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.45;
  font-weight: 500;
}

/* ——— Footer ——— */

.footer {
  padding: 2.5rem 0 3rem;
  background: var(--ink);
  color: rgba(255, 243, 214, 0.78);
  font-size: 0.925rem;
}

.footer a {
  color: var(--sun);
}

.footer a:hover {
  color: var(--sand);
}

.footer__grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: minmax(10rem, 16rem) 1fr;
    gap: 3rem;
  }

  .steps,
  .pillars {
    max-width: 44rem;
  }

  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .pillars__item {
    border-bottom: 0;
    padding-bottom: 0;
    padding-right: 0.5rem;
  }
}

.footer__brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--sand);
}

.footer p {
  margin: 0 0 0.65rem;
}

.footer .fineprint {
  color: rgba(255, 243, 214, 0.48);
}

/* ——— Responsive ——— */

@media (max-width: 640px) {
  .hero__photo {
    object-position: 70% 38%;
  }

  .hero__veil {
    background:
      linear-gradient(
        180deg,
        rgba(28, 70, 72, 0.55) 0%,
        rgba(28, 70, 72, 0.35) 40%,
        rgba(18, 40, 42, 0.62) 100%
      );
  }

  .hero__content {
    margin-bottom: clamp(1.35rem, 4vh, 2.25rem);
  }

  .steps__icon {
    width: 3rem;
    height: 3rem;
  }

  .ports li {
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-start;
  }
}

@media (min-width: 900px) {
  .hero {
    align-items: center;
  }

  .hero__content {
    margin: 0;
    margin-left: max(var(--space), calc((100% - var(--wrap)) / 2));
    padding-bottom: 2rem;
  }

  .hero__photo {
    object-position: 68% 40%;
  }
}
