/* ==========================================================================
   ToolPulse Base & Reset Stylesheet
   ========================================================================== */

/* Localized Font Face Links to minimize render blocking layout shifts */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 800;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  src: url(https://gstatic.com) format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  src: url(https://gstatic.com) format('truetype');
}

/* Global Tokens / Variables */
:root {
  color-scheme: light;
  --color-bg: #f7f9fc; 
  --color-surface: #ffffff; 
  --color-surface-2: #eef2f8;
  --color-text: #172033; 
  --color-muted: #667085; 
  --color-border: #e2e8f0;
  --color-primary: #4f46e5; 
  --color-primary-hover: #4338ca; 
  --color-primary-soft: #eef2ff;
  --color-accent: #06b6d4; 
  --color-success: #15803d; 
  --color-danger: #dc2626;
  
  --shadow-sm: 0 1px 3px rgb(16 24 40 / .08);
  --shadow-md: 0 12px 32px rgb(16 24 40 / .09);
  
  --radius-sm: 8px; 
  --radius-md: 14px; 
  --radius-lg: 22px;
  
  --container: 1160px; 
  --header-height: 72px;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0b1020; 
  --color-surface: #121a2d; 
  --color-surface-2: #1a2540;
  --color-text: #edf2ff; 
  --color-muted: #a4afc5; 
  --color-border: #293650;
  --color-primary: #818cf8; 
  --color-primary-hover: #a5b4fc; 
  --color-primary-soft: #20294b;
  --color-accent: #22d3ee; 
  --color-success: #4ade80; 
  --color-danger: #f87171;
  
  --shadow-sm: 0 1px 3px rgb(0 0 0 / .22); 
  --shadow-md: 0 12px 32px rgb(0 0 0 / .28);
}

/* Core Box Reset */
*, *::before, *::after { 
  box-sizing: border-box; 
}

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: calc(var(--header-height) + 20px); 
}

body { 
  margin: 0; 
  min-width: 320px; 
  background: var(--color-bg); 
  color: var(--color-text); 
  line-height: 1.6; 
}

body, button, input, textarea, select { 
  font-family: "DM Sans", system-ui, sans-serif; 
}

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

img { 
  height: auto; 
}

a { 
  color: var(--color-primary); 
  text-decoration: none; 
}

a:hover { 
  text-decoration: underline; 
}

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

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

/* Consistent Focus Indicators for Accessibility */
:focus-visible { 
  outline: 3px solid color-mix(in srgb, var(--color-primary) 55%, transparent); 
  outline-offset: 3px; 
}

/* Global Layout Utilities */
.container, .site-container { 
  width: min(calc(100% - 40px), var(--container)); 
  margin-inline: auto; 
}

main { 
  min-height: 60vh; 
}

.section { 
  padding-block: 64px; 
}

.section-heading { 
  max-width: 680px; 
  margin: 0 auto 32px; 
  text-align: center; 
}

.section-heading h1, .section-heading h2 { 
  margin: 0 0 12px; 
  font-family: Manrope, sans-serif; 
  line-height: 1.15; 
  letter-spacing: -.035em; 
}

.section-heading p { 
  margin: 0; 
  color: var(--color-muted); 
}

h1, h2, h3, h4 { 
  font-family: Manrope, "DM Sans", sans-serif; 
  line-height: 1.2; 
  letter-spacing: -.025em; 
}

p { 
  margin-block: 0 1rem; 
}

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

.eyebrow { 
  color: var(--color-primary); 
  font-size: .78rem; 
  font-weight: 800; 
  letter-spacing: .12em; 
  text-transform: uppercase; 
}

/* Accessibility Keyboard Skip-Link */
.skip-to-content { 
  position: absolute; 
  left: 12px; 
  top: -60px; 
  z-index: 9999; 
  padding: 10px 14px; 
  background: var(--color-surface); 
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); 
  box-shadow: var(--shadow-md); 
  transition: top 0.2s ease;
}

.skip-to-content:focus { 
  top: 12px; 
}

/* Visibility Helper toggles */
[hidden], .hidden { 
  display: none !important; 
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
