/* ============================================================
   TWEET — CSS Reset & Normalize
   ============================================================ */

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-primary);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── Typography Reset ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: inherit;
}

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

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

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

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

img { height: auto; }

/* ── Form Reset ── */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

textarea { resize: vertical; }

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

/* ── Table Reset ── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── Misc ── */
fieldset {
  border: none;
}

summary { cursor: pointer; }

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* ── Focus Styles ── */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-600);
}

/* ── Placeholder ── */
::placeholder {
  color: var(--color-gray-400);
  opacity: 1;
}

/* ── Accessibility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-top);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  transition: top var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-4);
}
