/* ============================================================
   DMJ Shell — Reset, Utilities, Nav, Topbar, Footer
   Exact match to prototype: tournaments.css sections 2–8, 13–14
   ============================================================ */

/* ── Reset & Base ── */
html, body {
  margin: 0;
  padding: 0;
  background: var(--sand);
  font-family: var(--font-sans);
}
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }

/* ── Utility Classes ── */
.teal-gradient     { background: var(--grad-teal); }
.red-gradient      { background: var(--grad-red); }
.red-gradient-diag { background: var(--grad-red-d); }
.gradient-text {
  background: var(--grad-teal-d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 0.2em; /* extend gradient box to cover italic glyph overhang */
}
.cover-img   { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fw-bold     { font-weight: 700; }
.inline-mid  { display: inline-block; vertical-align: middle; }
.clearfix    { clear: both; }
.text-center { text-align: center; }

/* ── Page Shell ── */
.page {
  background: #ffffff;
  color: var(--ink);
}

/* ── Global container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Top Bar ── */
.topbar {
  color: #ffffff;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 600;
}

/* ── Navigation ── */
.nav-wrapper {
  padding: 18px 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* Glassy effect applied when page is scrolled */
.nav-wrapper--scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.07);
}

.nav-logo {
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 26px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-img    { width: 44px; height: 44px; object-fit: contain; }
.nav-logo-text   { color: var(--red); }
.nav-logo-inline { display: inline; }
.nav-logo-stacked {
  display: none;
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 13px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { margin: 0; padding: 0; display: contents; }
.nav-links a, .nav-links span {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }
.nav-links a.active,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  font-weight: 700;
  color: var(--red);
  border-bottom-color: var(--red);
}

.btn-register {
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  display: inline-block;
  white-space: nowrap;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* ── Mobile Menu Overlay ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.mobile-menu.open { display: flex; }

.mobile-menu a,
.mobile-menu .mm-item {
  font-family: var(--font-serif);
  font-size: 36px;
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

/* WP nav_menu wraps in ul/li — flatten visually */
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.mobile-menu ul li { margin: 0; padding: 0; }

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 28px;
  cursor: pointer;
  color: var(--ink);
  background: none;
  border: none;
}
.btn-register-lg {
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  text-decoration: none;
  display: inline-block;
}

/* ── Shared Section Labels ── */
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

/* ── Footer ── */
.section-footer {
  padding: 72px 48px 36px;
  text-align: center;
  color: #ffffff;
}
.footer-title {
  font-family: var(--font-serif);
  font-size: 72px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -2px;
  line-height: 0.95;
}
.footer-contact {
  font-size: 15px;
  margin-top: 20px;
  margin-bottom: 32px;
  opacity: 0.95;
}
.footer-contact a { color: #ffffff; text-decoration: none; }
.btn-mailing {
  background: #ffffff;
  color: var(--red);
  border: none;
  padding: 14px 32px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  text-decoration: none;
  display: inline-block;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin-top: 36px;
  margin-bottom: 20px;
  list-style: none;
  padding: 0;
}
/* WP nav_menu li inside footer-links */
.footer-links li { display: contents; }
.footer-links li + li::before {
  content: '·';
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}
.footer-link,
.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover,
.footer-links a:hover  { color: #ffffff; }
.footer-link-div       { color: rgba(255, 255, 255, 0.35); font-size: 11px; }
.footer-copyright      { margin-top: 48px; font-size: 11px; opacity: 0.85; letter-spacing: 1px; }

/* ── Footer Social Icons ── */
.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  margin-bottom: 8px;
}
.footer-social__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.footer-social__icons {
  display: flex;
  gap: 12px;
}
.footer-social__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.footer-social__icon:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px);
  color: #ffffff;
  text-decoration: none;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  padding: 8px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ── Screen reader only ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive Mobile ── */
@media (max-width: 768px) {
  .container     { padding: 0 20px; }
  .nav-wrapper   { padding: 12px 16px; justify-content: space-between; }
  .nav-links     { display: none; }
  .btn-register  { display: none; }
  .nav-hamburger { display: flex; }
  .nav-logo      { font-size: 18px; }

  .topbar { font-size: 10px; letter-spacing: 1px; padding: 6px 16px; flex-direction: column !important; gap: 4px !important; }
  .topbar-divider,
  .topbar-phone { display: none !important; }

  .section-footer   { padding: 40px 16px 24px; }
  .footer-title     { font-size: 44px; letter-spacing: -1px; }
  .footer-contact   { font-size: 12px; margin-top: 12px; margin-bottom: 20px; }
  .footer-copyright { margin-top: 24px; font-size: 10px; }
  .footer-links     { gap: 8px 6px; margin-top: 24px; }
  .footer-link,
  .footer-links a   { font-size: 10px; }
}
