/* ============================================================
   SatellitePortal — Base Styles (base.css)
   ============================================================ */

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

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

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-md), color var(--transition-md);
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* Editorial body text (articles, posts) */
.entry-content,
.post-content,
.article-body {
  font-family: var(--font-editorial);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.entry-content p,
.post-content p,
.article-body p {
  margin-bottom: 1.25em;
}

/* ── Links ── */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

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

figure { margin: 0; }

/* ── Lists ── */
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.25rem; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; }

/* ── Forms ── */
input, select, textarea, button {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-secondary); border-color: var(--border-strong); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-left: 0; padding-right: 0;
}
.btn-ghost:hover { color: var(--accent-hover); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  line-height: 1.6;
}

.badge-accent   { background: var(--accent-light);   color: var(--accent-text); }
.badge-sat      { background: var(--sat-light);       color: var(--sat-text); }
.badge-success  { background: var(--success-light);   color: var(--success); }
.badge-warning  { background: var(--warning-light);   color: var(--warning); }
.badge-danger   { background: var(--danger-light);    color: var(--danger); }
.badge-info     { background: var(--info-light);      color: var(--info); }
.badge-muted    { background: var(--bg-tertiary);     color: var(--text-muted); }

/* ── Technical data (frequencies, PIDs) ── */
.tech-value,
.freq-value,
.pid-value,
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--sat-color);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  overflow-x: auto;
  line-height: 1.6;
}

/* ── Dividers ── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-6) 0;
}

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

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

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* ── WP Core Classes ── */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.alignfull  { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide  { max-width: var(--container-wide); margin-left: auto; margin-right: auto; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8125rem; color: var(--text-muted); margin-top: 6px; font-style: italic; }

.sticky { /* WP sticky post — no default style override */ }

.screen-reader-text { @extend .sr-only; }

/* ── Pagination ── */
.pagination,
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: var(--space-8) 0;
}

.page-numbers,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.page-numbers:hover,
.nav-links a:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

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