:root {
  --home-bg: #020b14;
  --home-panel: rgba(3, 17, 28, 0.9);
  --home-panel-soft: rgba(8, 28, 43, 0.78);
  --home-gold: #e6ad4d;
  --home-gold-bright: #ffd277;
  --home-text: #f7ead0;
  --home-muted: rgba(247, 234, 208, 0.78);
  --home-border: rgba(230, 173, 77, 0.74);
  --home-shadow: rgba(0, 0, 0, 0.58);
  --home-focus: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--home-text);
  font-family: "Lora", Georgia, serif;
  background-color: var(--home-bg);
  background-image:
    linear-gradient(180deg, rgba(0, 8, 18, 0.12), rgba(0, 7, 14, 0.78)),
    url("../images/site-background-stars.png");
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-attachment: fixed;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--home-focus);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 14px;
  color: #07101a;
  background: #ffffff;
  border-radius: 8px;
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

.desktop-home {
  padding: 18px 16px 0;
}

.artboard {
  width: min(1122px, 100%);
  margin: 0 auto;
  position: relative;
  isolation: isolate;
  aspect-ratio: 1122 / 1402;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 28px 70px var(--home-shadow);
}

.artboard-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.hotspot {
  position: absolute;
  z-index: 5;
  display: block;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.hotspot span {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(255, 210, 119, 0.055);
  border-color: rgba(255, 210, 119, 0.66);
  box-shadow: 0 0 24px rgba(255, 210, 119, 0.22);
}

.hotspot-visible-label {
  background: linear-gradient(180deg, #0a1622 0%, #09131d 100%);
  border-color: rgba(230, 173, 77, 0.78);
  border-radius: 999px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 210, 119, 0.08);
}

.hotspot-visible-label span {
  width: auto;
  height: auto;
  position: static;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  color: var(--home-gold-bright);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.78rem, 1.1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hotspot-visible-label:hover,
.hotspot-visible-label:focus-visible {
  background: linear-gradient(180deg, #13293b 0%, #0c1d2b 100%);
  border-color: rgba(255, 210, 119, 0.88);
  box-shadow:
    0 0 22px rgba(255, 210, 119, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.hotspot-news { left: 7.4%; top: 21.8%; width: 10.3%; height: 3.5%; }
.hotspot-builders { left: 19.1%; top: 21.8%; width: 13.0%; height: 3.5%; }
.hotspot-rules { left: 33.8%; top: 21.8%; width: 26.6%; height: 3.5%; }
.hotspot-faq { left: 61.8%; top: 21.8%; width: 7.4%; height: 3.5%; }
.hotspot-support { left: 69.7%; top: 20.95%; width: 24.4%; height: 4.8%; display: flex; align-items: center; justify-content: center; }

.hotspot-knowledge { left: 5.0%; top: 55.0%; width: 30.2%; height: 16.4%; }
.hotspot-codex { left: 36.5%; top: 55.0%; width: 27.2%; height: 16.4%; }
.hotspot-printable { left: 65.1%; top: 55.0%; width: 29.6%; height: 16.4%; }
.hotspot-start { left: 6.0%; top: 70.8%; width: 32.0%; height: 23.0%; border-radius: 45%; }

/* Large illustrated links glow without drawing an extra gold outline over the artwork. */
.hotspot-knowledge:hover,
.hotspot-knowledge:focus-visible,
.hotspot-codex:hover,
.hotspot-codex:focus-visible,
.hotspot-printable:hover,
.hotspot-printable:focus-visible,
.hotspot-start:hover,
.hotspot-start:focus-visible {
  background: rgba(255, 210, 119, 0.035);
  border-color: transparent;
  box-shadow:
    0 0 22px rgba(255, 210, 119, 0.18),
    inset 0 0 28px rgba(255, 210, 119, 0.055);
}

.hotspot-about { left: 7.2%; top: 96.5%; width: 9.3%; height: 3.2%; }
.hotspot-contact { left: 20.6%; top: 96.5%; width: 10.8%; height: 3.2%; }
.hotspot-privacy { left: 35.0%; top: 96.5%; width: 10.2%; height: 3.2%; }
.hotspot-legal { left: 49.4%; top: 96.5%; width: 8.5%; height: 3.2%; }

.featured-card {
  color: var(--home-text);
}

.artboard-featured-card {
  width: 31.0%;
  height: 21.4%;
  position: absolute;
  z-index: 4;
  left: 61.5%;
  top: 31.2%;
  padding: clamp(10px, 1.25vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 0.9vw, 14px);
  overflow: hidden;
  text-align: center;
}

.artboard-featured-card .featured-card-inner {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.featured-card-inner {
  min-height: 0;
  transform-style: preserve-3d;
}

.featured-card-meta {
  margin: 0 0 0.45em;
  color: var(--home-gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.52rem, 0.86vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.featured-card-title {
  margin: 0 0 0.55em;
  color: var(--home-text);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.76rem, 1.38vw, 1.22rem);
  line-height: 1.15;
}

.featured-card-summary {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--home-muted);
  font-size: clamp(0.58rem, 1.01vw, 0.9rem);
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.featured-card-link {
  margin-top: 0.65em;
  display: inline-flex;
  color: var(--home-gold-bright);
  font-size: clamp(0.62rem, 1vw, 0.9rem);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.featured-card-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(3px, 0.45vw, 7px);
}

.featured-card-controls button {
  min-height: 25px;
  padding: clamp(3px, 0.4vw, 6px) clamp(5px, 0.65vw, 9px);
  color: var(--home-text);
  font: inherit;
  font-size: clamp(0.48rem, 0.77vw, 0.68rem);
  line-height: 1;
  background: rgba(3, 17, 28, 0.68);
  border: 1px solid rgba(230, 173, 77, 0.72);
  border-radius: 999px;
  cursor: pointer;
}

.featured-card-controls button:hover {
  color: #07101a;
  background: var(--home-gold-bright);
}

.featured-card-inner.is-flipping-out {
  animation: home-card-flip-out 0.24s ease-in forwards;
}

.featured-card-inner.is-flipping-in {
  animation: home-card-flip-in 0.28s ease-out forwards;
}

@keyframes home-card-flip-out {
  from { opacity: 1; transform: perspective(700px) rotateY(0deg); }
  to { opacity: 0; transform: perspective(700px) rotateY(88deg); }
}

@keyframes home-card-flip-in {
  from { opacity: 0; transform: perspective(700px) rotateY(-88deg); }
  to { opacity: 1; transform: perspective(700px) rotateY(0deg); }
}

.mobile-home {
  display: none;
}

.home-section {
  width: min(1122px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(145deg, rgba(4, 20, 33, 0.94), rgba(4, 13, 24, 0.9));
  border: 1px solid var(--home-border);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

.section-heading p,
.mobile-eyebrow,
.future-label {
  margin: 0 0 7px;
  color: var(--home-gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.future-services h2 {
  margin: 0;
  color: var(--home-text);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.news-grid,
.builder-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-grid article,
.builder-card {
  padding: 22px;
  color: var(--home-text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(230, 173, 77, 0.26);
  border-radius: 18px;
}

.news-grid h3,
.builder-card strong {
  margin: 0;
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.15rem;
}

.news-grid p,
.builder-card small,
.future-services p {
  color: var(--home-muted);
  line-height: 1.65;
}

.news-grid a,
.future-services a {
  color: var(--home-gold-bright);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.builder-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.builder-card:hover,
.builder-card:focus-visible {
  transform: translateY(-3px);
  background: rgba(230, 173, 77, 0.09);
  border-color: var(--home-gold);
}

.builder-card span {
  color: var(--home-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.builder-card-primary {
  background: rgba(230, 173, 77, 0.09);
  border-color: rgba(230, 173, 77, 0.7);
}

.future-services {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.future-services > div {
  max-width: 760px;
}

.future-services a {
  flex: 0 0 auto;
}

/* ==========================================================
   SUPPORT / KO-FI
   ========================================================== */

.support-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background:
    radial-gradient(circle at 82% 50%, rgba(230, 173, 77, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(4, 20, 33, 0.96), rgba(4, 13, 24, 0.92));
}

.support-copy {
  max-width: 760px;
}

.support-label {
  margin: 0 0 7px;
  color: var(--home-gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.support-section h2 {
  margin: 0;
  color: var(--home-text);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.support-section p:not(.support-label) {
  margin: 14px 0 0;
  color: var(--home-muted);
  line-height: 1.7;
}

.support-button {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #07101a;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  text-decoration: none;
  background: var(--home-gold-bright);
  border: 1px solid var(--home-gold);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.support-button:hover,
.support-button:focus-visible {
  transform: translateY(-2px);
  background: #ffe1a0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 210, 119, 0.14);
}

.site-footer .footer-support-link {
  color: var(--home-gold-bright);
  font-weight: 700;
}

.site-footer {
  width: min(1122px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: 26px 4px 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(230, 173, 77, 0.5);
}

.site-footer > div {
  display: grid;
  gap: 6px;
}

.site-footer strong {
  color: var(--home-gold-bright);
  font-family: "Cinzel", Georgia, serif;
}

.site-footer span {
  color: var(--home-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.site-footer a {
  color: var(--home-muted);
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  color: var(--home-gold-bright);
}

@media (max-width: 840px) {
  body {
    background-attachment: scroll;
  }

  .desktop-home {
    display: none;
  }

  .mobile-home {
    width: min(720px, calc(100% - 24px));
    margin: 0 auto;
    padding-top: 22px;
    display: block;
  }

  .mobile-header {
    padding: 28px 20px;
    text-align: center;
    background: rgba(2, 14, 25, 0.84);
    border: 1px solid var(--home-border);
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  }

  .mobile-ornament {
    color: var(--home-gold);
    letter-spacing: 0.3em;
  }

  .mobile-header h1 {
    margin: 0;
    color: var(--home-gold-bright);
    font-family: "Cinzel", Georgia, serif;
    font-size: clamp(2.3rem, 12vw, 4rem);
    line-height: 1;
  }

  .mobile-tagline {
    margin: 16px 0 5px;
    color: var(--home-text);
    font-family: "Cinzel", Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mobile-header > p:last-of-type {
    color: var(--home-gold);
  }

  .mobile-nav {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .mobile-nav a {
    padding: 8px 11px;
    color: var(--home-text);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(230, 173, 77, 0.32);
    border-radius: 999px;
    font-family: "Cinzel", Georgia, serif;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-hero {
    margin-top: 18px;
    padding: 24px;
    display: grid;
    gap: 20px;
    background: rgba(2, 14, 25, 0.88);
    border: 1px solid var(--home-border);
    border-radius: 24px;
  }

  .mobile-hero h2 {
    margin: 0 0 12px;
    color: var(--home-text);
    font-family: "Cinzel", Georgia, serif;
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.08;
  }

  .mobile-hero > div > p:last-child {
    color: var(--home-muted);
    line-height: 1.7;
  }

  .mobile-featured-card {
    padding: 20px;
    background: rgba(7, 28, 43, 0.84);
    border: 1px solid var(--home-border);
    border-radius: 18px;
  }

  .mobile-featured-card .featured-card-meta {
    font-size: 0.76rem;
  }

  .mobile-featured-card .featured-card-title {
    font-size: 1.35rem;
  }

  .mobile-featured-card .featured-card-summary,
  .mobile-featured-card .featured-card-link {
    font-size: 1rem;
  }

  .mobile-featured-card .featured-card-controls {
    margin-top: 16px;
  }

  .mobile-featured-card .featured-card-controls button {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .mobile-feature-grid {
    margin-top: 18px;
    display: grid;
    gap: 12px;
  }

  .mobile-feature-grid a {
    padding: 20px;
    display: grid;
    gap: 7px;
    color: var(--home-text);
    text-align: center;
    text-decoration: none;
    background: rgba(2, 14, 25, 0.88);
    border: 1px solid var(--home-border);
    border-radius: 18px;
  }

  .mobile-feature-grid strong {
    color: var(--home-gold-bright);
    font-family: "Cinzel", Georgia, serif;
  }

  .mobile-feature-grid span {
    color: var(--home-muted);
  }

  .mobile-portal-cta {
    min-height: 230px;
    margin-top: 18px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--home-text);
    text-align: center;
    text-decoration: none;
    background:
      radial-gradient(circle at center, rgba(118, 232, 255, 0.34), transparent 28%),
      radial-gradient(ellipse at bottom, rgba(81, 223, 255, 0.48), transparent 45%),
      rgba(2, 14, 25, 0.88);
    border: 1px solid rgba(139, 239, 255, 0.78);
    border-radius: 48% 48% 28% 28%;
    box-shadow: inset 0 0 48px rgba(84, 224, 255, 0.18), 0 0 32px rgba(84, 224, 255, 0.16);
  }

  .mobile-portal-cta span {
    color: var(--home-gold-bright);
    font-family: "Cinzel", Georgia, serif;
    font-size: 2.1rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .mobile-portal-cta small {
    margin-top: 8px;
    color: var(--home-muted);
    font-size: 1rem;
  }

  .home-section,
  .site-footer {
    width: min(720px, calc(100% - 24px));
  }

  .news-grid,
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .future-services,
  .support-section,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .support-button {
    width: 100%;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
