/* ==========================================================================
   Nebula — Minecraft Server Hosting · Professional design system
   Sleek modern dark UI. Sora + Inter, indigo accent, soft depth.
   (Class names kept stable so all pages inherit the new look.)
   ========================================================================== */

:root {
  /* Base */
  --bg:        #020617;
  --bg-2:      #050c1e;
  --surface:   #0e1526;
  --surface-2: #121b2f;
  --line:      rgba(255, 255, 255, 0.07);
  --line-2:    rgba(255, 255, 255, 0.13);

  /* Brand accent (cosmic indigo → blue) */
  --primary:   #2eb87a;
  --primary-2: #22a56a;
  --primary-lt:#5fe0a6;
  --primary-dk:#1d8f5c;

  /* Support */
  --amber:   #f5b942;   /* prices / highlights, sparing */
  --teal:    #34d3a6;   /* success / crossplay accents */
  --online:  #2eb87a;   /* status dots */
  --green:   #2eb87a;   /* accent (nav / eyebrow / status) */
  --green-lt:#5fe0a6;

  --text:  #e9edf6;
  --muted: #97a2b8;
  --dim:   #5e6a82;

  --font-display: 'Oxanium', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 24px 48px -30px rgba(0,0,0,.85);
  --shadow-primary: 0 12px 30px -10px rgba(46,184,122,.55);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, .font-display { font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; }
::selection { background: rgba(46,184,122,.32); color: #fff; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary), var(--primary-dk)); border-radius: 999px; border: 3px solid var(--bg-2); }

/* --------------------------------------------------------------------------
   Background — deep gradient + soft aura (no pixels, no skyline)
   -------------------------------------------------------------------------- */
.night-bg { position: fixed; inset: 0; z-index: -3; background: #020617; }
#starfield { display: none; }

/* Particles — ported from the React Bits component (raw WebGL, no `ogl` dep).
   Sits above the flat background, below all content, and never blocks clicks. */
.particles-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Above .night-bg (-3) and the hero photo (-2), still behind all content. */
  z-index: -1;
  pointer-events: none;
}
.particles-container canvas { display: block; width: 100%; height: 100%; }

/* Hero background photo — save your image at assets/img/hero-bg.jpg */
.hero-photo { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero-bg.jpg") center 30% / cover no-repeat;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.42) 0%, rgba(2,6,23,0.72) 58%, #020617 100%);
}

/* Retired blocky decorations */
.skyline, .floating-block { display: none !important; }

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--green-lt);
}
.pixel { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-weight: 500; }
.hl { color: var(--primary-lt); }
.hl-gold { color: var(--amber); }
.price { font-family: var(--font-display); font-weight: 700; color: #fff; }
.text-gradient {
  background: linear-gradient(100deg, var(--primary-lt), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --------------------------------------------------------------------------
   Buttons — clean, solid accent, subtle motion
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.5rem; border: none; border-radius: 8px; cursor: pointer;
  white-space: nowrap; transition: transform .22s ease, box-shadow .22s ease, background .22s, filter .2s, border-color .2s;
}
.btn:active { transform: translateY(0) scale(.99); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, #5fe0a6, #2eb87a 55%, #22a56a);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 18px 36px -10px rgba(46,184,122,.7); }
.btn-gold { color: #241a03; background: linear-gradient(135deg, #ffd873, #f5b942); box-shadow: 0 12px 30px -10px rgba(245,185,66,.55); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-ghost {
  color: var(--text); background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(46,184,122,.6); background: rgba(46,184,122,.08); color: #fff; }

/* --------------------------------------------------------------------------
   Cards / surfaces — soft, refined
   -------------------------------------------------------------------------- */
.panel {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), var(--shadow-md);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s;
}
.panel:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 34px 60px -34px rgba(0,0,0,.9), 0 0 0 1px rgba(46,184,122,.14);
}
.panel-flat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }

/* --------------------------------------------------------------------------
   Bits
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .42rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 500;
  color: var(--text); background: rgba(46,184,122,.09); border: 1px solid var(--line-2);
}
.badge-ram {
  display: inline-block; font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: var(--primary-lt); background: rgba(46,184,122,.12);
  border: 1px solid rgba(46,184,122,.32); border-radius: 8px; padding: .34rem .6rem; letter-spacing: .02em;
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.6)} 70%{box-shadow:0 0 0 8px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }

/* Former "grass block" → clean gradient tile (used as step markers) */
.grass-block {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(140deg, var(--primary-lt), var(--primary-2));
  box-shadow: 0 10px 22px -10px rgba(46,184,122,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
.grass-block::after { content: none; }

.icon-tile {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px;
  background: linear-gradient(150deg, rgba(46,184,122,.2), rgba(91,141,255,.08));
  border: 1px solid var(--line-2); color: var(--primary-lt);
}
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

/* --------------------------------------------------------------------------
   SpecularButton — ported from the React Bits component.
   Runs on raw WebGL2 (same shaders) so the `ogl` dependency isn't needed.
   Upgraded by initSpecularButtons() in main.js from [data-specular].
   -------------------------------------------------------------------------- */
.specular-button {
  --sb-radius: 18px;
  --sb-tint: #ffffff;
  --sb-tint-opacity: 0;
  --sb-blur: 0px;
  --sb-text-color: #f5f5f5;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  margin: 0;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--sb-text-color);
  text-decoration: none;
  white-space: nowrap;
  background: color-mix(in srgb, var(--sb-tint) calc(var(--sb-tint-opacity) * 100%), transparent);
  border-radius: var(--sb-radius);
  backdrop-filter: blur(var(--sb-blur));
  -webkit-backdrop-filter: blur(var(--sb-blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease;
}
.specular-button:active { transform: scale(0.97); }
.specular-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sb-text-color) 60%, transparent);
  outline-offset: 3px;
}
.specular-button:disabled { opacity: 0.55; cursor: default; }
.specular-button:disabled:active { transform: none; }

.specular-button--sm { font-size: 0.85rem; padding: 10px 22px; }
.specular-button--md { font-size: 1rem;    padding: 14px 30px; }
.specular-button--lg { font-size: 1.15rem; padding: 18px 40px; }

/* Canvas extends past the button so the rim glow can bleed outside the edge */
.specular-button__fx { position: absolute; inset: -20px; pointer-events: none; z-index: 1; }
.specular-button__fx canvas { display: block; width: 100%; height: 100%; }
.specular-button__label { position: relative; z-index: 2; }

/* --------------------------------------------------------------------------
   TiltedCard — ported from the React Bits component.
   Spring physics implemented directly, so the `motion` dependency isn't needed.
   Driven by initTiltedCards() in main.js from [data-tilt-card].
   -------------------------------------------------------------------------- */
.tilt-card {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  /* .panel transitions transform on hover; the tilt drives transform per-frame,
     so only the non-transform properties keep their transition. */
  transition: box-shadow 0.28s, border-color 0.28s;
}
/* Give the icon a little depth so it lifts off the card while tilting */
.tilt-card .icon-tile { transform: translateZ(28px); }

.tilt-card__caption {
  pointer-events: none;
  position: absolute;
  left: 0; top: 0;
  border-radius: 4px;
  background-color: #fff;
  padding: 4px 10px;
  font-size: 10px;
  color: #2d2d2d;
  opacity: 0;
  z-index: 3;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .tilt-card__caption { display: none; }
  .tilt-card .icon-tile { transform: none; }
}

/* --------------------------------------------------------------------------
   ScrollFloat — ported from the React Bits component to vanilla JS/CSS.
   Markup is generated by initScrollFloat() in main.js from [data-scroll-float].
   -------------------------------------------------------------------------- */
.scroll-float { overflow: hidden; }
.scroll-float-text { display: inline-block; line-height: 1.5; }
.scroll-float .char { display: inline-block; will-change: opacity, transform; }
/* The original component forces a huge display size. Kept opt-in so it can be
   applied to existing headings without blowing up the layout: add class "display". */
.scroll-float.display .scroll-float-text {
  font-size: clamp(1.6rem, 8vw, 10rem);
  font-weight: 900;
  text-align: center;
}

/* Trustpilot-style rating stars (green tile + white star) */
.tp-stars { display: inline-flex; gap: 3px; }
.tp-star { width: 20px; height: 20px; border-radius: 3px; background: #00b67a; flex: none; }
.tp-star.sm { width: 18px; height: 18px; }
.tp-star::after {
  content: ""; display: block; width: 100%; height: 100%; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.6 7-6.2-3.8-6.2 3.8 1.6-7L2 9.5l7.1-.6z'/%3E%3C/svg%3E") center / 12px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.6 7-6.2-3.8-6.2 3.8 1.6-7L2 9.5l7.1-.6z'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.nav-shell { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav-shell.scrolled { background: rgba(9,12,20,.8); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); border-bottom-color: var(--line); }
.nav-link { position: relative; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-link:hover { color: #fff; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--green), var(--green-lt)); transition: width .25s cubic-bezier(.2,.7,.2,1); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }
.mobile-menu { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.2,.7,.2,1); }
.mobile-menu.open { max-height: 460px; }

/* --------------------------------------------------------------------------
   Live server-status card
   -------------------------------------------------------------------------- */
.mc-status .motd { font-family: var(--font-mono); }
.player-head { width: 26px; height: 26px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.player-bar { height: 10px; border-radius: 999px; background: #0a1122; overflow: hidden; border: 1px solid var(--line); }
.player-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-lt)); transition: width .6s cubic-bezier(.2,.7,.2,1); }

/* --------------------------------------------------------------------------
   Console
   -------------------------------------------------------------------------- */
.console { background: #050c1e; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; font-family: var(--font-mono); box-shadow: var(--shadow-md); }
.console__bar { display: flex; align-items: center; gap: .5rem; padding: .65rem .9rem; background: rgba(255,255,255,.02); border-bottom: 1px solid var(--line); }
.console__dot { width: 11px; height: 11px; border-radius: 50%; }
.console__body { padding: .95rem 1.05rem; font-size: .8rem; line-height: 1.8; min-height: 208px; }
.c-info { color: #9aa6bd; } .c-ok { color: var(--teal); } .c-warn { color: var(--amber); }
.c-join { color: var(--primary-lt); } .c-dim { color: var(--dim); } .c-time { color: #55617a; }
.c-cursor { display: inline-block; width: 8px; height: 1em; background: var(--primary-lt); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --------------------------------------------------------------------------
   RAM slider
   -------------------------------------------------------------------------- */
.ram-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: #0a1122; border: 1px solid var(--line-2); outline: none; }
.ram-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; cursor: grab; background: linear-gradient(135deg, #5fe0a6, #2eb87a); box-shadow: 0 4px 12px -2px rgba(46,184,122,.8), 0 0 0 4px rgba(46,184,122,.18); }
.ram-range::-moz-range-thumb { width: 24px; height: 24px; border: none; border-radius: 50%; cursor: grab; background: linear-gradient(135deg, #5fe0a6, #2eb87a); box-shadow: 0 4px 12px -2px rgba(46,184,122,.8); }

/* Featured plan flag */
.popular-flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 600; font-size: .68rem; letter-spacing: .04em;
  color: #fff; background: linear-gradient(135deg, #5fe0a6, #2eb87a); padding: .35rem .8rem; border-radius: 999px;
  box-shadow: var(--shadow-primary); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { width: 100%; background: #0a1122; border: 1px solid var(--line-2); border-radius: 11px; padding: .8rem 1rem; color: var(--text); font-size: .95rem; font-family: var(--font-body); transition: border-color .2s, box-shadow .2s, background .2s; }
.field::placeholder { color: #566178; }
.field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(46,184,122,.14); }
.field:user-invalid { border-color: rgba(232,86,74,.6); }
.field-label { display: block; font-size: .84rem; font-weight: 600; color: var(--text); margin-bottom: .5rem; }
.field-error { color: #f6a49c; font-size: .78rem; margin-top: .35rem; min-height: 1rem; }

/* --------------------------------------------------------------------------
   Reveal + reduced motion
   -------------------------------------------------------------------------- */
[data-reveal], [data-reveal-item] { opacity: 1; }
.js [data-reveal], .js [data-reveal-item] { opacity: 0; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes spinblock { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .night-bg::after, .pulse-dot, .c-cursor { animation: none !important; }
  .js [data-reveal], .js [data-reveal-item] { opacity: 1 !important; transform: none !important; }
  * { transition-duration: .001ms !important; }
}
