/* ============================================================
   WapiGrow — base.css (Updated with UI/UX Pro Max Design System v2.0)
   Reset, typography, root styles — Plus Jakarta Sans, new tokens
   ============================================================ */

@layer base {
  /* ── Font Import ── */
  @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

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

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

  body {
    font-family: var(--wg-font);
    font-size: var(--wg-text-base);
    line-height: var(--wg-text-base);
    color: var(--color-text);
    background: var(--color-bg-soft);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

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

  svg {
    vertical-align: middle;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul, ol {
    list-style: none;
  }

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

  button {
    cursor: pointer;
  }

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

  /* ── Focus Visible ── */
  :focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
  }

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

  /* ── Selection ── */
  ::selection {
    background: var(--color-primary-glow);
    color: var(--color-primary-dark);
  }

  /* ── Typography ── */
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-text);
  }

  h1 {
    font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl));
    font-weight: var(--font-weight-extrabold);
  }

  h2 {
    font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-4xl));
    font-weight: var(--font-weight-bold);
  }

  h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
  }

  h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
  }

  h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
  }

  h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
  }

  p {
    margin: 0 0 var(--space-4);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
  }

  p:last-child {
    margin-bottom: 0;
  }

  strong, b {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
  }

  small {
    font-size: var(--font-size-sm);
  }

  code, kbd, samp, pre {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
  }

  code {
    background: var(--color-bg-muted);
    padding: 0.125em 0.375em;
    border-radius: var(--radius-sm);
  }

  pre {
    background: var(--color-navy-dark);
    color: var(--color-gray-100);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-4) 0;
  }

  pre code {
    background: none;
    padding: 0;
    color: inherit;
  }

  blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-4);
    margin: var(--space-6) 0;
    font-style: italic;
    color: var(--color-text-secondary);
  }

  /* ── Link Styles ── */
  a[href] {
    transition: color var(--transition-fast) var(--ease);
  }

  a[href]:hover {
    color: var(--color-primary);
  }

  /* ── Lists ── */
  ul, ol {
    padding-left: var(--space-6);
    margin: var(--space-4) 0;
  }

  li {
    margin: var(--space-2) 0;
  }

  /* ── Horizontal Rule ── */
  hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-8) 0;
  }

  /* ── Screen Reader Only ── */
  .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;
  }
}