/**
 * PiDesk Landing Page - Base, Reset & Accessibility
 */

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

html {
  font-family: var(--font-sans);
  color-scheme: dark;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* sticky header (68px) + breathing room */
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(255, 42, 59, 0.12), transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(56, 189, 248, 0.05), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin-bottom: var(--space-sm);
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

code, pre, kbd {
  font-family: var(--font-mono);
}

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

/* Accessibility: Clear Focus Visible Outline */
/* Outline (not box-shadow) so component shadows can never hide the ring */
:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

@media (forced-colors: active) {
  :focus-visible {
    outline: 2px solid Highlight;
  }
}

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

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Text Gradients & Utilities */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl) auto;
}

.section-header p {
  font-size: 1.125rem;
}
