@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Cormorant+Garamond:wght@500;600;700&display=swap");

:root {
  --bg: #02050d;
  --gold: #b8893e;
  --gold-bright: #c9a360;
  --blue: #234d85;
  --cyan: #80dfff;
  --text: #fff7e4;
  --muted: #bdc9d6;
  --line: rgba(201, 163, 96, 0.3);
  --line-blue: rgba(35, 77, 133, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% 18%, rgba(21, 128, 255, 0.26), transparent 23rem),
    radial-gradient(circle at 82% 16%, rgba(119, 54, 236, 0.18), transparent 21rem),
    linear-gradient(180deg, #01030a 0%, var(--bg) 45%, #01030a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 18%, rgba(202, 224, 245, 0.16) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 28%, rgba(156, 181, 221, 0.12) 0 1px, transparent 1.7px),
    radial-gradient(circle at 44% 72%, rgba(139, 99, 187, 0.12) 0 1px, transparent 1.8px);
  background-size: 210px 180px, 280px 220px, 340px 260px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.64), transparent 84%);
  content: "";
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  width: min(1440px, calc(100% - 36px));
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(1, 4, 11, 0.84);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 14px;
  color: var(--gold-bright);
  text-decoration: none;
}

.brand-crest {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(128, 223, 255, 0.36), transparent 32%),
    linear-gradient(145deg, #08295d, #030711);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(21, 128, 255, 0.34);
}

.brand strong {
  display: block;
  color: #c29a52;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(255, 226, 152, 0.22),
    0 0 10px rgba(184, 137, 62, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.5);
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #e7bb62;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.site-nav a {
  border-bottom: 2px solid transparent;
  padding: 24px 12px 21px;
  color: #ffffff;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    text-shadow 180ms ease;
}

.site-nav a.active,
.site-nav a:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(201, 163, 96, 0.18);
}

.hero {
  position: relative;
  display: grid;
  min-height: max(520px, 64svh);
  width: 100%;
  margin: 0 auto;
  padding: clamp(72px, 12vh, 104px) clamp(28px, 6vw, 92px) clamp(48px, 8vh, 76px);
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 23% 58%, rgba(15, 38, 70, 0.36), transparent 34%),
    radial-gradient(ellipse at 10% 58%, rgba(1, 4, 13, 0.72) 0%, rgba(1, 4, 13, 0.5) 34%, transparent 66%),
    linear-gradient(90deg, rgba(1, 4, 13, 0.5) 0%, rgba(1, 4, 13, 0.24) 28%, rgba(2, 8, 20, 0.1) 54%, rgba(2, 8, 20, 0.04) 78%),
    linear-gradient(180deg, rgba(1, 4, 13, 0.08) 0%, rgba(1, 4, 13, 0.1) 62%, rgba(1, 4, 13, 0.78) 100%),
    url("assets/castle/castle-realm-bg.png") calc(100% - 74px) 58% / auto 126% no-repeat,
    #01040d;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 82% 17%, rgba(203, 223, 241, 0.12), transparent 17%),
    linear-gradient(118deg, transparent 39%, rgba(174, 201, 224, 0.14) 52%, rgba(137, 169, 205, 0.1) 66%, transparent 82%),
    radial-gradient(ellipse at 70% 48%, rgba(196, 221, 238, 0.15), transparent 29%),
    radial-gradient(ellipse at 56% 53%, rgba(255, 187, 73, 0.18), transparent 5%),
    radial-gradient(ellipse at 50% 70%, rgba(255, 175, 54, 0.16), transparent 7%),
    radial-gradient(ellipse at 63% 62%, rgba(225, 178, 91, 0.12), transparent 19%);
  mix-blend-mode: screen;
  opacity: 0.72;
  content: "";
  pointer-events: none;
}

.wizard-host {
  position: absolute;
  top: 3%;
  bottom: 0;
  left: clamp(-52px, -2.8vw, -8px);
  z-index: 2;
  width: auto;
  height: 96%;
  overflow: visible;
  background: transparent;
  pointer-events: none;
}

.wizard-host::after {
  display: none;
  content: none;
}

.wizard-host::before {
  display: none;
  content: none;
}

.wizard-host img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  margin-left: 0;
  filter: none;
  mix-blend-mode: normal;
  -webkit-mask-image: radial-gradient(ellipse at 48% 50%, #000 0 68%, rgba(0, 0, 0, 0.88) 80%, transparent 100%);
  mask-image: radial-gradient(ellipse at 48% 50%, #000 0 68%, rgba(0, 0, 0, 0.88) 80%, transparent 100%);
}

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

h1,
h2,
.hero-title {
  font-family: "Cinzel", "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  letter-spacing: 0.035em;
}

h1,
.hero-title {
  color: #c29a52;
  font-weight: 900;
  line-height: 0.9;
  text-shadow:
    0 1px 0 rgba(255, 226, 152, 0.22),
    0 0 18px rgba(184, 137, 62, 0.18),
    0 12px 36px rgba(0, 0, 0, 0.68);
  text-transform: uppercase;
}

.hero-title {
  width: 100%;
  margin: 0;
  background: linear-gradient(180deg, #f0d991 0%, #c99f50 34%, #966628 68%, #6f4519 100%);
  background-clip: text;
  color: #b8893e;
  font-size: clamp(2.9rem, 6vw, 6.7rem);
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 0.84;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgba(255, 235, 171, 0.32),
    0 0 16px rgba(201, 159, 80, 0.22),
    0 0 38px rgba(119, 75, 27, 0.28),
    0 14px 34px rgba(0, 0, 0, 0.76);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  position: absolute;
  top: clamp(126px, calc(11vh + 50px), 160px);
  left: clamp(280px, calc(33vw - 90px), 450px);
  z-index: 6;
  display: grid;
  width: min(560px, 42vw);
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.hero-message {
  margin: 0;
  color: #fff7e4;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  font-weight: 700;
  line-height: 1.22;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.82);
}

.hero-message span {
  display: block;
}

.hero-message span + span {
  margin-top: 10px;
}

.hero-message span:last-child {
  color: var(--gold-bright);
}

.hero-actions {
  display: flex;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hero-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 163, 96, 0.64);
  border-radius: 4px;
  padding: 0 22px;
  color: #fff7e4;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.78);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.hero-button:hover,
.hero-button:focus-visible {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

.hero-button-primary {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 163, 96, 0.22), transparent 64%),
    rgba(4, 11, 25, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(184, 137, 62, 0.18),
    0 0 22px rgba(184, 137, 62, 0.22);
}

.hero-button-primary:hover,
.hero-button-primary:focus-visible {
  box-shadow:
    inset 0 0 0 1px rgba(201, 163, 96, 0.3),
    0 0 30px rgba(184, 137, 62, 0.3);
}

.hero-button-secondary {
  background: rgba(2, 7, 16, 0.52);
}

h2 {
  font-weight: 700;
  line-height: 1.05;
}

.site-footer {
  display: flex;
  width: min(1440px, calc(100% - 36px));
  min-height: 96px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid rgba(201, 163, 96, 0.18);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.site-footer p {
  margin: 4px 0 0;
}

.footer-note {
  max-width: 420px;
  text-align: right;
}

@media (max-width: 1120px) {
  .site-header {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .site-nav a {
    padding-block: 10px;
  }

  .hero {
    width: min(100% - 28px, 1500px);
    min-height: max(520px, 66svh);
    background-position: 0 0, 0 0, 0 0, 0 0, calc(100% - 66px) 58%, 0 0;
  }

  .hero-title {
    font-size: clamp(2.5rem, 5.2vw, 4.8rem);
  }

  .wizard-host {
    top: 7%;
    left: clamp(-74px, -6vw, -30px);
    height: 90%;
  }

  .wizard-host img {
    height: 100%;
  }

  .hero-copy {
    top: clamp(134px, calc(13vh + 50px), 172px);
    left: calc(38% - 84px);
    width: min(460px, 48vw);
    gap: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-button {
    min-height: 42px;
    padding: 0 16px;
    font-size: 0.68rem;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .site-footer {
    width: min(100% - 24px, 1440px);
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: max(560px, 72svh);
    padding: 36px 0 48px;
    background:
      radial-gradient(ellipse at 22% 62%, rgba(15, 38, 70, 0.34), transparent 36%),
      radial-gradient(ellipse at 8% 62%, rgba(1, 4, 13, 0.62) 0%, rgba(1, 4, 13, 0.34) 42%, transparent 74%),
      linear-gradient(90deg, rgba(1, 4, 13, 0.46) 0%, rgba(1, 4, 13, 0.22) 48%, rgba(2, 8, 20, 0.08) 100%),
      linear-gradient(180deg, rgba(1, 4, 13, 0.08) 0%, rgba(1, 4, 13, 0.14) 62%, rgba(1, 4, 13, 0.8) 100%),
      url("assets/castle/castle-realm-bg.png") calc(100% + 48px) 60% / auto 112% no-repeat,
      #01040d;
  }

  .hero-title {
    font-size: clamp(1.85rem, 7.8vw, 3.35rem);
    line-height: 0.9;
  }

  .wizard-host {
    top: auto;
    bottom: 0;
    left: clamp(-128px, -25vw, -76px);
    height: 86%;
  }

  .wizard-host img {
    height: 100%;
    margin-left: 0;
  }

  .hero-copy {
    top: 110px;
    right: calc(5% + 28px);
    left: auto;
    width: min(320px, 58vw);
    gap: 10px;
    justify-items: end;
    text-align: right;
  }

  .hero-message {
    font-size: clamp(0.78rem, 3.35vw, 0.96rem);
  }

  .hero-actions {
    display: grid;
    margin-top: 18px;
    justify-items: stretch;
    gap: 8px;
  }

  .hero-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.58rem;
  }

  @media (max-width: 520px) {
    .hero-copy {
      right: 6%;
      width: min(280px, 58vw);
    }
  }

  .site-footer {
    display: grid;
    padding: 22px 0;
  }

  .footer-note {
    max-width: none;
    text-align: left;
  }
}
