/* =========================================================
   Base: reset, typography, buttons, nav, footer, motion
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
html.i18n-pending body { opacity: 0; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  font-kerning: normal;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: opacity 0.5s ease;
}

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-soft); }
::selection { background: rgba(201, 182, 255, 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -64px; z-index: 100;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink-strong); color: #0a0c12;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; color: #0a0c12; }

/* ---- Atmosphere canvas (js/atmosphere.js) ---- */
.atmosphere {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
main, .site-footer { position: relative; z-index: 2; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

/* ---- Typography ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 22px;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow--line::before {
  content: "";
  width: 44px; height: 1px;
  background: linear-gradient(90deg, var(--bio), transparent);
}
/* Display serif: light, high-contrast, tight but not cramped */
.display {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.012em;
  color: var(--ink-strong);
  font-variant-ligatures: common-ligatures discretionary-ligatures;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}
.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--bio-soft);
  text-shadow: 0 0 42px rgba(143, 227, 168, 0.28);
}
.h2 { font-size: var(--fs-h2); }
.lead {
  max-width: 46ch;
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.section-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px clamp(40px, 6vw, 96px);
  align-items: end;
}

/* Glowing pill word, from the original hero */
.glow {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0.12em;
  padding: 0 0.42em 0.08em;
  border: 1px solid rgba(201, 182, 255, 0.34);
  border-radius: 999px;
  background: rgba(201, 182, 255, 0.05);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #fbf8ff;
  text-shadow: 0 0 26px rgba(201, 182, 255, 0.75), 0 0 60px rgba(201, 182, 255, 0.35);
  animation: vd-halo 6s ease-in-out infinite;
}

.pulse-dot {
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bio);
  animation: pulse 2.6s ease-out infinite;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out), background 0.3s, color 0.3s;
}
.btn--primary {
  background: linear-gradient(180deg, #ffffff, #e4e2fb);
  color: #0a0c12;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 18px 60px rgba(201, 182, 255, 0.3);
}
.btn--primary:hover {
  color: #0a0c12;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75), 0 22px 74px rgba(201, 182, 255, 0.5);
}
.btn--ghost {
  background: rgba(233, 241, 246, 0.04);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { color: var(--ink-strong); box-shadow: inset 0 0 0 1px rgba(201, 182, 255, 0.5); }
.btn--sm { min-height: 40px; padding: 0 22px; font-size: 10.5px; letter-spacing: 0.2em; }
.btn--lg { min-height: 60px; padding: 0 44px; font-size: 12px; }
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- Navigation ---- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.site-nav.is-scrolled,
.site-nav.is-open {
  background: rgba(4, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-color: var(--line);
}
.site-nav__inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--nav-h);
  padding-inline: clamp(20px, 3vw, 40px);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand:hover { color: var(--ink-strong); }
.brand svg { width: 26px; height: 26px; filter: drop-shadow(0 0 8px rgba(143, 227, 168, 0.45)); }

/* Club logo (assets/img/logo.png); falls back to the leaf icon if the file is missing */
.brand__mark { display: inline-grid; place-items: center; }
.brand__logo {
  width: 42px; height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(111, 242, 208, 0.35));
  transition: transform 0.6s var(--ease-out);
}
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.06); }
.brand__leaf { display: none; }
.brand__mark.no-logo .brand__logo { display: none; }
.brand__mark.no-logo .brand__leaf { display: block; }
.site-footer .brand__logo { width: 64px; height: 64px; }
@media (max-width: 420px) { .brand__logo { width: 34px; height: 34px; } }

.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); margin-left: auto; }
.nav-links a:not(.btn) {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.nav-links a:not(.btn):hover { color: var(--ink-strong); }
.nav-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }

.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-mute);
}
.nav-back:hover { color: var(--ink-strong); }

.lang {
  display: inline-flex; align-items: center;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.lang button {
  min-width: 38px; min-height: 30px;
  padding: 0 10px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.lang button:hover { color: var(--ink-strong); }
.lang button[aria-pressed="true"] { background: rgba(201, 182, 255, 0.16); color: var(--ink-strong); }

.menu-toggle {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  border: 0; border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.menu-toggle__bar {
  position: absolute; left: 13px; right: 13px;
  height: 1px; background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}
.menu-toggle__bar:nth-child(1) { top: 17px; }
.menu-toggle__bar:nth-child(2) { top: 24px; }
.site-nav.is-open .menu-toggle__bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.site-nav.is-open .menu-toggle__bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 26px;
    background: rgba(4, 6, 10, 0.95);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s var(--ease-out), visibility 0.3s;
  }
  .site-nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 20px; min-height: 50px; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .nav-back__text { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 14px; letter-spacing: 0.12em; gap: 10px; }
  .brand svg { width: 22px; height: 22px; }
  .nav-actions { gap: 10px; }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(44px, 8vh, 80px) var(--gutter) 28px;
  font-size: 13px;
  color: var(--ink-faint);
  background: linear-gradient(180deg, transparent, rgba(4, 6, 10, 0.85) 40%);
}
.site-footer__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}
.site-footer__motto {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink-soft);
}
.site-footer__motto em { font-style: italic; font-weight: 400; color: var(--bio-soft); }
.footer-label {
  margin-bottom: 14px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-mute);
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink-strong); }
.site-footer__bottom {
  max-width: var(--maxw);
  margin: clamp(40px, 7vh, 64px) auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font-size: 12px; letter-spacing: 0.06em;
}
@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}

/* ---- Motion ---- */
.rise { animation: vd-rise 1.2s var(--ease-out) var(--d, 0s) both; }

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@keyframes vd-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes vd-halo {
  0%, 100% { box-shadow: 0 0 40px rgba(201, 182, 255, 0.18), inset 0 0 30px rgba(201, 182, 255, 0.07); }
  50% { box-shadow: 0 0 78px rgba(201, 182, 255, 0.34), inset 0 0 42px rgba(201, 182, 255, 0.13); }
}
@keyframes vd-pool {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scaleY(1); }
  50% { opacity: 0.95; transform: translateX(-50%) scaleY(1.14); }
}
@keyframes vd-scroll-hint {
  0%, 100% { opacity: 0.25; transform: translate(-50%, 0); }
  50% { opacity: 0.8; transform: translate(-50%, 7px); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(143, 227, 168, 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(143, 227, 168, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
