/* ============================================
   PlenUp Design System - Base Styles
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  min-height: 100vh;
}

/* ----------------------------------------
   Typography
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-tight);
}

h2 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-snug);
}

h3 {
  font-size: var(--font-size-md);
  line-height: var(--line-height-snug);
}

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

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

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

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

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

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

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

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

/* ----------------------------------------
   Forms - Base Reset
   ---------------------------------------- */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

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

input, select, textarea {
  background: transparent;
  border: none;
  outline: none;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ----------------------------------------
   Tables
   ---------------------------------------- */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* ----------------------------------------
   Selection
   ---------------------------------------- */
::selection {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

/* ----------------------------------------
   Scrollbar (Webkit)
   ---------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-text-secondary);
}

/* ----------------------------------------
   Focus Visible
   ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ----------------------------------------
   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;
}

