/*
 * Base Styles
 * Reset, normalize, and global element styles
 */

/* ============================================
   CSS RESET & NORMALIZE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
  font-family: var(--font-system);
  font-size: var(--text-body);
  line-height: var(--line-height-relaxed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================
   LINKS
   ============================================ */

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

a:hover {
  color: var(--color-accent-gold);
}

a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================
   IMAGES
   ============================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  display: inline-block;
  vertical-align: middle;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ============================================
   LISTS
   ============================================ */

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ============================================
   TABLES
   ============================================ */

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ============================================
   MISC
   ============================================ */

[hidden] {
  display: none !important;
}

::selection {
  background: var(--color-accent-gold-bright);
  color: var(--color-text-on-accent);
}

/* Accessible skip link */
.wms-skip {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.wms-skip:focus {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent-gold-bright);
  color: var(--color-text-on-accent);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

/* Screen reader only text */
.wms-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;
}

/* Keep transformed mobile navigation inside the viewport. */
.wms-site-header, .wms-nav { max-width: 100%; }
.wms-nav { overflow: visible; }
:where(main, section, article, figure, .wms-header, .wms-brand, .wms-nav) { min-width: 0; }
:where(h1, h2, h3, p, a, figcaption) { overflow-wrap: anywhere; }
button, a { -webkit-tap-highlight-color: transparent; }

