/* ==========================================================================
   base.css — AI Governance Radar
   Reset, body defaults, and typography baseline.
   All values reference tokens from tokens.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Box-sizing reset
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   Root & body
   -------------------------------------------------------------------------- */

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

body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-light);
  font-size: var(--text-body-md);
  line-height: var(--line-height-normal);
  color: var(--color-white);
  background-color: var(--color-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Typography — headings
   League Gothic is used for display headings (h1–h3).
   Montserrat is used for h4–h6 and all body-level headings.
   -------------------------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-display);
  text-transform: uppercase;
  color: var(--color-white);
}

h1 { font-size: var(--text-display-xl); }
h2 { font-size: var(--text-display-lg); }
h3 { font-size: var(--text-display-md); }

h4,
h5,
h6 {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-tight);
  color: var(--color-white);
}

h4 { font-size: var(--text-body-xl); }
h5 { font-size: var(--text-body-lg); }
h6 { font-size: var(--text-body-md); }

/* --------------------------------------------------------------------------
   Typography — body text
   -------------------------------------------------------------------------- */

p {
  font-size: var(--text-body-md);
  line-height: var(--line-height-normal);
  color: rgba(255, 255, 255, 0.88);
}

p + p {
  margin-top: var(--space-4);
}

strong,
b {
  font-weight: var(--font-weight-regular);
}

em,
i {
  font-style: italic;
}

small {
  font-size: var(--text-body-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */

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

a:hover,
a:focus-visible {
  color: var(--color-secondary);
  text-decoration: underline;
}

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

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Images & media
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   Form element resets
   -------------------------------------------------------------------------- */

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  border: none;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
select,
textarea {
  width: 100%;
  outline: none;
}

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

select {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

/* --------------------------------------------------------------------------
   Horizontal rule
   -------------------------------------------------------------------------- */

hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-6) 0;
}

/* --------------------------------------------------------------------------
   Icon utility — inline SVG use elements
   Icons always inherit currentColor for fill.
   -------------------------------------------------------------------------- */

.icon {
  display: inline-block;
  width:  1em;
  height: 1em;
  fill: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm  { width: 1rem;    height: 1rem;    } /*  16px */
.icon-md  { width: 1.25rem; height: 1.25rem; } /*  20px */
.icon-lg  { width: 1.5rem;  height: 1.5rem;  } /*  24px */
.icon-xl  { width: 2rem;    height: 2rem;    } /*  32px */
.icon-2xl { width: 3rem;    height: 3rem;    } /*  48px */

/* --------------------------------------------------------------------------
   Accessibility utilities
   -------------------------------------------------------------------------- */

.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;
}

/* --------------------------------------------------------------------------
   Skeleton loader animation (used in report views while Claude API loads)
   -------------------------------------------------------------------------- */

@keyframes skeleton-pulse {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.skeleton {
  border-radius: var(--border-radius-sm);
  background: linear-gradient(
    90deg,
    var(--color-bg-tint) 25%,
    #d4e8f0 50%,
    var(--color-bg-tint) 75%
  );
  background-size: 200% auto;
  animation: skeleton-pulse 1.5s linear infinite;
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 75%;
}
