/**
 * Base Styles
 *
 * Reset, root variables, loading curtain, and utility classes.
 * refs: journal/v01/2026-01-28_1_ui_design_spec.md
 */

/* ===========================================
   SELF-HOSTED FONTS (Inter + Literata)
   Variable-weight woff2, latin subset only.
   =========================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../vendor/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../vendor/fonts/literata-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../vendor/fonts/literata-latin-italic.woff2') format('woff2');
}

/* ===========================================
   VUE LOADING CURTAIN
   =========================================== */

.vue-curtain {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vue-curtain--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-label {
  font-size: var(--fs-sm, 0.875rem);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.loading-text {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===========================================
   BASE STYLES
   =========================================== */

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

body {
  font-family: var(--font);
  font-size: var(--fs-lg);
  line-height: 1.5;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* Panel dimensions as CSS variables */
:root {
  --threads-width: 180px;
  --header-height: 38px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text',
          'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Literata', Georgia, 'Times New Roman', serif;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
