/* Terms page visual system: warm paper, evening violet and a measured editorial rhythm. */
:root {
  --terms-ink: #25172e;
  --terms-purple: #7854a3;
  --terms-purple-deep: #422260;
  --terms-lilac: #e8e5f9;
  --terms-lilac-light: #f7f5ff;
  --terms-gold: #f2c879;
  --terms-line: rgb(120 84 163 / 24%);
  --terms-paper: #fffdfb;
}

body.terms-page {
  background: var(--terms-paper);
  color: var(--terms-ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.terms-page header[data-homepage-region="01-site-header"] {
  position: relative;
  z-index: 5;
  background: #fff;
  box-shadow: 0 4px 12px rgb(66 34 96 / 16%);
}

.terms-page [data-helper-shell="header"] {
  min-height: 149px;
  background: #fff;
}

.terms-page header[data-homepage-region="01-site-header"] [data-homepage-region-content] {
  background: #fff;
}

.terms-page .site-header__auth a,
.terms-page .site-header__auth button {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.terms-page .site-header__auth a:hover,
.terms-page .site-header__auth a:focus-visible,
.terms-page .site-header__auth button:hover,
.terms-page .site-header__auth button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-page .site-header__auth a:focus-visible,
.terms-page .site-header__auth button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.terms-page main {
  min-width: 0;
}

.terms-page main > section {
  min-width: 0;
}

.terms-hero {
  position: relative;
  min-height: clamp(560px, 44vw, 720px);
  display: flex;
  align-items: flex-end;
  background: linear-gradient(90deg, rgb(37 23 46 / 88%), rgb(66 34 96 / 58%)), url("../assets/images/elitegamenights-hero-background.webp") center / cover no-repeat;
  color: #fff;
}

.terms-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(transparent, rgb(37 23 46 / 38%));
  content: "";
  pointer-events: none;
}

.terms-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7.5rem) 0 clamp(3rem, 6vw, 6rem);
}

.terms-eyebrow,
.terms-kicker,
.terms-policy-card__eyebrow,
.terms-contact-card__label,
.terms-scope-note__label,
.terms-rule-note__label,
.terms-media-caption {
  margin: 0;
  color: var(--terms-purple);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.terms-hero .terms-eyebrow {
  color: var(--terms-gold);
}

.terms-hero h1 {
  max-width: 760px;
  margin: 1rem 0 1.5rem;
  color: #fff;
  font-size: clamp(3.5rem, 8vw, 8.8rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .89;
}

.terms-hero__lead {
  max-width: 690px;
  margin: 0;
  color: rgb(255 255 255 / 88%);
  font-size: clamp(1.05rem, 1.65vw, 1.35rem);
  line-height: 1.55;
}

.terms-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2rem;
}

.terms-hero__meta span {
  padding: .55rem .8rem;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 999px;
  color: rgb(255 255 255 / 90%);
  font-size: .84rem;
}

.terms-section {
  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(4.5rem, 9vw, 9rem);
}

.terms-section__heading {
  display: grid;
  grid-template-columns: minmax(7rem, .26fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: clamp(2.25rem, 5vw, 4.5rem);
}

.terms-section h2 {
  max-width: 850px;
  margin: 0;
  color: var(--terms-purple-deep);
  font-family: "Noto Serif Thai", Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
  overflow-wrap: anywhere;
}

.terms-section__body {
  margin-inline-start: clamp(0rem, 16vw, 13rem);
}

.terms-section__body--wide {
  margin-inline-start: 0;
}

.terms-section__intro,
.terms-enquiry-copy p,
.terms-section__body--dark > p,
.terms-section__body--split p,
.terms-contact-copy p,
.terms-policy-card p,
.terms-highlight p,
.terms-scope-note p,
.terms-rule-note p {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.22rem);
  line-height: 1.68;
}

.terms-section__intro {
  margin-bottom: 2.6rem;
  color: rgb(37 23 46 / 76%);
}

.terms-clause-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.terms-clause,
.terms-scope-note {
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2.4rem);
  border: 1px solid var(--terms-line);
  border-radius: 1.1rem;
  background: var(--terms-lilac-light);
}

.terms-clause__number {
  display: block;
  margin-bottom: 2.2rem;
  color: var(--terms-purple);
  font-size: 1.05rem;
  font-weight: 700;
}

.terms-clause h3,
.terms-principle h3,
.terms-policy-card h3,
.terms-feed h3,
.terms-feed-card h4 {
  margin: 0;
  color: var(--terms-purple-deep);
  font-family: "Noto Serif Thai", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.1;
}

.terms-clause h3 {
  max-width: 21rem;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
}

.terms-clause p {
  margin: 1rem 0 0;
  color: rgb(37 23 46 / 72%);
  font-size: 1rem;
}

.terms-scope-note {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  background: var(--terms-purple-deep);
  color: #fff;
}

.terms-scope-note__label {
  flex: 0 0 auto;
  color: var(--terms-gold);
}

.terms-scope-note p {
  max-width: 42rem;
  color: rgb(255 255 255 / 84%);
}

.terms-section--use {
  max-width: none;
  width: 100%;
  padding-inline: max(24px, calc((100% - 1320px) / 2));
  background: var(--terms-lilac);
}

.terms-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--terms-line);
  background: var(--terms-line);
}

.terms-principle {
  min-width: 0;
  padding: clamp(1.3rem, 3vw, 2.5rem);
  background: var(--terms-lilac);
}

.terms-principle__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 3.5rem;
  border-radius: 50%;
  background: var(--terms-purple);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
}

.terms-principle h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.terms-principle p {
  margin: 1rem 0 0;
  color: rgb(37 23 46 / 75%);
  font-size: 1rem;
}

.terms-section--enquiry {
  padding-bottom: clamp(5rem, 10vw, 10rem);
}

.terms-enquiry-layout,
.terms-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  gap: clamp(2rem, 8vw, 9rem);
  align-items: start;
  margin-inline-start: clamp(0rem, 16vw, 13rem);
}

.terms-enquiry-copy p + p,
.terms-contact-copy p + p {
  margin-top: 1.4rem;
}

.terms-highlight {
  padding: clamp(1.5rem, 3vw, 3rem);
  background: var(--terms-gold);
  color: var(--terms-purple-deep);
}

.terms-highlight__mark {
  display: block;
  margin-bottom: 3.2rem;
  font-size: 2.4rem;
  line-height: 1;
}

.terms-highlight__title {
  margin-bottom: .65rem !important;
  color: var(--terms-purple-deep);
  font-family: "Noto Serif Thai", Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem) !important;
  font-weight: 700;
  line-height: 1.1 !important;
}

.terms-highlight > p:last-child {
  color: rgb(66 34 96 / 78%);
  font-size: 1rem;
}

.terms-section--entertainment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  max-width: none;
  padding: 0;
  background: var(--terms-purple-deep);
}

.terms-section__media {
  position: relative;
  min-height: 560px;
}

.terms-section__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.terms-media-caption {
  position: absolute;
  inset: auto 2rem 2rem;
  color: #fff;
}

.terms-section__body--dark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 7rem);
  color: #fff;
}

.terms-section__body--dark .terms-kicker {
  color: var(--terms-gold);
}

.terms-section__body--dark h2 {
  margin-block: 1.2rem 2rem;
  color: #fff;
}

.terms-section__body--dark > p {
  color: rgb(255 255 255 / 80%);
}

.terms-section__body--dark > p + p {
  margin-top: 1.15rem;
}

.terms-text-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  margin-top: 2rem;
  color: var(--terms-purple-deep);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: .25em;
}

.terms-text-link:hover,
.terms-text-link:focus-visible {
  text-decoration: underline;
}

.terms-text-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.terms-text-link--light {
  color: var(--terms-gold);
}

.terms-section--acceptable,
.terms-section--ip {
  border-bottom: 1px solid var(--terms-line);
}

.terms-section__body--rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, .72fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
}

.terms-rules {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: terms-rule;
}

.terms-rules li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--terms-line);
  color: rgb(37 23 46 / 79%);
  font-size: clamp(1rem, 1.25vw, 1.2rem);
}

.terms-rules li::before {
  counter-increment: terms-rule;
  content: counter(terms-rule, decimal-leading-zero);
  color: var(--terms-purple);
  font-size: .9rem;
  font-weight: 700;
}

.terms-rules strong {
  color: var(--terms-purple-deep);
}

.terms-rule-note {
  padding: 1.7rem;
  border-left: 4px solid var(--terms-gold);
  background: var(--terms-lilac-light);
}

.terms-rule-note__label {
  color: var(--terms-purple-deep);
}

.terms-rule-note p:last-child {
  margin-top: 1rem;
  color: rgb(37 23 46 / 75%);
  font-size: 1rem;
}

.terms-section__body--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 7vw, 8rem);
}

.terms-section__body--split p {
  max-width: none;
  color: rgb(37 23 46 / 78%);
}

.terms-policy-layout {
  display: grid;
  grid-template-columns: minmax(16rem, .72fr) minmax(0, 1.28fr);
  gap: 1rem;
  margin-inline-start: clamp(0rem, 16vw, 13rem);
}

.terms-policy-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 3rem);
  background: var(--terms-gold);
}

.terms-policy-card__eyebrow {
  color: var(--terms-purple-deep);
}

.terms-policy-card h3 {
  margin-top: 3.8rem;
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
}

.terms-policy-card p {
  margin-top: 1.2rem;
  color: rgb(66 34 96 / 78%);
  font-size: 1rem;
}

.terms-policy-card .terms-text-link {
  margin-top: auto;
  color: var(--terms-purple-deep);
}

.terms-feed {
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  border: 1px solid var(--terms-line);
  background: var(--terms-lilac-light);
}

.terms-feed__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--terms-line);
}

.terms-feed h3 {
  margin-top: .5rem;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
}

.terms-feed__status {
  flex: 0 1 auto;
  color: var(--terms-purple);
  font-size: .78rem;
  font-weight: 700;
  text-align: right;
}

.terms-feed__list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.terms-feed-card {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  padding-block: 1rem;
  border-bottom: 1px solid var(--terms-line);
}

.terms-feed-card img {
  display: block;
  width: 8rem;
  height: 8rem;
  object-fit: cover;
}

.terms-feed-card__content {
  min-width: 0;
}

.terms-feed-card time {
  color: var(--terms-purple);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.terms-feed-card h4 {
  margin-top: .4rem;
  font-size: clamp(1.12rem, 1.6vw, 1.45rem);
}

.terms-feed-card p {
  margin: .55rem 0 0;
  color: rgb(37 23 46 / 72%);
  font-size: .92rem;
  line-height: 1.45;
}

.terms-feed-card a {
  display: inline-flex;
  gap: .35rem;
  margin-top: .8rem;
  color: var(--terms-purple-deep);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.terms-feed-card a:hover,
.terms-feed-card a:focus-visible {
  text-decoration: underline;
}

.terms-section--contact {
  padding-bottom: clamp(5rem, 10vw, 10rem);
}

.terms-contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.5rem, 4vw, 3.2rem);
  background: var(--terms-purple-deep);
  color: #fff;
}

.terms-contact-card__label {
  color: var(--terms-gold);
}

.terms-contact-card > a:first-of-type {
  margin-top: 3rem;
  color: #fff;
  font-family: "Noto Serif Thai", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.terms-contact-card .terms-text-link {
  color: var(--terms-gold);
}

.terms-page .site-footer__legal {
  align-items: center;
}

.terms-page .site-footer__legal-link,
.terms-page .site-footer__settings {
  color: var(--terms-purple);
  font: inherit;
  text-decoration: none;
}

.terms-page .site-footer__legal-link:hover,
.terms-page .site-footer__legal-link:focus-visible,
.terms-page .site-footer__settings:hover,
.terms-page .site-footer__settings:focus-visible {
  color: var(--terms-purple-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-page .site-footer__settings {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.terms-page .site-footer__settings:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.terms-button {
  min-height: 2.9rem;
  padding: .7rem 1.15rem;
  border: 1px solid var(--terms-purple-deep);
  border-radius: 999px;
  background: var(--terms-purple-deep);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.terms-button:hover,
.terms-button:focus-visible {
  background: var(--terms-purple);
}

.terms-button:focus-visible,
.account-dialog__close:focus-visible,
.account-dialog__switch:focus-visible,
.consent-preferences__close:focus-visible {
  outline: 3px solid var(--terms-gold);
  outline-offset: 3px;
}

.account-dialog {
  width: min(560px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1.2rem;
  background: var(--terms-paper);
  color: var(--terms-ink);
  box-shadow: 0 2rem 6rem rgb(37 23 46 / 35%);
}

.account-dialog[hidden] {
  display: none;
}

.account-dialog::backdrop {
  background: rgb(37 23 46 / 70%);
}

.account-dialog__panel {
  position: relative;
  max-height: calc(100vh - 2rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  overflow: auto;
}

.account-dialog__close,
.consent-preferences__close {
  position: absolute;
  inset: 1rem 1rem auto auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--terms-line);
  border-radius: 50%;
  background: transparent;
  color: var(--terms-purple-deep);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.account-dialog h2,
.consent-preferences h2 {
  max-width: 20rem;
  margin: .7rem 0 0;
  color: var(--terms-purple-deep);
  font-family: "Noto Serif Thai", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: -.04em;
  line-height: 1;
}

.account-dialog__intro {
  margin: 1rem 0 1.5rem;
  color: rgb(37 23 46 / 72%);
}

.account-form {
  display: grid;
  gap: 1rem;
}

.account-form__field {
  display: grid;
  gap: .4rem;
}

.account-form__field label {
  color: var(--terms-purple-deep);
  font-size: .9rem;
  font-weight: 700;
}

.account-form__field input,
.account-form__field textarea {
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid var(--terms-line);
  border-radius: .55rem;
  background: #fff;
  color: var(--terms-ink);
  font: inherit;
}

.account-form__field textarea {
  resize: vertical;
}

.account-form__field input:focus-visible,
.account-form__field textarea:focus-visible {
  outline: 3px solid rgb(242 200 121 / 75%);
  outline-offset: 2px;
}

.account-form__error {
  min-height: 1.2em;
  margin: 0;
  color: #a32e46;
  font-size: .86rem;
}

.account-form__hint {
  color: rgb(37 23 46 / 64%);
  font-size: .82rem;
}

.account-dialog__switch {
  margin-top: 1.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--terms-purple-deep);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-avatar {
  display: block;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  animation: terms-avatar-in .45s ease both;
}

@keyframes terms-avatar-in {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

.consent-preferences {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(37 23 46 / 70%);
}

.consent-preferences[hidden] {
  display: none;
}

.consent-preferences__panel {
  position: relative;
  width: min(480px, 100%);
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 1rem;
  background: var(--terms-paper);
  box-shadow: 0 2rem 6rem rgb(37 23 46 / 35%);
}

.consent-preferences__panel > p:not(.terms-kicker) {
  margin: 1rem 0 1.5rem;
  color: rgb(37 23 46 / 72%);
}

.consent-preferences__choice {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--terms-purple-deep);
  font-weight: 700;
}

@media (max-width: 900px) {
  .terms-section__heading,
  .terms-enquiry-layout,
  .terms-contact-layout {
    margin-inline-start: 0;
  }

  .terms-section__heading {
    grid-template-columns: minmax(6rem, .28fr) minmax(0, 1fr);
  }

  .terms-policy-layout {
    margin-inline-start: 0;
  }
}

@media (max-width: 720px) {
  .terms-hero__inner,
  .terms-section {
    width: calc(100% - 32px);
  }

  .terms-section--use {
    width: 100%;
    padding-inline: 1rem;
  }

  .terms-section__heading,
  .terms-clause-grid,
  .terms-principles,
  .terms-enquiry-layout,
  .terms-section--entertainment,
  .terms-section__body--rules,
  .terms-section__body--split,
  .terms-policy-layout,
  .terms-contact-layout {
    grid-template-columns: 1fr;
  }

  .terms-section__heading {
    gap: .85rem;
    margin-bottom: 2rem;
  }

  .terms-section__heading .terms-kicker {
    margin-top: .35rem;
  }

  .terms-section__body,
  .terms-enquiry-layout,
  .terms-policy-layout {
    margin-inline-start: 0;
  }

  .terms-scope-note {
    grid-column: auto;
    display: block;
  }

  .terms-scope-note p {
    margin-top: 1.2rem;
  }

  .terms-principle__index {
    margin-bottom: 1.5rem;
  }

  .terms-section__media,
  .terms-section__media img {
    min-height: 300px;
    height: 300px;
  }

  .terms-section__body--dark {
    padding: 3rem 1rem;
  }

  .terms-feed__header {
    display: block;
  }

  .terms-feed__status {
    display: block;
    margin-top: .8rem;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .terms-page [data-helper-shell="header"] {
    min-height: 0;
  }

  .terms-page [data-helper-shell="header"] .site-header__menu-toggle {
    display: block;
  }
}

@media (max-width: 520px) {
  .terms-hero h1 {
    font-size: clamp(3.35rem, 17vw, 5rem);
  }

  .terms-hero__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .terms-feed-card {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .terms-feed-card img {
    width: 5.5rem;
    height: 5.5rem;
  }

  .terms-page .site-footer__legal {
    align-items: flex-start;
  }
}
