/* base.css - AirLink Panel Docs */
/* yeah i know this is a lot of css but it has to look good lol */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  /* dark theme vars */
  --bg:         #0a0a0a;
  --bg2:        #111111;
  --bg3:        #1a1a1a;
  --bg4:        #222222;
  --border:     #2a2a2a;
  --border2:    #383838;
  --text:       #ffffff;
  --text2:      #aaaaaa;
  --text3:      #666666;
  --accent:     #ffffff;
  --accent2:    #dddddd;
  --accent-dim: rgba(255, 255, 255, 0.08);
  --green:      #e0e0e0;
  --green-dim:  rgba(255, 255, 255, 0.07);
  --red:        #999999;
  --shadow:     rgba(0,0,0,0.5);
  --btn-primary-text: #000000;
  --radius:     10px;
  --radius-lg:  16px;
  --mono:       'Space Mono', monospace;
  --sans:       'DM Sans', sans-serif;
}

[data-theme="light"] {
  --bg:         #ffffff;
  --bg2:        #f5f5f5;
  --bg3:        #ebebeb;
  --bg4:        #e0e0e0;
  --border:     #d0d0d0;
  --border2:    #bbbbbb;
  --text:       #000000;
  --text2:      #444444;
  --text3:      #888888;
  --accent:     #000000;
  --accent2:    #222222;
  --accent-dim: rgba(0, 0, 0, 0.07);
  --shadow:     rgba(0,0,0,0.1);
  --btn-primary-text: #ffffff;
}

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

/* make all svgs behave - no random vertical shifts */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text2);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* typography */
h1, h2, h3, h4, h5 {
  font-family: var(--sans);
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
}

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

code, kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- loading bar ---- */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#loading-screen.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.loading-logo-wrap img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 12px var(--accent));
  animation: pulse-glow 1.8s ease-in-out infinite;
}
.loading-logo-wrap span {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--accent)); }
  50% { filter: drop-shadow(0 0 20px var(--accent2)); }
}

.loading-bar-wrap {
  width: 220px;
  height: 3px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.4s ease;
}
.loading-sub {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--mono);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--btn-primary-text);
}
.btn-primary:hover { background: var(--accent2); color: var(--btn-primary-text); transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); background: var(--bg4); }
.btn-outline {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-outline:hover { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
.btn-lg { padding: 13px 28px; font-size: 15px; }

/* ---- code blocks ---- */
.code-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .code-block { background: #ebebf0; }
.code-block:hover .copy-btn { opacity: 1; }
.code-block code {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.85;
  background: none;
  border: none;
  padding: 0;
  word-break: break-all;
}
[data-theme="light"] .code-block code { color: #333; }

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text3);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}
.copy-btn:hover { color: var(--text); background: var(--border); }
.copy-btn.copied { color: var(--green); border-color: var(--green); opacity: 1; }

/* ---- sections ---- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: 32px; margin-bottom: 10px; }
.section-header p { font-size: 16px; color: var(--text3); max-width: 520px; margin: 0 auto; }

/* ---- tag pill ---- */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 99px;
}
.tag.green { color: var(--green); background: var(--green-dim); border-color: var(--border); }

/* ---- badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 99px;
}
.badge-accent { background: var(--accent-dim); color: var(--accent2); border: 1px solid var(--border); }
.badge-green  { background: var(--green-dim);  color: var(--green);   border: 1px solid var(--border); }

/* ---- footer ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 13px; color: var(--text3); margin-top: 10px; max-width: 240px; line-height: 1.6; }
.footer-col h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--mono); color: var(--text3); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { font-size: 13px; color: var(--text3); transition: color 0.2s; }
.footer-col li a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.footer-brand-row { display: flex; align-items: center; gap: 10px; }
.footer-brand-row img { width: 28px; height: 28px; }
.footer-brand-row span { font-size: 16px; font-weight: 600; color: var(--text); }

/* ---- under construction popup ---- */
.uc-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.uc-overlay.active { opacity: 1; pointer-events: auto; }
.uc-popup {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.3s;
}
.uc-overlay.active .uc-popup { transform: none; }
.uc-icon { font-size: 32px; margin-bottom: 14px; }
.uc-popup h2 { font-size: 20px; margin-bottom: 10px; }
.uc-popup p { font-size: 14px; color: var(--text3); margin-bottom: 22px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 64px 0; }
  .section-header h2 { font-size: 24px; }
}
