/* ═══════════════════════════════════════════════════════════
   BASE STYLES & RESET — Feedback Hub Shared
═══════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

/* ═══════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--grad-warm), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--grad-cool), transparent 60%);
  background-attachment: fixed;
  transition:
    background-color var(--transition-theme),
    color var(--transition-theme);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h2 {
  font-size: 28px;
  font-weight: 500;
}

h3 {
  font-size: 20px;
  font-weight: 500;
}

h4 {
  font-size: 16px;
  font-weight: 500;
}

p {
  margin: 0;
  color: var(--text);
}

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

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

strong {
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--bg-2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

pre {
  font-family: var(--font-mono);
  font-size: 12px;
  background-color: var(--bg-2);
  color: var(--text);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.4;
}

pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════════════════════════ */

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  color: var(--text);
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: var(--transition-colors);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-mute);
}

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

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR (Webkit)
═══════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 8px;
  border: 2px solid var(--bg-0);
  transition: var(--transition-colors);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-h);
}

/* ═══════════════════════════════════════════════════════════
   FOCUS & ACCESSIBILITY
═══════════════════════════════════════════════════════════ */

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

/* Touch Target Size (WCAG: minimum 44×44 CSS pixels) */
button,
a[role="button"],
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"] {
  min-width: var(--touch-min, 44px);
  min-height: var(--touch-min, 44px);
}

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */

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

thead {
  background-color: var(--bg-2);
}

th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

tbody tr:hover {
  background-color: var(--bg-2);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════════════════════ */

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.muted {
  color: var(--text-mute);
}

.dim {
  color: var(--text-dim);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes toast-in {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-rise {
  animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-in {
  animation: slide-in 0.28s ease;
}

.animate-toast {
  animation: toast-in 0.25s ease;
}

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════════════ */

@media print {
  body {
    background-color: white;
    color: black;
  }

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

  button,
  .no-print {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
