:root {
  --bg: #020817;
  --bg-soft: #061226;
  --bg-elevated: #08162d;
  --bg-card: rgba(8, 22, 45, 0.76);
  --bg-card-strong: rgba(10, 28, 54, 0.9);

  --text: #f5f8fc;
  --text-soft: #c8d6e5;
  --text-muted: #8fa3bb;

  --line: rgba(184, 214, 255, 0.1);
  --line-strong: rgba(184, 214, 255, 0.18);

  --blue: #4db8ff;
  --blue-soft: rgba(77, 184, 255, 0.18);
  --blue-line: rgba(77, 184, 255, 0.22);

  --accent: #f59a3d;
  --accent-hover: #ffb15c;
  --accent-soft: rgba(245, 154, 61, 0.16);
  --accent-line: rgba(245, 154, 61, 0.32);

  --shadow-xl: 0 30px 100px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 22px 70px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.24);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(77, 184, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 86% 10%, rgba(245, 154, 61, 0.08), transparent 24rem),
    linear-gradient(145deg, #020817 0%, #040b18 42%, #061226 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(184, 214, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 214, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 72%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.36) 100%),
    linear-gradient(to bottom, rgba(2, 8, 23, 0.04), rgba(2, 8, 23, 0.9));
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

img {
  max-width: 100%;
}

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

.site-shell {
  width: min(100% - 36px, var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  color: var(--text);
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 40px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  transform: translateY(-1px);
}

main {
  display: grid;
  gap: 24px;
  padding: 34px 0 62px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.hero {
  min-height: 570px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px) 0;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 16px;
  padding: 7px 11px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.055em;
}

#hero-title {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--text);
  font-size: clamp(2.65rem, 6.4vw, 5.35rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h3 {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 820;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-soft);
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 32px;
  color: var(--text-soft);
  font-size: clamp(1.08rem, 1.85vw, 1.24rem);
  line-height: 1.66;
}

.hero-lede strong {
  color: var(--text);
}

.hero-actions,
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #160c02;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 16px 42px rgba(245, 154, 61, 0.22);
}

.button-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 20px 54px rgba(245, 154, 61, 0.3);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.button-secondary:hover {
  border-color: var(--blue-line);
  background: rgba(77, 184, 255, 0.075);
}

/* Hero rotator / right-side logo card */
.sigil-card {
  position: relative;
  display: flex;
  min-height: 510px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--bg-card-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    var(--shadow-xl);
  isolation: isolate;
}

.sigil-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.sigil-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(2, 8, 23, 0), rgba(2, 8, 23, 0.2) 50%, rgba(2, 8, 23, 0.64) 100%),
    linear-gradient(to bottom, rgba(2, 8, 23, 0.04), rgba(2, 8, 23, 0.42));
}

.sigil-card::before {
  display: none;
}

.sigil-card::after {
  position: absolute;
  inset: auto 12% 18px 12%;
  z-index: 2;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(245, 154, 61, 0.48), transparent);
  pointer-events: none;
}

.sigil-orbit {
  display: none;
}

.sigil-image,
.sigil-label,
.sigil-subtitle {
  display: none;
}

/* Logo rotator layout. Animation rules are generated by rotator.css */
.logo-rotator {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.logo-rotator img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: clamp(18px, 4vw, 42px);
  object-fit: contain;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.logo-rotator-card {
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(circle at center, rgba(77, 184, 255, 0.08), transparent 54%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--bg-card-strong);
}

.logo-rotator-card .sigil-card-overlay {
  background:
    radial-gradient(circle at center, rgba(2, 8, 23, 0), rgba(2, 8, 23, 0.14) 62%, rgba(2, 8, 23, 0.38) 100%),
    linear-gradient(to bottom, rgba(2, 8, 23, 0.02), rgba(2, 8, 23, 0.24));
}

.content-card,
.rule-list article,
.link-tile {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.022)),
    var(--bg-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    var(--shadow-md);
  backdrop-filter: blur(18px);
}

.content-card {
  padding: clamp(24px, 3.8vw, 40px);
  border-radius: var(--radius-lg);
}

.live-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.live-card p {
  max-width: 760px;
  margin-bottom: 0;
}

.lodge-section {
  align-items: stretch;
}

.lodge-section .content-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rule-list {
  display: grid;
  gap: 14px;
}

.rule-list article {
  padding: 24px;
  border-radius: var(--radius-md);
}

.rule-list span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.rule-list p,
.project-card p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.projects-card {
  display: grid;
  gap: 28px;
}

.projects-card > div:first-child p {
  max-width: 780px;
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  position: relative;
  display: block;
  min-height: 182px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.project-card::after {
  position: absolute;
  right: 22px;
  bottom: 20px;
  content: "↗";
  color: rgba(245, 154, 61, 0.76);
  font-size: 0.95rem;
  font-weight: 900;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.project-card:hover {
  border-color: var(--accent-line);
  background:
    linear-gradient(145deg, rgba(245, 154, 61, 0.06), rgba(255, 255, 255, 0.024)),
    rgba(255, 255, 255, 0.036);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.24);
  transform: translateY(-4px);
}

.project-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.project-card h3 {
  max-width: 90%;
  color: var(--text);
}

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

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.links-section {
  display: grid;
  gap: 22px;
}

.section-heading {
  display: grid;
  gap: 0;
}

.section-heading h2 {
  margin-bottom: 0;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.link-tile {
  min-height: 150px;
  padding: 24px;
  border-radius: var(--radius-md);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.link-tile:hover {
  border-color: var(--accent-line);
  background:
    linear-gradient(145deg, rgba(245, 154, 61, 0.06), rgba(255, 255, 255, 0.024)),
    var(--bg-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.24);
  transform: translateY(-4px);
}

.link-tile span {
  display: block;
  margin-bottom: 34px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.link-tile strong {
  display: block;
  max-width: 190px;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .section-grid,
  .live-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .sigil-card {
    min-height: 420px;
  }

  .project-grid,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 24px, var(--max-width));
  }

  .site-header {
    padding-top: 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .nav-links {
    gap: 3px;
    border-radius: var(--radius-sm);
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  #hero-title {
    font-size: clamp(2.35rem, 12vw, 3.9rem);
    letter-spacing: -0.058em;
  }

  .hero-actions,
  .live-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .sigil-card {
    min-height: 360px;
  }

  .logo-rotator img {
    padding: 22px;
  }

  .project-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-tile {
    min-height: 128px;
  }

  .link-tile span {
    margin-bottom: 22px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .logo-rotator img {
    animation: none;
    opacity: 0;
  }

  .logo-rotator img:first-child {
    opacity: 1;
  }
}