/* ============================ MooseNet CSS3 ============================ */
/* Theme Variables */
:root {
  --bg: #0b0f0d;
  --panel: #101613;
  --ink: #e6efe9;
  --muted: #a7b5ad;
  --moss: #2d4a3a;
  --moss-2: #3a5f4b;
  --accent: #89a38f;
  --ring: #1a2a23;
  --card: #121a16;
  --brand: #cfe2d7;
  --focus: #9cc5b1;
  --link: #a0d1bd;
  --red: #ff0000;
  /* Background Images */
  --terms-bg-image: url("/web_images/terms-bg.jpg");
  --error-bg: url("/web_images/MooseNetFont_BlackBG.jpg");
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(
      1200px 600px at 70% -10%,
      #132018 0%,
      #0c1411 45%,
      var(--bg) 75%
    )
    fixed;
  color: var(--ink);
  font-family:
    "Titillium Web",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    Arial,
    sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* No-copy mode */
html.nocopy,
body.nocopy,
.nocopy .wrap {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

::selection {
  background: transparent;
}

/* Links + Images */
a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Layout */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--ring);
  background: linear-gradient(180deg, var(--panel), #0e1512);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.brand {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.brand img {
  max-height: 110px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.brand-footer .wordmark {
  max-height: 250px;
  width: auto;
  opacity: 0.5;
  margin: 0 auto;
}

/* Ticker */
.ticker {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  border-left: 1px solid var(--ring);
  padding-left: 10px;
  color: var(--muted);
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.3px;
  min-width: 0;
}

.ticker span {
  display: inline-block;
  animation: ticker 10s linear infinite;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/* Hero */
.hero {
  position: relative;
  margin-top: 22px;
  border-radius: 18px;
  padding: 48px 24px;
  text-align: center;
  border: 1px solid var(--ring);
  background: linear-gradient(
    180deg,
    rgba(25, 40, 33, 0.65),
    rgba(12, 18, 15, 0.85)
  );
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.18;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 8px 0;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: clamp(28px, 3.6vw, 46px);
}

.hero p {
  margin: 0 auto;
  color: var(--brand);
  max-width: 720px;
}

.hero-cta {
  margin-top: 14px;
}

/* Media Cards */
.media {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #0c1210;
  border: 1px solid #0b120f;
  aspect-ratio: 1 / 1;
}

.media > img.fit-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media > img.fit-contain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0e1512;
}

/* Grid + Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.card {
  background: linear-gradient(180deg, var(--card), #0e1512);
  border: 1px solid var(--ring);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.card-title {
  margin: 2px 0 8px 0;
  font-family: "Rajdhani", sans-serif;
}

.card p {
  color: var(--muted);
}

/* Buttons */
.cta {
  display: flex;
  justify-content: center;
  margin: 22px 0 8px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--ring);
  background: linear-gradient(180deg, #132019, #0d1613);
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition:
    filter 0.15s ease-out,
    transform 0.15s ease-out;
  justify-content: center;
}

.btn:hover {
  filter: brightness(1.6);
  transform: translateY(-1px);
}

.btn-active {
  filter: brightness(3.06);
}

/* Help / Join Buttons */
.help-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px 55px;
  border-radius: 10px;
  background: linear-gradient(180deg, #132019, #0d1613);
  color: var(--link);
  font-weight: 400;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    text-shadow 0.2s ease;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.help-button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  text-shadow: 0 0 6px var(--link);
}

.join-button {
  display: inline-flex;
  align-items: center;
  padding: 1px 55px;
  margin-top: 0.5rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #132019, #0d1613);
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.join-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.help {
  width: 100%;
  text-align: center;
  margin: 20px 0;
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.tier {
  background: linear-gradient(180deg, #122019, #0f1714);
  border: 1px solid var(--ring);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tier::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    500px 180px at 50% -100px,
    rgba(137, 163, 143, 0.22),
    transparent 60%
  );
}

.tier h3 {
  font-family: "Rajdhani", sans-serif;
  margin: 4px 0 6px 0;
}

.price {
  font-size: 34px;
  font-weight: 700;
  color: var(--brand);
  margin: 2px 0;
}

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

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--moss-2);
  color: #0d140f;
  font-weight: 700;
}

/* Donations */
.donos {
  text-align: center;
  margin: 22px 0;
}

.donos-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.donos-container {
  margin-top: 14px;
  text-align: center;
}

.donos-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.join-wrapper {
  text-align: center;
  margin-top: 1.5rem;
}

/* Footer */
footer {
  margin: 24px 0 16px 0;
  color: var(--muted);
  text-align: center;
}

.meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.abuse-badge {
  max-width: 100px;
  border-radius: 5px;
  border: 5px solid #111;
  padding: 5px;
  background: #ff8c00;
  box-shadow: 2px 2px 1px 1px rgba(0, 0, 0, 0.2);
  opacity: 0.8;
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================ Terms Page (FIXED + VALID) ============================ */
body.terms-page {
  background-color: var(--bg);
  background-image:
    radial-gradient(
      1200px 600px at 70% -10%,
      rgba(19, 32, 24, 0.9) 0%,
      rgba(12, 20, 17, 0.92) 45%,
      rgba(11, 15, 13, 0.95) 75%
    ),
    var(--terms-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #ffffff;
}

.page-header {
  padding: 12px 16px;
}

.page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.return-link {
  color: var(--ink);
  font-weight: 600;
}

.return-link.secondary {
  display: inline-block;
  margin-top: 8px;
}

.terms-main {
  max-width: 1100px;
  margin: 0 auto 40px auto;
  padding: 0 16px 32px 16px;
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 1.5fr);
  gap: 24px;
}

.terms-panel {
  background: rgba(0, 0, 0, 0.82);
  border-radius: 16px;
  padding: 24px 22px 26px 22px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.terms-heading h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  font-family: "Rajdhani", sans-serif;
}

.terms-intro {
  text-align: center;
  margin-top: 0;
  margin-bottom: 18px;
}

.terms-list {
  list-style: decimal;
  margin: 0 0 8px 20px;
  padding: 0;
}

.terms-list > li {
  margin-bottom: 16px;
}

.terms-list h2 {
  font-size: 1.05rem;
  margin: 0 0 4px 0;
  font-family: "Rajdhani", sans-serif;
}

.terms-list p {
  margin: 0 0 6px 0;
  font-size: 0.98rem;
}

.terms-footer {
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
}

.terms-logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.terms-logo {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* ============================ Mobile Responsive ============================ */
@media (max-width: 768px) {
  /* Header adjustments */
  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
  }

  .brand img {
    max-height: 90px;
  }

  .ticker {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--ring);
    padding-left: 0;
    padding-top: 6px;
    font-size: 0.9rem;
  }

  /* Overall wrapper */
  .wrap {
    padding: 12px;
  }

  /* Hero section */
  .hero {
    margin-top: 16px;
    padding: 32px 16px;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 12px;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-cta {
    margin-top: 16px;
  }

  /* Cards grid - stack on mobile */
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
  }

  .card {
    padding: 16px;
  }

  .card-title {
    font-size: 1.25rem;
  }

  /* Pricing grid - single column on small mobile */
  .pricing {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0;
  }

  .tier {
    padding: 16px;
  }

  /* Donations - smaller logos */
  .donos-row {
    gap: 8px;
  }

  .donos-row img {
    width: 110px;
    height: auto;
  }

  /* Buttons - better touch targets */
  .btn,
  .join-button,
  .help-button {
    padding: 12px 20px;
    font-size: 1rem;
    min-height: 44px; /* iOS touch target */
  }

  /* Footer adjustments */
  footer {
    margin-top: 20px;
    font-size: 0.9rem;
  }

  .brand-footer .wordmark {
    max-height: 200px;
  }

  /* Terms page */
  .terms-main {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 12px;
  }

  .terms-panel {
    padding: 20px 16px;
  }

  .terms-logo-section {
    display: none;
  }
}

/* Small mobile (under 480px) */
@media (max-width: 480px) {
  /* Even tighter spacing */
  .wrap {
    padding: 8px;
  }

  .hero {
    padding: 24px 12px;
  }

  .hero h1 {
    font-size: 22px;
    letter-spacing: 0.4px;
  }

  .hero p {
    font-size: 0.9rem;
  }

  /* Pricing - more compact */
  .pricing {
    gap: 10px;
  }

  .price {
    font-size: 28px;
  }

  /* Donations - stack vertically */
  .donos-row {
    flex-direction: column;
    align-items: center;
  }

  .donos-row a {
    width: 100%;
    max-width: 200px;
  }

  .donos-row img {
    width: 100%;
    max-width: 140px;
  }

  /* Card images - slightly smaller aspect */
  .card {
    padding: 14px;
  }

  /* Footer - smaller badge */
  .ipdb {
    width: 100px;
    max-width: 100px;
  }
}

/* ============================ AbuseIPDB Badge ============================ */

body.error-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background layer */
body.error-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(11, 15, 13, 0.78), rgba(11, 15, 13, 0.88)),
    var(--error-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.95) contrast(1.05);
  transform: translateZ(0);
}

/* Subtle motion overlay (no asset dependency) */
body.error-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0) 7px
  );
  opacity: 0.12;
  animation: scanlines 6s linear infinite;
}

@keyframes scanlines {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-140px);
  }
}

.error-shell {
  display: grid;
  place-items: center;
  padding: 28px 0 10px;
  min-height: calc(100vh - 220px);
}

.error-card {
  max-width: 720px;
  width: 100%;
  text-align: center;
  background: rgba(16, 22, 19, 0.78);
  border: 1px solid var(--ring);
  border-radius: 16px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.error-title {
  margin: 0 0 10px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(34px, 5vw, 58px);
}

.error-sub {
  margin: 0;
  color: var(--brand);
  font-size: 1.15rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

.error-meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  opacity: 0.85;
  word-break: break-word;
}

@media (max-width: 768px) {
  .error-shell {
    min-height: calc(100vh - 250px);
  }
}

/* ============================ AbuseIPDB Badge ============================ */
.ipdb {
  width: 120px;
  max-width: 120px;
  margin: 8px auto;

  /* Reduced borders for smaller size */
  border-top: 3px solid #058403;
  border-right: 3px solid #111;
  border-bottom: 3px solid #111;
  border-left: 3px solid #058403;
  border-radius: 4px;

  padding: 4px;
  box-shadow: 2px 2px 1px 1px rgba(0, 0, 0, 0.2);

  /* Glossy Green Gradient */
  background-color: #35c246;
  background-image: linear-gradient(
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.3) 50%,
    rgba(0, 0, 0, 0.2) 51%,
    rgba(0, 0, 0, 0)
  );
}

.ipdb img {
  display: block;
  max-width: 100%;
  height: auto;
  width: 100%;
}
