@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #070a1c;
  --text: #dfe4ff;
  --text-bright: #f2f4ff;
  --text-white: #f6f7ff;
  --text-soft: #c3cbf2;
  --text-muted: #8a93c4;
  --accent: #9fd0ff;
  --red: #a3191b;
  --red-hover: #c42520;
  --red-border: #d23a2c;
  --error: #ff9a8f;
  --width: 1180px;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #d6ecff;
}

/* Fixed background image with a darkening gradient on top */
.backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg);
  isolation: isolate;
}

/* The wisp canvas assumes the image is centred with object-fit: cover */
.backdrop img,
.backdrop canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.backdrop img {
  object-fit: cover;
  object-position: 50% 50%;
}
.backdrop canvas {
  mix-blend-mode: screen;
  pointer-events: none;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 28, 0.35) 0%,
    rgba(7, 10, 28, 0.6) 40%,
    rgba(7, 10, 28, 0.9) 75%,
    rgba(7, 10, 28, 0.96) 100%
  );
}

.page {
  position: relative;
}

.button {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: #fff3ec;
  background: var(--red);
  border: 1px solid var(--red-border);
  padding: 10px 18px;
  border-radius: 2px;
  box-shadow: 0 0 24px rgba(200, 40, 30, 0.45);
}
.button:hover {
  background: var(--red-hover);
  color: #fff;
}

.button-large {
  margin-top: 14px;
  letter-spacing: 0.24em;
  padding: 14px 26px;
  box-shadow: 0 0 30px rgba(200, 40, 30, 0.4);
}

/* The hero fills the first screen, so the progress section always starts below it */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header: fixed to the top, gets a background once the page is scrolled */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(5, 7, 20, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(159, 208, 255, 0.14);
}

.header-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.22em;
  color: var(--text-bright);
}
.logo img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.2em;
}
.nav > a:not(.button) {
  color: var(--text-soft);
}

/* Burger button, only shown on small screens */
.nav-toggle {
  display: none;
}

/* Mobile menu: on phones and tablets the nav folds into a panel under the header, opened by the
   burger button (script.js). Without JavaScript there's no .js class and the nav wraps under the logo. */
@media (max-width: 900px) {
  .js .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-right: -10px;  /* lines the bars up with the page edge */
    padding: 0 10px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav-toggle span {
    height: 2px;
    border-radius: 1px;
    background: var(--text-bright);
    transition: transform 0.25s, opacity 0.25s;
  }
  /* The three bars turn into an X */
  .menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Solid, so page content doesn't show through the open menu */
  .site-header.menu-open {
    background: #050714;
  }

  .js .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 32px 28px;
    font-size: 14px;
    background: #050714;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
  }
  .js .menu-open .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  /* Fade only when the burger is used (script.js adds .menu-animating). Without this, resizing the
     window across the breakpoint would fade the desktop nav out as a panel, which flashes. */
  .js .menu-animating .nav {
    transition: opacity 0.25s, transform 0.25s, visibility 0s 0.25s;
  }
  .js .menu-animating.menu-open .nav {
    transition: opacity 0.25s, transform 0.25s;
  }
  .js .nav > a:not(.button) {
    padding: 16px 0;
    border-top: 1px solid rgba(159, 208, 255, 0.12);
  }
  .js .nav .button {
    margin-top: 20px;
    padding: 14px 18px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span,
  .js .menu-animating .nav,
  .js .menu-animating.menu-open .nav {
    transition: none;
  }
}

/* Hero */
.hero {
  flex: 1;
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 130px 32px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.realm {
  font-size: 13px;
  letter-spacing: 0.32em;
  color: #b3161a;
  text-shadow: 0 0 14px rgba(160, 15, 20, 0.7);
}

.hero h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(38px, 8vw, 94px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--text-white);
  text-shadow:
    0 2px 40px rgba(7, 10, 28, 0.8),
    0 0 60px rgba(110, 160, 255, 0.25);
  text-wrap: balance;
}

.hero p {
  margin: 0;
  max-width: 560px;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-soft);
  text-wrap: pretty;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(320px, 70%);
}
.divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(159, 208, 255, 0.7));
}
.divider span:last-child {
  background: linear-gradient(270deg, transparent, rgba(159, 208, 255, 0.7));
}
.divider .gem {
  flex: none;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* Guild news */
.guild-news {
  max-width: var(--width);
  margin: 0 auto;
  padding: 80px 32px 120px;
  scroll-margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.guild-news-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(159, 208, 255, 0.18);
}

.guild-news-header h2 {
  margin: 0;
  font-weight: 500;
  font-size: 40px;
  letter-spacing: 0.08em;
  color: var(--text-bright);
}

#progress-count {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.progress-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.progress-list.grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
}

.progress {
  display: flex;
  flex-wrap: wrap;
  background: rgba(12, 16, 40, 0.78);
  border: 1px solid rgba(159, 208, 255, 0.16);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.progress-video {
  flex: 1 1 100%;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #04060f;
}
.progress-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.progress-title {
  flex: 1 1 260px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid rgba(159, 208, 255, 0.1);
}

.progress-tag {
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.progress-boss {
  margin: 0;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--text-white);
}

.progress-raid {
  font-size: 16px;
  color: var(--text-muted);
}

.progress-details {
  flex: 2 1 360px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.progress-body {
  color: var(--text-soft);
  text-wrap: pretty;
}
.progress-body p {
  margin: 0;
}
.progress-body p + p {
  margin-top: 14px;
}

.progress-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 15px;
}
.progress-stats > div {
  display: flex;
  flex-direction: column;
}
.progress-stats span:first-child {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}
.progress-stats span:last-child {
  color: var(--text-bright);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(159, 208, 255, 0.14);
  background: rgba(5, 7, 20, 0.92);
}

.footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.footer-guild {
  color: var(--text-soft);
}

/* Contact. The FAQ page uses this frame too. Content starts at the top rather than centred,
   so the heading sits at the same height (300px down) on both pages however long the page is. */
.contact {
  min-height: 100vh;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 300px 32px 96px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}
.contact-header h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  color: var(--text-white);
  text-shadow:
    0 2px 40px rgba(7, 10, 28, 0.8),
    0 0 60px rgba(110, 160, 255, 0.25);
}
.contact-header p {
  margin: 0;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-soft);
  text-wrap: pretty;
}

.contact-form,
.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 5vw, 32px);
  background: rgba(12, 16, 40, 0.78);
  border: 1px solid rgba(159, 208, 255, 0.16);
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text-bright);
  background: rgba(5, 7, 20, 0.6);
  border: 1px solid rgba(159, 208, 255, 0.18);
  border-radius: 2px;
}
.field textarea {
  min-height: 180px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(159, 208, 255, 0.15);
}
.field.has-error input,
.field.has-error textarea {
  border-color: var(--red-border);
}

.field-error {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--error);
}
.contact-alert {
  margin: 0;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--error);
  background: rgba(163, 25, 27, 0.18);
  border: 1px solid var(--red-border);
  border-radius: 2px;
}

.contact-form .button {
  align-self: flex-start;
  margin-top: 4px;
  font-family: inherit;
  cursor: pointer;
}

/* Turnstile is 0px tall unless Cloudflare shows a challenge; the negative margin cancels its flex gap */
.contact-form .cf-turnstile {
  margin-bottom: -20px;
}

/* Honeypot: off-screen for people, but bots fill it in */
.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* About: the page frame is .contact, and .about-text shares the form's panel above.
   Each <section> is a heading plus paragraphs, with a thin line between sections. */
.about-text section + section {
  padding-top: 20px;
  border-top: 1px solid rgba(159, 208, 255, 0.12);
}
.about-text h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-bright);
  text-wrap: balance;
}
.about-text p {
  margin: 0;
  color: var(--text-soft);
  text-wrap: pretty;
}
.about-text p + p {
  margin-top: 12px;
}
