/* base.css — sqowe brand tokens, resets, Montserrat typography, MD3 spacing */

/* ---- Tokens ---- */
:root {
  /* sqowe primary */
  --sqowe-dark-ground: #222222;
  --sqowe-light-purple: #8E88A3;

  /* sqowe secondary */
  --sqowe-light-grey: #B2B3B2;
  --sqowe-dark-purple: #5B5377;

  /* gradient */
  --sqowe-gradient: linear-gradient(135deg, #5B5377 0%, #8E88A3 100%);

  /* semantic */
  --color-bg-dark: var(--sqowe-dark-ground);
  --color-bg-light: #ffffff;
  --color-bg-surface: #f8f8fa;
  --color-text-primary: #222222;
  --color-text-secondary: #5B5377;
  --color-text-muted: #6B6580;
  --color-text-on-dark: #ffffff;
  --color-accent: #8E88A3;
  --color-border: #B2B3B2;
  --color-error: #c62828;
  --color-success: #2e7d32;
  --color-warning: #f57f17;

  /* font */
  --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-bold: 700;

  /* type scale */
  --font-size-h1: 3rem;
  --font-size-h2: 2.25rem;
  --font-size-h3: 1.875rem;
  --font-size-h4: 1.5rem;
  --font-size-h5: 1.25rem;
  --font-size-h6: 1.125rem;
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;

  /* line height */
  --lh-tight: 1.25;
  --lh-normal: 1.6;
  --lh-relaxed: 1.8;

  /* MD3 spacing (8px grid) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* elevation */
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-3: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--font-regular);
  font-size: var(--font-size-body);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-surface);
  min-height: 100vh;
}

/* ---- Typography ---- */
h1, .h1 { font-size: var(--font-size-h1); font-weight: var(--font-bold); line-height: var(--lh-tight); margin-bottom: var(--space-lg); }
h2, .h2 { font-size: var(--font-size-h2); font-weight: var(--font-bold); line-height: var(--lh-tight); margin-bottom: var(--space-lg); }
h3, .h3 { font-size: var(--font-size-h3); font-weight: var(--font-medium); line-height: var(--lh-tight); margin-bottom: var(--space-md); }
h4, .h4 { font-size: var(--font-size-h4); font-weight: var(--font-medium); line-height: var(--lh-normal); margin-bottom: var(--space-md); }
h5, .h5 { font-size: var(--font-size-h5); font-weight: var(--font-medium); line-height: var(--lh-normal); margin-bottom: var(--space-sm); }
h6, .h6 { font-size: var(--font-size-h6); font-weight: var(--font-medium); line-height: var(--lh-normal); margin-bottom: var(--space-sm); }

p { margin-bottom: var(--space-md); max-width: 70ch; }
a { color: var(--sqowe-dark-purple); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--sqowe-light-purple); }

/* Body-content links get underlines for discoverability / accessibility */
p a,
.table--empty a,
.form-help a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
p a:hover,
.table--empty a:hover,
.form-help a:hover {
  text-decoration-color: var(--sqowe-light-purple);
}

/* ---- Focus ---- */
*:focus-visible {
  outline: 2px solid var(--sqowe-light-purple);
  outline-offset: 2px;
}

/* ---- Utilities ---- */
.text-small { font-size: var(--font-size-small); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-center p { margin-inline: auto; }
.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;
}

/* Skip link — visible on focus for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--sqowe-dark-purple);
  color: var(--color-text-on-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-small);
  font-weight: var(--font-medium);
  z-index: 1100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-sm);
  outline: 2px solid var(--sqowe-light-purple);
  outline-offset: 2px;
}

/* UI state utilities */
.is-hidden {
  display: none;
}

/* ---- Footer ---- */
.footer {
  background: var(--sqowe-dark-ground);
  padding: var(--space-lg) 0;
  margin-top: var(--space-3xl);
}

.footer__inner {
  text-align: center;
}

.footer .text-muted {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}
