/* ==========================================================================
   global.css  v4.1 — "Friendly Precision"
   Gauss — Care without clutter. Space is the design.
   Imports design tokens from brand-tokens.css.
   ========================================================================== */

@import url("brand-tokens.css");

/* --------------------------------------------------------------------------
   1. Modern Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   2. Document
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* --------------------------------------------------------------------------
   3. Body — Inter, sky-50 background, antialiased
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-body, "Inter", system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text, var(--gauss-ink-900, #0B1220));
  background-color: var(--color-bg, var(--gauss-sky-50, #F9F9FF));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   4. Typography — Sora headings, tight tracking, clean hierarchy
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-brand, "Sora", system-ui, sans-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text, var(--gauss-ink-900, #0B1220));
}

h1 {
  font-size: var(--text-display, clamp(2.75rem, 5vw + 0.5rem, 4rem));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h2 {
  font-size: var(--text-h2, clamp(1.75rem, 3vw + 0.25rem, 2.5rem));
}

h3 {
  font-size: var(--text-h3, clamp(1.25rem, 2vw + 0.25rem, 1.5rem));
  font-weight: 600;
}

h4 {
  font-size: var(--text-h4, clamp(1.0625rem, 1.5vw + 0.125rem, 1.25rem));
  font-weight: 600;
}

p + p {
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   5. Links
   -------------------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   6. Containers
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 2rem;
}

.container--narrow {
  max-width: 720px;
}

/* --------------------------------------------------------------------------
   7. Sections — generous breathing room
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-padding, clamp(5rem, 8vw, 7rem));
}

.section--alt {
  background-color: var(--color-bg-alt, var(--gauss-sky-100, #EFF3FF));
}

.section--dark {
  background-color: var(--gauss-black, #0D1117);
  color: #FFFFFF;
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #FFFFFF;
}

.section--dark .text-secondary {
  color: rgba(255, 255, 255, 0.65);
}

/* --------------------------------------------------------------------------
   8. Section Headers — left-aligned default, opt-in centering
   -------------------------------------------------------------------------- */

.section-header {
  max-width: 600px;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-secondary, var(--gauss-ink-700, #374151));
  font-size: var(--text-body-lg, 1.125rem);
  line-height: 1.7;
}

/* Centered variant — opt-in */
.section-header--center {
  text-align: center;
  margin-inline: auto;
}

.section-header--center p {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   9. Utilities
   -------------------------------------------------------------------------- */

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--color-text-secondary, var(--gauss-ink-700, #374151));
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.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;
}

/* --------------------------------------------------------------------------
   10. Text Gradient — brand blue-to-cyan accent
   -------------------------------------------------------------------------- */

.text-gradient {
  background: var(
    --gauss-gradient-brand,
    linear-gradient(135deg, var(--gauss-blue-700, #1050A0), var(--gauss-cyan-500, #3FA4E5))
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   11. Source Note
   -------------------------------------------------------------------------- */

.source-note {
  font-size: 0.75rem;
  color: var(--color-text-secondary, var(--gauss-ink-700, #374151));
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   12. Gauss Arc — shallow convex divider between sections
       A 2px gradient line tracing a bell-curve arc shape.
   -------------------------------------------------------------------------- */

.gauss-arc {
  position: relative;
  overflow: hidden;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauss-arc::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 120%;
  aspect-ratio: 6 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
  background:
    linear-gradient(var(--color-bg, var(--gauss-sky-50, #F9F9FF)), var(--color-bg, var(--gauss-sky-50, #F9F9FF))) padding-box,
    linear-gradient(135deg, var(--gauss-blue-700, #1050A0), var(--gauss-cyan-500, #3FA4E5)) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   13. Selection
   -------------------------------------------------------------------------- */

::selection {
  background-color: rgba(63, 164, 229, 0.18);
  color: var(--gauss-ink-900, #0B1220);
}

/* --------------------------------------------------------------------------
   14. Responsive — 768px
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .container {
    padding-inline: 1.5rem;
  }

  .section {
    padding-block: clamp(3rem, 6vw, 5rem);
  }

  .section-header {
    margin-bottom: 2rem;
  }
}
