/* ==========================================================================
   Treasure Goblins — treasuregoblinsgame.com
   Palette pulled from the game art: ink navy, hood teal, ember/sunset, gold.
   Hand-drawn / toon-shaded look: flat fills, dark outlines, wobbly borders,
   chunky offset shadows.
   ========================================================================== */

:root {
  --ink: #0b1820;        /* deepest background (goblin face navy) */
  --ink-2: #10222e;      /* section background */
  --panel: #14293a;      /* card background */
  --line: rgba(233, 240, 234, 0.14);
  --outline: #061017;    /* toon outline color */

  --teal: #46b98c;       /* hood trim / echolocation rings */
  --teal-soft: #79b98a;  /* goblin ears */
  --mint: #9fe3b0;

  --gold: #ffd35c;       /* star eyes / coins */
  --gold-deep: #e0a33e;
  --parchment: #ecd9a8;  /* logo lettering */

  --ember: #c9603a;      /* sunset icon background */
  --rust: #8e3b2c;

  --text: #e9f0ea;
  --muted: #a4b8b0;

  /* Chunky hand-lettered display font to match the capsule art.
     Playful alternatives on Google Fonts: "Titan One", "Lilita One", "Chewy" —
     swap the name here and in the <link> tag in index.html. */
  --font-display: "Luckiest Guy", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1100px;

  /* Wobbly "hand-drawn" corner shapes */
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-alt: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --wobble-blob: 49% 51% 48% 52% / 51% 49% 52% 48%;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle paper grain over everything — hand-painted feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ------------------------------- Buttons ------------------------------- */
/* Square-ish, wobbly-edged, flat fill + dark outline + offset shadow */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--wobble);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background-color 0.15s ease;
}
.btn-icon { width: 1.25em; height: 1.25em; flex: none; }

.btn-primary {
  background: var(--gold);
  color: #2a1c08;
  border: 3px solid var(--outline);
  box-shadow: 4px 4px 0 rgba(6, 16, 23, 0.55);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translate(-2px, -2px) rotate(-0.5deg);
  box-shadow: 7px 7px 0 rgba(6, 16, 23, 0.55);
  background: #ffdd7a;
}

.btn-discord {
  background: #5865f2; /* Discord blurple */
  color: #fff;
  border: 3px solid var(--outline);
  box-shadow: 4px 4px 0 rgba(6, 16, 23, 0.55);
}
.btn-discord:hover,
.btn-discord:focus-visible {
  transform: translate(-2px, -2px) rotate(-0.5deg);
  box-shadow: 7px 7px 0 rgba(6, 16, 23, 0.55);
  background: #6b76f4;
}

.btn-ghost {
  color: var(--parchment);
  background: transparent;
  border: 3px solid rgba(236, 217, 168, 0.55);
  border-radius: var(--wobble-alt);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  transform: translate(-2px, -2px) rotate(0.5deg);
  border-color: var(--parchment);
  background: rgba(236, 217, 168, 0.08);
  box-shadow: 5px 5px 0 rgba(6, 16, 23, 0.45);
}

.btn-small { padding: 0.45rem 1.05rem; font-size: 0.9rem; border-width: 2.5px; }
.btn-large { padding: 0.95rem 2.1rem; font-size: 1.1rem; }

/* -------------------------------- Header ------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 0.85rem 0;
  transition: background-color 0.2s ease, border-color 0.2s ease,
              padding 0.2s ease;
  border-bottom: 2px solid transparent;
}
.site-header.is-scrolled {
  background: var(--ink);
  border-bottom-color: var(--line);
  padding: 0.55rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--parchment);
  margin-right: auto;
}
.brand-mark { width: 2.2rem; height: 2.2rem; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold);
  text-decoration: underline wavy;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* --------------------------------- Hero -------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(92vh, 60rem);
  padding: 8rem 0 7rem;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(58% 48% at 50% 108%, rgba(201, 96, 58, 0.42), transparent 70%),
    radial-gradient(42% 36% at 50% 112%, rgba(255, 211, 92, 0.22), transparent 70%),
    linear-gradient(180deg, #081119 0%, var(--ink) 55%, #142c34 100%);
}

/* Echolocation rings rising from the horizon — slightly lopsided, painted */
.echo {
  position: absolute;
  bottom: -14vmin;
  left: 50%;
  width: 60vmax;
  height: 60vmax;
  border-radius: var(--wobble-blob);
  border: 3px solid rgba(70, 185, 140, 0.5);
  transform: translateX(-50%) scale(0.2);
  opacity: 0;
  animation: echo-ring 12s ease-out infinite;
}
.echo-2 { animation-delay: 4s; border-color: rgba(159, 227, 176, 0.4); }
.echo-3 { animation-delay: 8s; border-color: rgba(70, 185, 140, 0.32); }

/* Grows until the ring's edge is past every corner of the viewport
   (final radius ≈ 102vmax), staying visible the whole way out. */
@keyframes echo-ring {
  0%   { transform: translateX(-50%) scale(0.15) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.7; }
  80%  { opacity: 0.45; }
  100% { transform: translateX(-50%) scale(3.4) rotate(10deg); opacity: 0; }
}

/* Goblin silhouettes, briefly "revealed" each time an echo ring sweeps past.
   Each goblin is two stacked layers on the same square canvas:
   - .lurker / .lurker2: the full silhouette PNG (layers kept distinct),
     washed in slate blue by its ::after.
   - .lurker-eyes / .lurker2-eyes: just the eyes, unwashed + bloomed, on a
     slower fade so they keep glowing after the body has melted back into
     the dark. */
.lurker,
.lurker-eyes,
.lurker2,
.lurker2-eyes {
  --lurker-w: clamp(70px, 7.5vw, 110px);                   /* goblin 1 size */
  --lurker-ground: calc(clamp(3rem, 9vw, 7.5rem) * 0.42); /* the hills' ridge */
  position: absolute;
  z-index: 1;
  aspect-ratio: 1 / 1;
  opacity: 0;
  /* Rings launch every 4s (12s loop ÷ 3 rings); pulse on the same beat,
     delayed so the flash lands as a ring passes over this spot (a ring's
     edge reaches here ~2.6s into its ease-out growth). */
  animation: lurker-pulse 4s linear 2.6s infinite;
}
.lurker,
.lurker-eyes {
  left: 19%;
  bottom: var(--lurker-ground);
  width: var(--lurker-w);
}
/* Goblin 2: 1300x1300 source at the same pixels-per-source-pixel as
   goblin 1 (1.27x), then scaled up a further 30% (× 1.3 = 1.651) since its
   goblin occupies a smaller portion of the canvas. Feet sit at 1122/1300
   in the image vs goblin 1's 857/1024, so the bottom offset compensates to
   land both on the same ground line. It's farther from the ring center,
   so its flash arrives a beat later. */
.lurker2,
.lurker2-eyes {
  left: 8%;
  bottom: calc(var(--lurker-ground) - 0.063 * var(--lurker-w));
  width: calc(var(--lurker-w) * 1.651);
  animation-delay: 3.2s;
}
.lurker  { background: url("../assets/Silhouettes/Silhouette1.png") no-repeat center bottom / contain; }
.lurker2 { background: url("../assets/Silhouettes/Silhouette2.png") no-repeat center bottom / contain; }
.lurker::after,
.lurker2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #46647a;
  opacity: 0.8; /* strength of the blue wash — raise for moodier, lower for truer colors */
  -webkit-mask: url("../assets/Silhouettes/Silhouette1.png") no-repeat center bottom / contain;
  mask: url("../assets/Silhouettes/Silhouette1.png") no-repeat center bottom / contain;
}
.lurker2::after {
  -webkit-mask-image: url("../assets/Silhouettes/Silhouette2.png");
  mask-image: url("../assets/Silhouettes/Silhouette2.png");
}
.lurker-eyes,
.lurker2-eyes {
  z-index: 2;
  animation-name: lurker-eyes-pulse;
  /* Bloom: a tight core glow plus two wider, softer halos, all hugging the
     eye pixels only. Tune the blur radii / alphas to taste. */
  filter:
    brightness(1.1) saturate(1.15)
    drop-shadow(0 0 3px rgba(255, 211, 92, 0.9))
    drop-shadow(0 0 8px rgba(255, 211, 92, 0.55))
    drop-shadow(0 0 18px rgba(255, 211, 92, 0.3));
}
.lurker-eyes  { background: url("../assets/Silhouettes/Silhouette1_JustEyes.png") no-repeat center bottom / contain; }
.lurker2-eyes { background: url("../assets/Silhouettes/Silhouette2_JustEyes.png") no-repeat center bottom / contain; }

@keyframes lurker-pulse {
  0%   { opacity: 0; }
  6%   { opacity: 0.9; }
  14%  { opacity: 0.75; }
  42%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Same attack as the body, but the glow hangs around ~1s longer */
@keyframes lurker-eyes-pulse {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  20%  { opacity: 0.9; }
  68%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero-kicker {
  margin: 2.6rem 0 0;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-kicker span { color: var(--teal); }

.hero-title {
  margin: 0;
  display: flex;
  justify-content: center;
  /* Same chunky offset shadow the text title used to have */
  filter: drop-shadow(3px 4px 0 rgba(6, 16, 23, 0.6));
}
.hero-logo {
  /* White wordmark PNG used as a mask so it can be painted in the old
     title gold. Swap the URL (both lines) to change the wordmark. */
  width: clamp(300px, 60vw, 680px);
  aspect-ratio: 1200 / 630;
  background-color: var(--gold);
  -webkit-mask: url("../assets/Logos/TG_Logo_1200_WordmarkWithSparkles_White.png") no-repeat center / contain;
  mask: url("../assets/Logos/TG_Logo_1200_WordmarkWithSparkles_White.png") no-repeat center / contain;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.2rem;
}

.hero-note {
  margin: 1.6rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(164, 184, 176, 0.7);
}

.hero-hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(3rem, 9vw, 7.5rem);
  z-index: 1;
}

/* ------------------------------- Trailer ------------------------------- */

.trailer-section {
  background: var(--ink-2);
  padding: 0 0 clamp(4rem, 8vw, 6.5rem);
}

.trailer-frame {
  position: relative;
  margin-top: clamp(-4.5rem, -6vw, -2.5rem); /* overlaps the hero hills */
  z-index: 2;
  aspect-ratio: 16 / 9;
  border-radius: var(--wobble);
  overflow: hidden;
  border: 3px solid rgba(255, 211, 92, 0.45);
  box-shadow: 10px 10px 0 rgba(6, 16, 23, 0.5);
  background: #0a141c;
  transform: rotate(-0.4deg);
}
.trailer-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  background:
    radial-gradient(70% 90% at 50% 115%, rgba(201, 96, 58, 0.3), transparent 65%),
    radial-gradient(48% 60% at 50% 118%, rgba(255, 211, 92, 0.14), transparent 70%),
    linear-gradient(180deg, #0a141c, #122531);
}
.trailer-play {
  width: clamp(3.5rem, 8vw, 5rem);
  height: clamp(3.5rem, 8vw, 5rem);
  border-radius: var(--wobble-blob);
  display: grid;
  place-items: center;
  background: rgba(255, 211, 92, 0.12);
  border: 3px solid rgba(255, 211, 92, 0.6);
  color: var(--gold);
  transform: rotate(2deg);
}
.trailer-play svg { width: 42%; height: 42%; margin-left: 8%; }
.trailer-placeholder-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment);
  margin: 0;
}
.trailer-placeholder-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 30rem;
  padding: 0 1.5rem;
}

/* ------------------------------- Sections ------------------------------ */

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--parchment);
}
.section-title em { font-style: normal; color: var(--gold); }

/* Hand-drawn squiggle under section titles */
.section-title::after {
  content: "";
  display: block;
  width: clamp(7rem, 14vw, 10rem);
  height: 0.7rem;
  margin: 0.7rem auto 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q 12 2 24 7 T 46 6 T 68 8 T 90 6 T 118 7' fill='none' stroke='%23e0a33e' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.section-lead {
  margin: 1rem auto 0;
  max-width: 40rem;
  text-align: center;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
}
.section-lead em { font-style: normal; color: var(--mint); }

/* ------------------------------- Features ------------------------------ */

.features-section {
  background: var(--ink-2);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(4.5rem, 9vw, 7rem);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: clamp(2.2rem, 5vw, 3.2rem);
}

.feature-card {
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: var(--wobble);
  padding: 1.8rem 1.6rem;
  box-shadow: 6px 6px 0 rgba(6, 16, 23, 0.4);
  transition: transform 0.18s ease, border-color 0.18s ease,
              box-shadow 0.18s ease;
}
.feature-card:nth-child(1) { transform: rotate(-0.7deg); }
.feature-card:nth-child(2) { transform: rotate(0.5deg); border-radius: var(--wobble-alt); }
.feature-card:nth-child(3) { transform: rotate(-0.4deg); }
.feature-card:hover {
  transform: rotate(0deg) translateY(-4px);
  border-color: rgba(70, 185, 140, 0.55);
  box-shadow: 9px 9px 0 rgba(6, 16, 23, 0.4);
}

.feature-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: var(--wobble-blob);
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(255, 211, 92, 0.08);
  border: 2.5px solid rgba(255, 211, 92, 0.35);
  margin-bottom: 1.1rem;
  transform: rotate(-3deg);
}
.feature-icon svg { width: 65%; height: 65%; }

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ------------------------------ Screenshots ---------------------------- */

.screenshots-section {
  background: var(--ink);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.carousel {
  position: relative;
  margin-top: clamp(2rem, 4.5vw, 3rem);
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--wobble-alt);
  border: 3px solid var(--line);
  box-shadow: 10px 10px 0 rgba(6, 16, 23, 0.45);
  touch-action: pan-y;
  transform: rotate(0.3deg);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.3, 1);
}
.carousel-track.is-dragging { transition: none; }

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
}
.carousel-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  /* contain + black background letterboxes non-16:9 shots instead of cropping */
  object-fit: contain;
  background: #000;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.9rem;
  height: 2.9rem;
  border-radius: var(--wobble-blob);
  border: 2.5px solid rgba(233, 240, 234, 0.35);
  background: rgba(11, 24, 32, 0.85);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.15s ease;
}
.carousel-arrow svg { width: 45%; height: 45%; }
.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  background: var(--gold);
  border-color: var(--outline);
  color: #2a1c08;
  transform: translateY(-50%) scale(1.08) rotate(-3deg);
}
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

/* Diamond dots, like the gem in the logo */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
}
.carousel-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  border: 0;
  padding: 0;
  background: rgba(233, 240, 234, 0.25);
  cursor: pointer;
  transform: rotate(45deg);
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.carousel-dot:hover { background: rgba(255, 211, 92, 0.6); }
.carousel-dot.is-active {
  background: var(--gold);
  transform: rotate(45deg) scale(1.45);
}

/* ------------------------------- Final CTA ----------------------------- */

.cta-section {
  position: relative;
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 70% at 50% 120%, rgba(142, 59, 44, 0.55), transparent 70%),
    radial-gradient(38% 46% at 50% 124%, rgba(255, 211, 92, 0.2), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, #16242c 100%);
}
.cta-inner .btn { margin-top: 2rem; }

/* -------------------------------- Footer ------------------------------- */

.site-footer {
  background: #071119;
  border-top: 2px solid var(--line);
  padding: 2.6rem 0;
  text-align: center;
}
.footer-studio {
  display: inline-block;
}
.footer-mark {
  /* White line-art controller on a tallish canvas with empty space below —
     sized up a little so the visible mark reads clearly. */
  height: 4.5rem;
  width: auto;
  margin: 0 auto 0.4rem;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.footer-studio:hover .footer-mark,
.footer-studio:focus-visible .footer-mark {
  opacity: 1;
  transform: rotate(-3deg) scale(1.05);
}
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.footer-fine {
  margin: 0.4rem 0 0;
  color: rgba(164, 184, 176, 0.5);
  font-size: 0.78rem;
}
.footer-legal {
  margin-top: 0.7rem;
  font-size: 0.82rem;
}
.footer-legal a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--gold);
  text-decoration: underline wavy;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ------------------------------ Legal pages ----------------------------- */
/* Long-form text pages (e.g. /privacy). Same site chrome; the content sits
   in a narrower measure for comfortable reading. */

.legal-section {
  background: var(--ink-2);
  padding: clamp(7rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6.5rem);
}

.legal-meta {
  margin: 1.3rem auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.legal-meta strong { color: var(--text); }

.legal-article {
  max-width: 46rem;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  color: var(--muted);
}
.legal-article p,
.legal-article li {
  line-height: 1.7;
}
.legal-article li { margin-bottom: 0.5rem; }
.legal-article strong { color: var(--text); }

.legal-article h2 {
  margin: 2.7rem 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--parchment);
}
.legal-article h3 {
  margin: 2rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.legal-article a {
  color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.legal-article a:hover,
.legal-article a:focus-visible {
  text-decoration-style: wavy;
}

.legal-article hr {
  border: 0;
  border-top: 2px solid var(--line);
  margin: 2.8rem 0;
}

/* Postal-address block in the controller/contact sections */
.legal-address {
  padding: 1rem 1.3rem;
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: var(--wobble-alt);
  box-shadow: 5px 5px 0 rgba(6, 16, 23, 0.35);
}

/* The section-4 data table scrolls sideways on narrow screens instead of
   stretching the page. */
.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
  background: var(--panel);
  border: 2.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 6px 6px 0 rgba(6, 16, 23, 0.35);
}
.legal-article table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal-article th,
.legal-article td {
  padding: 0.75rem 0.9rem;
  border-bottom: 2px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.legal-article th {
  color: var(--parchment);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(6, 16, 23, 0.35);
  white-space: nowrap;
}
.legal-article tr:last-child td { border-bottom: 0; }

/* ------------------------------ Responsive ------------------------------ */

@media (max-width: 760px) {
  .site-nav { display: none; }
  .lurker, .lurker-eyes, .lurker2, .lurker2-eyes { display: none; } /* too crowded next to the overlapping trailer */
  .features-grid { grid-template-columns: 1fr; }
  .carousel-arrow { width: 2.4rem; height: 2.4rem; }
  .carousel-prev { left: 0.6rem; }
  .carousel-next { right: 0.6rem; }
  .hero { padding-top: 7rem; }
}

/* --------------------------- Reduced motion ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .echo { animation: none; opacity: 0.18; transform: translateX(-50%) scale(1); }
  .lurker, .lurker-eyes, .lurker2, .lurker2-eyes { animation: none; opacity: 0.3; }
  .carousel-track { transition: none; }
  .btn, .feature-card, .carousel-arrow, .carousel-dot { transition: none; }
}
