/* CHECKMAÎTRÉX CHESS CLUB
Luxury Black & Gold Theme */

:root {
--black: #0b0b0b;
--dark: #151515;
--gold: #d4af37;
--light-gold: #f1d77a;
--white: #f5f5f5;
--muted: #b8b8b8;
}

- {
  box-sizing: border-box;
  }

html {
scroll-behavior: smooth;
}

body {
margin: 0;
background: var(--black);
color: var(--white);
font-family: Arial, Helvetica, sans-serif;
line-height: 1.6;
}

a {
color: var(--gold);
text-decoration: none;
transition: color 0.2s ease;
}

a:hover {
color: var(--light-gold);
}

header {
position: sticky;
top: 0;
z-index: 1000;
background: rgba(11, 11, 11, 0.97);
border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

nav {
max-width: 1200px;
margin: auto;
padding: 16px 5%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
}

nav a {
color: var(--white);
font-weight: 600;
}

nav a:hover,
nav a.active {
color: var(--gold);
}

h1, h2, h3 {
line-height: 1.2;
}

h1, h2 {
color: var(--gold);
}

section {
padding: 64px 6%;
}

button,
.button {
display: inline-block;
padding: 12px 22px;
border: 1px solid var(--gold);
border-radius: 6px;
background: var(--gold);
color: var(--black);
font-weight: bold;
cursor: pointer;
transition: 0.2s ease;
}

button:hover,
.button:hover {
background: transparent;
color: var(--gold);
}

.card {
padding: 24px;
background: var(--dark);
border: 1px solid #333;
border-radius: 12px;
}

.card:hover {
border-color: var(--gold);
}

img {
max-width: 100%;
height: auto;
}

footer {
padding: 28px 6%;
text-align: center;
color: var(--muted);
background: #080808;
border-top: 1px solid rgba(212, 175, 55, 0.3);
}

@media (max-width: 700px) {
nav {
padding: 14px 5%;
flex-wrap: wrap;
}

section {
padding: 44px 5%;
}

h1 {
font-size: 2rem;
}
}
/* =====================================
CHECKMAÎTRÉX SMOOTH DROPDOWN ANIMATION
===================================== */

/* Animate dropdown when opened */
.main-nav details[open] > .dropdown {
animation: dropdownOpen 0.25s ease both;
transform-origin: top;
}

/* Animate dropdown when closing */
.main-nav details.is-closing > .dropdown {
animation: dropdownClose 0.22s ease both;
pointer-events: none;
}

/* Dropdown entrance */
@keyframes dropdownOpen {
from {
opacity: 0;
transform: translateY(-8px);
}

to {
opacity: 1;
transform: translateY(0);
}
}

/* Dropdown exit */
@keyframes dropdownClose {
from {
opacity: 1;
transform: translateY(0);
}

to {
opacity: 0;
transform: translateY(-8px);
}
}

/* Animate each dropdown link */
.main-nav details[open]:not(.is-closing) .dropdown a {
animation: menuItemFade 0.25s ease both;
}

.main-nav details[open] .dropdown a:nth-child(1) {
animation-delay: 0.03s;
}

.main-nav details[open] .dropdown a:nth-child(2) {
animation-delay: 0.06s;
}

.main-nav details[open] .dropdown a:nth-child(3) {
animation-delay: 0.09s;
}

.main-nav details[open] .dropdown a:nth-child(4) {
animation-delay: 0.12s;
}

@keyframes menuItemFade {
from {
opacity: 0;
transform: translateY(-5px);
}

to {
opacity: 1;
transform: translateY(0);
}
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
.main-nav details[open] > .dropdown,
.main-nav details[open] .dropdown a,
.main-nav details.is-closing > .dropdown {
animation-duration: 0.01ms;
}
}
/* =====================================
   ABOUT THIS WEBSITE MODAL
   ===================================== */

.about-modal[hidden] {
  display: none;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.about-modal.is-visible {
  opacity: 1;
}

.about-modal-panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  background: #0b0b0b;
  color: #f5f5f5;
  border: 1px solid #b99750;
  border-radius: 14px;
  box-shadow: 0 20px 60px #000b;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
  outline: none;
}

.about-modal.is-visible .about-modal-panel {
  transform: translateY(0) scale(1);
}

.about-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #80652f;
  border-radius: 50%;
  background: #171717;
  color: #f1d77a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.about-modal-close:hover {
  background: #d4af37;
  color: #0b0b0b;
}

.about-modal-close:focus-visible {
  outline: 2px solid #f1d77a;
  outline-offset: 3px;
}

.about-modal-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 25px;
}

.about-modal-brand img {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  object-fit: contain;
}

.about-modal-eyebrow {
  margin: 0 0 5px;
  color: #d4af37;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1.5px;
}

.about-modal-brand h2 {
  margin: 0;
  color: #f1d77a;
  font-size: clamp(1.2rem, 4vw, 1.65rem);
}

.about-modal-subtitle {
  margin: 5px 0 0;
  color: #b8b8b8;
  font-size: 0.85rem;
}

.about-modal-divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(
    to right,
    transparent,
    #b99750,
    transparent
  );
}

.about-modal-content h3 {
  margin: 0 0 10px;
  color: #f1d77a;
  font-size: 1.1rem;
}

.about-modal-content > p {
  color: #d0d0d0;
  font-size: 0.94rem;
  line-height: 1.75;
}

.about-modal-details {
  display: grid;
  gap: 0;
  margin: 22px 0;
  padding: 4px 16px;
  background: #171717;
  border: 1px solid #30291c;
  border-radius: 10px;
}

.about-modal-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.about-modal-detail + .about-modal-detail {
  border-top: 1px solid #39332a;
}

.about-modal-icon {
  width: 28px;
  flex-shrink: 0;
  color: #d4af37;
  font-size: 1.35rem;
  text-align: center;
}

.about-modal-label {
  color: #b8b8b8;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.about-modal-detail p {
  margin: 3px 0 0;
  color: #f5f5f5;
  overflow-wrap: anywhere;
}

.about-modal-content .about-modal-credits-title {
  margin-top: 24px;
}

.about-modal-content .about-modal-created {
  margin: 0;
  color: #b8b8b8;
  font-size: 0.85rem;
}

.about-modal-content .about-modal-creator {
  margin: 2px 0 10px;
  color: #d4af37;
  font-size: 1.3rem;
  font-weight: bold;
  overflow-wrap: anywhere;
}

.about-modal-content .about-modal-acknowledgment {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.about-modal-footer {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.about-modal-footer p {
  margin: 0 0 8px;
  color: #f1d77a;
  font-weight: bold;
}

.about-modal-footer small {
  color: #b8b8b8;
  font-size: 0.72rem;
}

@media (max-width: 480px) {
  .about-modal {
    padding: 12px;
  }

  .about-modal-panel {
    max-height: calc(100vh - 24px);
    padding: 22px 18px;
    border-radius: 12px;
  }

  .about-modal-brand {
    gap: 11px;
    padding-right: 20px;
  }

  .about-modal-brand img {
    width: 58px;
    height: 58px;
  }

  .about-modal-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  .about-modal-subtitle {
    font-size: 0.78rem;
  }

  .about-modal-divider {
    margin: 18px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-modal,
  .about-modal-panel {
    transition: none;
  }
}
