/* =========================================================
   PITCH. / BASE
   Global document & typography foundation
   ========================================================= */

/* =========================================================
   DOCUMENT
   ========================================================= */

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);

  background: var(--color-bg);
  color: var(--color-text);

  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  background: var(--color-bg);

  color: var(--color-text-primary);

  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);

  overflow-x: hidden;
}

/* =========================================================
   SELECTION
   ========================================================= */

::selection {
  background: var(--color-primary);
  color: #020403;
}

::-moz-selection {
  background: var(--color-primary);
  color: #020403;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-3) var(--color-bg);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border: 2px solid var(--color-bg);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-strong);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-primary);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

h1 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-6xl));

  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));

  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(var(--text-xl), 2vw, var(--text-2xl));

  letter-spacing: -0.02em;
}

h4 {
  font-size: var(--text-xl);
  letter-spacing: -0.015em;
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-md);
}

p {
  color: var(--color-text-secondary);
}

small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

strong,
b {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

em,
i {
  font-style: italic;
}

mark {
  padding: 0.1em 0.25em;

  background: var(--color-primary);
  color: #020403;

  border-radius: var(--radius-xs);
}

/* =========================================================
   LINKS
   ========================================================= */

a {
  color: inherit;
  text-decoration: none;
}

a:not([class]) {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(0, 255, 102, 0.4);
  text-underline-offset: 0.2em;
  transition:
    color var(--transition-base),
    text-decoration-color var(--transition-base);
}

a:not([class]):hover {
  color: var(--color-primary-hover);
  text-decoration-color: currentColor;
}

a:not([class]):focus-visible {
  outline: none;
  border-radius: var(--radius-xs);
  box-shadow: var(--focus-ring);
}

/* =========================================================
   MEDIA
   ========================================================= */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

img {
  border-style: none;
}

svg {
  width: auto;
  height: auto;
}

iframe {
  border: 0;
}

/* =========================================================
   FIGURES
   ========================================================= */

figure {
  display: block;
}

figcaption {
  margin-top: var(--space-2);

  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* =========================================================
   LISTS
   ========================================================= */

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  margin: 0;
}

ul:not([class]),
ol:not([class]) {
  padding-left: var(--space-6);
}

ul:not([class]) {
  list-style: disc;
}

ol:not([class]) {
  list-style: decimal;
}

li + li {
  margin-top: var(--space-2);
}

/* =========================================================
   QUOTES
   ========================================================= */

blockquote {
  padding-left: var(--space-4);

  border-left: 2px solid var(--color-primary);

  color: var(--color-text-secondary);
}

/* =========================================================
   CODE
   ========================================================= */

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
}

code,
kbd {
  font-size: 0.9em;
}

code {
  padding: 0.15em 0.35em;

  background: var(--color-surface-2);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xs);

  color: var(--color-primary);
}

pre {
  max-width: 100%;
  overflow-x: auto;

  padding: var(--space-4);

  background: var(--color-surface);
  border: 1px solid var(--color-border);

  border-radius: var(--radius-lg);

  color: var(--color-text-secondary);

  tab-size: 2;
}

pre code {
  padding: 0;

  background: transparent;
  border: 0;

  color: inherit;
}

/* =========================================================
   TABLES
   ========================================================= */

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  padding: var(--space-3) var(--space-4);

  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

/* =========================================================
   FORM INHERITANCE
   ========================================================= */

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

/* =========================================================
   NATIVE SELECT POPUPS
   Keep browser/OS dropdown menus readable on the dark UI.
   ========================================================= */

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: #0a0f14;
  color: #eef3f1;
}

select option:disabled {
  color: #69747e;
}

/* =========================================================
   FOCUS
   ========================================================= */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* =========================================================
   HR
   ========================================================= */

hr {
  height: 1px;
  margin: var(--space-6) 0;

  border: 0;
  background: var(--color-border);
}

/* =========================================================
   HIDDEN / ACCESSIBILITY
   ========================================================= */

[hidden] {
  display: none !important;
}

/* Decorative layers remain click-through. Navigation must expose its actual state. */
[aria-hidden="true"] {
  pointer-events: none;
}

/* Visually hidden but accessible to screen readers */
.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;
}

/* =========================================================
   COMMON GLOBAL RULES
   ========================================================= */

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

::placeholder {
  transition: color var(--transition-base);
}

input:focus::placeholder,
textarea:focus::placeholder {
  color: var(--color-text-disabled);
}

/* =========================================================
   MOTION SAFETY
   ========================================================= */

@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;
    scroll-behavior: auto !important;
  }
}

html:not(.pitch-preview-access) a:is([href="/clubs"],[href="/wiki"],[href^="/clubs/"],[href^="/wiki/"],[href*="clubs.html"],[href*="wiki.html"]) {display:none!important;}
