/* ============================================================
   3R GEEKS — Base
   Reset, body, typography scale, global elements, utilities.
   Depends on: tokens.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;900&family=Catamaran:wght@400;500;600;700;900&display=swap');


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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-text-link-hover); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

::selection {
  background: var(--color-primary-light);
  color: var(--color-secondary);
}


/* ── Skip link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: #fff;
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: var(--space-4); }


/* ── Headings ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-heading);
  letter-spacing: var(--tracking-tight);
}

/* Barlow Condensed display — hero h1s only */
.display-heading {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }
h5 { font-size: var(--text-lg);  }
h6 { font-size: var(--text-base);}

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
  .display-heading { font-size: var(--text-6xl); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-6xl); }
  .display-heading { font-size: var(--text-7xl); }
}


/* ── Body text ───────────────────────────────────────────── */
p {
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}
p + p { margin-top: var(--space-4); }

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


/* ── Section overline label ──────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  color: var(--label-color);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

/* Intro paragraph */
.section-intro {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 68ch;
}
@media (min-width: 768px) {
  .section-intro { font-size: var(--text-xl); }
}

/* Accent divider line under headlines */
.divider--accent {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin: var(--space-4) 0 var(--space-6);
}

.divider--accent-center {
  margin-inline: auto;
}


/* ── Image handling ──────────────────────────────────────── */
/* Placeholder — brand-tinted until real image drops in */
.img-placeholder {
  background: linear-gradient(
    135deg,
    var(--color-primary-light) 0%,
    var(--color-secondary-light) 100%
  );
  object-fit: cover;
}

.aspect-video    { aspect-ratio: 16 / 9; }
.aspect-square   { aspect-ratio: 1 / 1;  }
.aspect-portrait { aspect-ratio: 3 / 4;  }
.aspect-hero     { aspect-ratio: 16 / 7; }


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

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

.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent    { color: var(--color-accent); }
.text-muted     { color: var(--color-text-muted); }
.text-inverse   { color: var(--color-text-inverse); }

.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }

.hidden  { display: none !important; }
.w-full  { width: 100%; }
.overflow-hidden { overflow: hidden; }
.rounded-full    { border-radius: var(--radius-full); }
.max-w-prose     { max-width: 65ch; }
