/* =========================================================================
   GEO SOLUTIONS — BASE STYLES v4.0
   Generated: May 2026
   Depends on: tokens.css
   Changes from v1.1:
     - Light mode block REMOVED (dark only at launch)
     - Background grid texture REMOVED (conflicts with Altrum density)
     - Typography sizes pulled from new tokens
     - Letter-spacing tightened on display headings
   ========================================================================= */

/* =========================================================================
   1. RESET / NORMALIZATION
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Prevent horizontal overflow from mega typography.
     `clip` (not `hidden`) does NOT create a new scroll/containing block,
     so position:sticky inside descendants continues to work. */
  overflow-x: clip;
}

body {
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-snug);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* No background-image grid — removed in v4.0 per Phase 7 decision */
  min-height: 100vh;
  /* `clip` instead of `hidden` so position:sticky descendants pin properly */
  overflow-x: clip;
}

/* =========================================================================
   2. TYPOGRAPHY — HEADINGS
   Mapped to v4.0 type scale
   Default weight 600, tight tracking
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-display-xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--text-display-md);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tighter);
}

h3 {
  font-size: var(--text-h2);
}

h4 {
  font-size: var(--text-h3);
}

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

h6 {
  font-size: var(--text-h5);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-text-tertiary);
}

/* =========================================================================
   3. TYPOGRAPHY — PARAGRAPHS, LISTS, INLINE
   ========================================================================= */

p {
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  max-width: 70ch;
}

p.lede {
  font-size: var(--text-body-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.prose-list,
ol.prose-list {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  list-style: revert;
}

ul.prose-list li,
ol.prose-list li {
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

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

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-wide);
}

code {
  background-color: var(--color-bg-surface-1);
  color: var(--color-text-primary);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border-faint);
}

pre {
  background-color: var(--color-bg-surface-1);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  line-height: var(--leading-normal);
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

blockquote {
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--color-text-secondary);
  font-size: var(--text-body-lg);
  line-height: var(--leading-normal);
  font-style: normal;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--color-border-subtle);
  margin: var(--space-12) 0;
}

/* =========================================================================
   4. MEDIA — IMAGES, VIDEOS, FIGURES
   ========================================================================= */

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

img {
  vertical-align: middle;
  border-radius: var(--radius-md);
}

img.no-radius {
  border-radius: 0;
}

figure {
  margin: 0;
}

figcaption {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wide);
  margin-top: var(--space-2);
  text-align: center;
}

/* =========================================================================
   5. FORMS — BASE STYLES
   Component-level styles in components.css
   ========================================================================= */

input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

input,
textarea,
select {
  background-color: var(--color-bg-input);
  border: 1px solid var(--color-border-faint);
  border-radius: var(--radius-xs);
  padding: 18px 22px;
  width: 100%;
  min-height: 60px;
  color: var(--color-text-primary);
  transition: all var(--duration-medium) var(--ease-default);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  background-color: var(--color-bg-input-focus);
  border-color: var(--color-accent);
  padding-left: 26px;
}

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

textarea {
  min-height: 160px;
  resize: vertical;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
}

label {
  display: block;
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  font-weight: var(--weight-medium);
}

/* =========================================================================
   6. UTILITY — SELECTION, ACCESSIBILITY
   ========================================================================= */

::selection {
  background-color: var(--color-accent);
  color: var(--color-text-on-accent);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-text-on-accent);
}

/* 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;
}

/* Focus ring on tab navigation only */
*:focus {
  outline: none;
}

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

/* =========================================================================
   7. SCROLLBAR — DARK THEME
   ========================================================================= */

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

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

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

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

/* Firefox */
html {
  scrollbar-color: var(--color-bg-surface-2) var(--color-bg-base);
  scrollbar-width: thin;
}

/* =========================================================================
   END OF base.css v4.0
   ========================================================================= */
