/* ==========================================================================
   Tangkas Sport - Base Design System "Papan Skor"
   ========================================================================== */

:root {
  /* Design Tokens */
  --black: #0c0d0f;
  --white: #ffffff;
  --paper: #f2f2ef;
  --orange: #ff5a1f; /* Sinyal CTA */
  --steel: #8a929c;
  --line: #d9dadc;
  --ok: #1f8a4c;
  --warn: #b3261e;

  /* Typography */
  --font-heading: "Barlow Condensed", "Arial Narrow", -apple-system, sans-serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Component Properties */
  --border-thick: 2px solid var(--black);
  --border-thin: 1px solid var(--line);
  --radius-sharp: 2px;
  --shadow-hard: 4px 4px 0 var(--black);
  --shadow-hard-hover: 6px 6px 0 var(--black);
  --shadow-hard-sm: 2px 2px 0 var(--black);
  --transition-fast: 150ms cubic-bezier(0, 0, 0.2, 1);
  --container-max: 1240px;
  --header-height: 64px;
}

/* CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--paper);
  color: var(--black);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  color: var(--black);
  overflow-x: hidden;
}

main {
  flex: 1;
}

/* Typography Rules */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em; /* +1% tracking */
  line-height: 1.1;
  color: var(--black);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

p, li, label, input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--black);
}

small {
  font-size: 0.85rem;
  color: var(--steel);
}

a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--orange);
}

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

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

/* Accessibility & Focus States */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.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;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }
