/* ==========================================================================
   The Grit Chronicles — Design Tokens & Base
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,900&display=swap');

:root {
  /* Color */
  --bg-black: #0a0a0a;
  --bg-grey: #131313;
  --card-bg: #000000;
  --border: #1c1c1c;
  --border-hover: #333333;
  --text-white: #ffffff;
  --text-grey: rgba(255, 255, 255, 0.5);
  --text-grey-dim: rgba(255, 255, 255, 0.28);
  --green: #00bc54;
  --green-dark: #007736;
  --green-mid: #008f41;
  --gold: #f5c518;

  /* Type */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --section-pad-y: 100px;
  --section-pad-y-mobile: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Noise texture applied per-section via .section-noise */
.section-noise {
  position: relative;
}

.section-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-pad-y-mobile) 0;
  }
}

.section--black {
  background-color: var(--bg-black);
}

.section--grey {
  background-color: var(--bg-grey);
}

/* Eyebrow label — used sparingly above section titles */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

.section-title {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-subtext {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-grey);
  line-height: 1.55;
  max-width: 640px;
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

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

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  .section-subtext {
    font-size: 1rem;
  }
}