/* ============================================================
   fMMA BASE STYLES
   Resets, typography, global element defaults.
   Import after tokens.css, before components.css.
   ============================================================ */

/* ----------------------------------------------------------
   RESET & BOX MODEL
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.auth-gate-pending > *:not(#authGateOverlay) {
  visibility: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ----------------------------------------------------------
   TYPOGRAPHY SCALE
   ---------------------------------------------------------- */

/* Display headings — Barlow Condensed */
.t-display-xl {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.t-display-lg {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.t-display-md {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.t-display-sm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0;
  line-height: 1.2;
}

/* Italic display — for event names, hero moments */
.t-display-italic {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.01em;
}

/* Label — Courier Prime mono, uppercase, spaced */
.t-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem; /* 11px */
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

/* Eyebrow — Barlow Condensed caps */
.t-eyebrow {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

/* Body text */
.t-body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.t-body-sm {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Stat value — large numeric display */
.t-stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* ----------------------------------------------------------
   GLOBAL LAYOUT CONTAINER
   ---------------------------------------------------------- */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ----------------------------------------------------------
   GLOBAL SECTION LABEL
   Reusable divider used above card groups across all pages.
   ---------------------------------------------------------- */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '◆';
  color: var(--accent);
  font-size: 0.5rem;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   GLOBAL BUTTONS
   ---------------------------------------------------------- */

/* Primary — red fill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  min-height: 36px;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), opacity var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-dark);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn-dark {
  background: var(--palette-black);
  color: var(--text-on-dark);
}

.btn-dark:hover:not(:disabled) {
  background: #2a2a2a;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: var(--text-on-dark);
}

.btn-outline:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-dark {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline-dark:hover:not(:disabled) {
  border-color: var(--text-primary);
}

.btn-full {
  width: 100%;
}

/* ----------------------------------------------------------
   GLOBAL FORM ELEMENTS
   ---------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   STATUS / BADGE COLOURS
   ---------------------------------------------------------- */
.status-good    { color: var(--status-good); }
.status-warn    { color: var(--status-warn); }
.status-pending { color: var(--status-pending); }
.status-muted   { color: var(--text-muted); }

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

.text-center { text-align: center; }
.text-right  { text-align: right; }

[hidden] {
  display: none !important;
}