/* =============================================================
 * SUNSHINE — Base & Reset
 * Typography defaults, normalize-ish reset, form baselines.
 * ============================================================= */

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

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button { cursor: pointer; }

a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline);
  color: var(--color-surface-dark);
  text-wrap: balance;
}

h1 { font-size: var(--fs-display); font-weight: var(--fw-bold); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-headline); line-height: var(--lh-headline); }
h3 { font-size: var(--fs-title);  font-weight: var(--fw-medium); line-height: var(--lh-title); }
h4 { font-size: 1.0625rem; font-weight: var(--fw-semibold); }

p { margin: 0 0 var(--space-md); max-width: var(--measure-body); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-md); padding-inline-start: 1.4em; }

hr {
  border: 0;
  border-top: var(--border-1);
  margin: var(--space-2xl) 0;
}

small, .meta { font-size: var(--fs-small); line-height: var(--lh-meta); color: var(--color-text-muted); }

strong { font-weight: var(--fw-semibold); }

code, pre, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
pre {
  background: var(--color-surface-raised);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  overflow: auto;
  border: var(--border-1);
}

blockquote {
  margin: var(--space-2xl) 0;
  padding: 0;
  border: 0;
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: var(--fw-medium);
  color: var(--color-surface-dark);
  max-width: 50ch;
  text-wrap: pretty;
}
blockquote p { font-size: inherit; max-width: none; }

table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
th, td { padding: var(--space-sm) var(--space-md); text-align: start; vertical-align: top; border-bottom: var(--border-1); }
th { font-weight: var(--fw-semibold); color: var(--color-surface-dark); background: var(--color-surface-raised); }
caption { caption-side: bottom; padding: var(--space-sm); color: var(--color-text-muted); font-size: var(--fs-small); }

/* Screen-reader only */
.screen-reader-text, .sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--space-md);
  z-index: var(--z-tooltip);
  background: var(--color-surface);
  color: var(--color-primary);
  padding: var(--space-sm) var(--space-md);
  border: var(--border-1-primary);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
}
.skip-link:focus {
  inset-block-start: var(--space-md);
}

/* Prose body for case studies / whitepapers / application pages */
.prose { max-width: var(--measure-prose); }
.prose p,
.prose ul,
.prose ol { max-width: var(--measure-prose); }
.prose h2 { margin-block: var(--space-2xl) var(--space-md); }
.prose h3 { margin-block: var(--space-xl) var(--space-sm); }

/* Eyebrow label — kept minimal; usage restricted (DESIGN.md §9) */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-primary);
  display: inline-block;
  margin-block-end: var(--space-sm);
  text-transform: none;
}
