/* ================================================================
   base.css — Reset, Custom Properties, Typography, Accessibility
   Shared with signos.app — keep in sync
   ================================================================ */

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

/* Custom Properties — Brand derived from logo (blue + gold) */
:root {
  --brand-blue: #3B8BC4;
  --brand-blue-dark: #2A6FA8;
  --brand-blue-light: #5AA3D6;
  --brand-gold: #C8963E;
  --brand-gold-dark: #A87A2F;
  --brand-gold-light: #D4AB5C;

  --surface-0: #000000;
  --surface-1: #0D1829;
  --surface-2: #0B1120;

  --text-primary: #F0F2F5;
  --text-secondary: #9CA3AF;
  --text-tertiary: rgba(255, 255, 255, 0.6);

  --glass-bg: rgba(11, 17, 32, 0.6);
  --glass-border: rgba(59, 139, 196, 0.12);

  --color-success: #16a34a;
  --color-success-light: #4ade80;
  --color-warning: #ca8a04;
  --color-warning-light: #fbbf24;
  --color-error: #dc2626;
  --color-error-light: #f87171;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 24px;

  color-scheme: dark;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Focus */
*:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 3px;
}
.btn:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

/* Base Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--surface-0);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p { text-wrap: pretty; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

/* Section Spacing */
section {
  padding: 5rem 0;
  position: relative;
}
@media (min-width: 1024px) {
  section { padding: 6.5rem 0; }
}
@media (max-width: 639px) {
  section { padding: 3.5rem 0; }
  section + section { border-top: 1px solid rgba(59, 139, 196, 0.18); }
}

/* Section Backgrounds */
.section--alt {
  background: var(--surface-1);
}
.section--accent {
  background: rgba(59, 139, 196, 0.03);
}

/* Noise Texture Overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* High Contrast / Forced Colors */
@media (forced-colors: active) {
  .pillar-card, .use-card, .step-card, .trust-strip__badge {
    border: 1px solid CanvasText;
    background: Canvas;
  }
  .btn {
    border: 2px solid LinkText;
  }
  .nav.scrolled {
    background: Canvas;
    border-bottom-color: CanvasText;
  }
}
