/* ============================================================
   CiCC Theme 4.0 — Reset & Base
   Layer: base/reset
   ============================================================ */

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--cicc-white);
  }

  /* ── Images ── */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
  }

  img:not([width]):not([height]) {
    max-width: 100%;
    height: auto;
  }

  /* ── Form Elements ── */
  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }

  button {
    cursor: pointer;
    border: none;
    background: none;
  }

  /* ── Links ── */
  a {
    color: var(--cicc-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  a:hover {
    color: var(--cicc-blue-600);
  }

  /* ── Lists ── */
  ul, ol {
    list-style: none;
  }

  /* ── Headings ── */
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
    color: var(--gray-900);
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  h1 { font-size: var(--text-h1); }
  h2 { font-size: var(--text-h2); }
  h3 { font-size: var(--text-h3); }
  h4 { font-size: var(--text-xl); }
  h5 { font-size: var(--text-lg); }
  h6 { font-size: var(--text-base); text-transform: uppercase; letter-spacing: 0.05em; }

  p { overflow-wrap: break-word; }

  /* ── Focus ── */
  :focus-visible {
    outline: 2px solid var(--cicc-blue);
    outline-offset: 2px;
  }

  /* ── Selection ── */
  ::selection {
    background: var(--cicc-blue);
    color: var(--cicc-white);
  }

  /* ── Scroll anchor offset ── */
  :target {
    scroll-margin-block: calc(var(--total-header-height) + var(--space-4));
  }
}
