/* ========================================================================
   IX5 LIGHT FULL-WIDTH THEME
   Rebuilt for the IX5 esports site. Grav/PHP remains untouched.
   Page content uses full-width bands and editorial spacing instead of cards.
   ======================================================================== */

:root,
:root[data-theme="dark"] {
  color-scheme: light;
  --ix5-bg: #f7f8f5;
  --ix5-paper: #ffffff;
  --ix5-soft: #edf5f2;
  --ix5-warm: #fff1e7;
  --ix5-ink: #172238;
  --ix5-copy: #3f4b5e;
  --ix5-muted: #6c7685;
  --ix5-line: #dbe2e1;
  --ix5-accent: #e9552f;
  --ix5-accent-dark: #b9341c;
  --ix5-teal: #176b68;
  --ix5-navy: #132a45;
  --ix5-focus: rgba(233, 85, 47, 0.25);
  --ix5-shell: 1760px;
  --ix5-reading: 760px;
  --ix5-header: 92px;
  --q2-accent: var(--ix5-accent);
  --q2-link: var(--ix5-teal);
  --q2-focus-ring: var(--ix5-focus);
}

* {
  box-sizing: border-box;
}

html,
:root[data-theme="dark"] {
  background: var(--ix5-bg) !important;
  scroll-behavior: smooth;
}

body,
:root[data-theme="dark"] body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ix5-bg) !important;
  color: var(--ix5-ink) !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(45, 154, 148, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(233, 85, 47, 0.09), transparent 30rem);
  pointer-events: none;
}

a {
  color: var(--ix5-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--ix5-accent-dark);
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  color: var(--ix5-ink) !important;
  font-family: "Cal Sans", Inter, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

h1 {
  font-size: clamp(2.4rem, 3.8vw, 4rem);
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  line-height: 1.14;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.25;
}

p,
li {
  color: var(--ix5-copy);
}

::selection {
  background: rgba(233, 85, 47, 0.2);
}

:focus-visible {
  outline: 3px solid var(--ix5-focus);
  outline-offset: 3px;
}

.wide-shell {
  width: min(var(--ix5-shell), calc(100% - clamp(48px, 6vw, 96px)));
  margin-inline: auto;
}

/* ===== IX5 HEADER: light, compact and configured through Grav navigation ===== */

#header,
#header.site-header {
  position: fixed !important;
  z-index: 40;
  inset: 0 0 auto;
  height: var(--ix5-header);
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(23, 34, 56, 0.1);
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 10px 40px rgba(30, 50, 64, 0.06);
  backdrop-filter: blur(18px);
}

#header > .container {
  width: min(var(--ix5-shell), calc(100% - 48px));
  max-width: none;
  height: 100%;
  margin: 0 auto;
  padding: 0;
}

#header .navbar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

#header .navbar-section.logo {
  flex: 0 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ix5-ink) !important;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(23, 42, 69, 0.16);
}

.brand span {
  display: grid;
  line-height: 1;
}

.brand strong {
  font-family: "Cal Sans", Inter, sans-serif;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 5px;
  color: var(--ix5-teal);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

#header .desktop-menu,
#header .dropmenu {
  flex: 1 1 auto;
}

#header ul.navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#header ul.navigation > li {
  margin: 0;
  list-style: none;
}

#header ul.navigation > li > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ix5-copy) !important;
  font-size: 0.91rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

#header ul.navigation > li > a:hover,
#header ul.navigation > li.active > a,
#header ul.navigation > li > a.active {
  color: var(--ix5-ink) !important;
  background: var(--ix5-soft);
}

#header .header-cta-item {
  margin-left: 10px !important;
}

#header ul.navigation > li.header-cta-item > a.header-cta {
  min-width: 172px;
  padding-inline: 20px;
  color: #fff !important;
  background: var(--ix5-accent);
  box-shadow: 0 11px 28px rgba(233, 85, 47, 0.22);
}

#header ul.navigation > li.header-cta-item > a.header-cta:hover {
  background: var(--ix5-accent-dark);
}

#header .actions {
  display: none;
}

.mobile-menu {
  z-index: 55;
}

.button_container span {
  background: var(--ix5-ink) !important;
}

.overlay {
  background: rgba(247, 248, 245, 0.98) !important;
}

.overlay .navigation a {
  color: var(--ix5-ink) !important;
}

.mobile-container .theme-toggle,
.mobile-container [data-theme-toggle],
.mobile-container .theme-toggle-wrapper {
  display: none !important;
}

main {
  padding-top: var(--ix5-header);
}

#body-wrapper {
  margin: 0;
  padding: 0;
  background: transparent !important;
}

#body-wrapper > .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* IX5 FULL-SCREEN RESET: match Quark2's exact selector so the default
   960px centered content card cannot constrain full-width page bands. */
#body-wrapper > .container > .content-item {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

.ix5-site {
  width: 100%;
  max-width: none;
  color: var(--ix5-ink);
}

/* ===== FULL-WIDTH INTRODUCTIONS ===== */

.page-intro,
.article-intro,
.legal-intro {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ix5-line);
  background:
    linear-gradient(120deg, rgba(255, 241, 231, 0.9), rgba(237, 245, 242, 0.92)),
    var(--ix5-paper);
}

.page-intro::after,
.article-intro::after,
.legal-intro::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -160px;
  border: 1px solid rgba(23, 107, 104, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.24), 0 0 0 160px rgba(233, 85, 47, 0.03);
  pointer-events: none;
}

.intro-layout {
  position: relative;
  z-index: 1;
  min-height: clamp(620px, 76vh, 780px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
  padding-block: clamp(56px, 7vw, 88px);
}

.intro-copy {
  max-width: 760px;
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--ix5-teal) !important;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.intro-copy h1,
.article-heading h1,
.legal-intro h1 {
  margin-bottom: 24px;
}

.lede {
  max-width: 820px;
  margin-bottom: 20px;
  color: var(--ix5-ink) !important;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.55;
}

.intro-copy > p:not(.lede),
.article-heading > p:not(.lede),
.legal-intro p:not(.lede) {
  max-width: var(--ix5-reading);
}

.hero-visual,
.article-hero-visual,
.section-visual {
  margin: 0;
  overflow: hidden;
  background: #dfe7e4;
}

.hero-visual {
  width: min(100%, 680px);
  aspect-ratio: 16 / 10;
  justify-self: end;
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(23, 42, 69, 0.13);
}

.hero-visual img,
.article-hero-visual img,
.section-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.ghost-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  border: 1px solid var(--ix5-accent);
  color: #fff !important;
  background: var(--ix5-accent);
  box-shadow: 0 14px 32px rgba(233, 85, 47, 0.2);
}

.primary-action:hover {
  border-color: var(--ix5-accent-dark);
  background: var(--ix5-accent-dark);
}

.secondary-action,
.ghost-btn {
  border: 1px solid rgba(23, 34, 56, 0.24);
  color: var(--ix5-ink) !important;
  background: transparent;
}

.secondary-action:hover,
.ghost-btn:hover {
  background: var(--ix5-paper);
}

.article-intro {
  padding-block: 54px 70px;
}

.article-intro > .wide-shell {
  position: relative;
  z-index: 1;
}

.article-hero-visual {
  width: 100%;
  aspect-ratio: 21 / 7;
  max-height: 520px;
  margin-bottom: clamp(38px, 6vw, 78px);
  border-radius: 0 0 70px 0;
}

.article-heading {
  max-width: 1120px;
}

.article-heading h1 {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 1.06;
}

.legal-intro {
  padding-block: clamp(88px, 12vw, 160px);
}

.legal-intro > .wide-shell {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin-inline: auto;
}

.legal-intro h1 {
  max-width: 900px;
}

.updated-note {
  margin-top: 30px;
  color: var(--ix5-muted) !important;
  font-size: 0.9rem;
  font-weight: 750;
}

/* ===== FULL-WIDTH ARTICLE BANDS: no middle-page cards ===== */

.content-band {
  width: 100%;
  padding-block: clamp(64px, 8vw, 112px);
  border-bottom: 1px solid var(--ix5-line);
  background: rgba(255, 255, 255, 0.74);
}

.content-band.soft-band {
  background: var(--ix5-soft);
}

.reading-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.42fr) minmax(0, 1.58fr);
  gap: clamp(34px, 5vw, 84px);
  align-items: start;
}

.reading-grid.has-visual {
  grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1.18fr) minmax(220px, 0.8fr);
  gap: clamp(24px, 3vw, 48px);
}

.intro-layout > *,
.reading-grid > *,
.faq-layout > * {
  min-width: 0;
}

.section-heading {
  align-self: start;
}

.section-index {
  display: block;
  margin-bottom: 18px;
  color: var(--ix5-accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

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

.section-copy {
  max-width: var(--ix5-reading);
}

.section-copy p:last-child {
  margin-bottom: 0;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid rgba(23, 34, 56, 0.18);
  list-style: none;
}

.detail-list li {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid rgba(23, 34, 56, 0.14);
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ix5-accent);
}

.section-visual {
  width: min(100%, 480px);
  aspect-ratio: 4 / 3;
  align-self: center;
  justify-self: end;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(23, 42, 69, 0.1);
}

/* ===== GUIDE DIRECTORY ===== */

.directory-band > .wide-shell > .section-heading {
  max-width: 800px;
  margin-bottom: 52px;
}

.guide-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  border-top: 1px solid var(--ix5-line);
}

.guide-directory a {
  min-height: 168px;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-content: center;
  column-gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--ix5-line);
  color: var(--ix5-ink) !important;
  text-decoration: none;
}

.guide-directory a:hover strong {
  color: var(--ix5-accent-dark);
}

.guide-directory span {
  grid-row: 1 / span 2;
  color: var(--ix5-accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.guide-directory strong {
  font-family: "Cal Sans", Inter, sans-serif;
  font-size: 1.3rem;
  line-height: 1.25;
  transition: color 160ms ease;
}

.guide-directory small {
  margin-top: 9px;
  color: var(--ix5-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ===== RELATED LINKS AND FAQ ===== */

.link-band {
  padding-block: 50px;
  background: var(--ix5-navy);
}

.link-band > .wide-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.link-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.text-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
}

.text-links a {
  color: #fff !important;
  font-weight: 800;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.faq-band {
  background: var(--ix5-paper);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.66fr) minmax(0, 1.34fr);
  gap: clamp(42px, 8vw, 120px);
}

.faq-list {
  border-top: 1px solid var(--ix5-line);
}

.faq-item {
  border-bottom: 1px solid var(--ix5-line);
}

.faq-q {
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border: 0;
  color: var(--ix5-ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 34, 56, 0.22);
  border-radius: 50%;
  color: var(--ix5-teal);
  font-size: 1.1rem;
}

.faq-a {
  display: none;
  max-width: 720px;
  padding: 0 54px 22px 0;
}

.faq-a p {
  margin: 0;
}

.faq-item.open .faq-a {
  display: block;
}

.faq-item.open .faq-icon {
  color: #fff;
  background: var(--ix5-teal);
}

/* ===== LIGHT FULL-WIDTH FOOTER ===== */

#footer.site-footer {
  margin: 0;
  padding: clamp(68px, 8vw, 110px) 0 30px;
  border-top: 1px solid var(--ix5-line);
  background: #e7efec !important;
  color: var(--ix5-ink) !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) repeat(3, minmax(150px, 0.62fr));
  gap: clamp(34px, 5vw, 76px);
}

.footer-lead {
  max-width: 480px;
}

.footer-lead h2 {
  margin-bottom: 16px;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.footer-lead .primary-action {
  margin-top: 14px;
}

.footer-column h3 {
  margin-bottom: 18px;
  color: var(--ix5-ink) !important;
  font-size: 1rem;
}

.footer-column a {
  display: block;
  margin: 11px 0;
  color: var(--ix5-copy) !important;
  font-size: 0.94rem;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--ix5-accent-dark) !important;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid rgba(23, 34, 56, 0.14);
}

.footer-bottom p {
  margin: 0;
  color: var(--ix5-muted);
  font-size: 0.88rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badges span {
  padding: 6px 10px;
  border: 1px solid rgba(23, 34, 56, 0.16);
  border-radius: 999px;
  color: var(--ix5-copy);
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.72rem;
  font-weight: 800;
}

/* ===== IX5 MEMBER DIALOG ===== */

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(19, 42, 69, 0.36);
  backdrop-filter: blur(8px);
}

.modal-backdrop.show {
  display: grid;
}

.modal {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid rgba(23, 34, 56, 0.14);
  border-radius: 22px;
  background: var(--ix5-paper);
  box-shadow: 0 30px 100px rgba(23, 42, 69, 0.24);
}

.modal-top {
  position: relative;
  padding: 34px 76px 22px 34px;
}

.modal-top h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.modal-top p {
  margin-bottom: 0;
}

.close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 34, 56, 0.18);
  border-radius: 50%;
  color: var(--ix5-ink);
  background: var(--ix5-soft);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 34px 32px;
  border-top: 1px solid var(--ix5-line);
}

/* ===== RESPONSIVE LAYOUT ===== */

@media (max-width: 1180px) {
  #header ul.navigation > li > a {
    padding-inline: 9px;
    font-size: 0.83rem;
  }

  #header ul.navigation > li.header-cta-item > a.header-cta {
    min-width: 132px;
    padding-inline: 14px;
  }

  .reading-grid.has-visual {
    grid-template-columns: minmax(210px, 0.5fr) minmax(0, 1fr);
  }

  .reading-grid.has-visual .section-visual {
    grid-column: 2;
    width: min(620px, 100%);
    justify-self: start;
  }
}

@media (max-width: 980px) {
  :root,
  :root[data-theme="dark"] {
    --ix5-header: 82px;
  }

  #header .desktop-menu {
    display: none;
  }

  .intro-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 64px 70px;
  }

  .intro-copy {
    max-width: 820px;
  }

  .hero-visual {
    width: 100%;
    aspect-ratio: 16 / 8;
    border-radius: 0 44px 0 44px;
  }

  .reading-grid,
  .reading-grid.has-visual,
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .reading-grid.has-visual .section-visual {
    grid-column: auto;
  }

  .section-heading {
    max-width: 720px;
  }

  .guide-directory,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-lead {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  body,
  :root[data-theme="dark"] body {
    font-size: 16px;
  }

  .wide-shell,
  #header > .container {
    width: calc(100% - 36px);
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  h1,
  .article-heading h1 {
    font-size: clamp(2.1rem, 9.5vw, 2.8rem);
    line-height: 1.08;
  }

  .page-intro::after,
  .article-intro::after,
  .legal-intro::after {
    display: none;
  }

  .intro-layout {
    gap: 42px;
    padding-block: 48px 56px;
  }

  .hero-visual {
    aspect-ratio: 4 / 3;
    border-radius: 0 30px 0 30px;
  }

  .article-intro {
    padding-block: 28px 54px;
  }

  .article-hero-visual {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-left: 0;
    margin-bottom: 42px;
    border-radius: 18px;
  }

  .legal-intro {
    padding-block: 74px;
  }

  .content-band {
    padding-block: 58px;
  }

  .detail-list,
  .guide-directory,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-visual {
    aspect-ratio: 16 / 10;
    justify-self: stretch;
    border-radius: 16px;
  }

  .guide-directory a {
    min-height: 0;
    padding-block: 22px;
  }

  .link-band > .wide-shell,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .text-links {
    justify-content: flex-start;
  }

  .footer-lead {
    grid-column: auto;
  }

  .footer-bottom {
    margin-top: 52px;
  }

  .modal-top {
    padding: 28px 66px 18px 24px;
  }

  .modal-actions {
    padding: 18px 24px 26px;
  }

  .modal-actions .primary-action,
  .modal-actions .ghost-btn {
    width: 100%;
  }
}

@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;
  }
}
