/* =====================================================================
   OASIS_OS GitHub Pages -- Dark Terminal Aesthetic
   ===================================================================== */

/* --- Reset & Base --- */

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

:root {
  --bg: #0a0a12;
  --bg-card: #12121e;
  --bg-card-hover: #181828;
  --border: #1e1e2e;
  --border-light: #2a2a3e;
  --text: #c8c8d0;
  --text-dim: #888;
  --text-bright: #e8e8f0;
  --accent: #00ffa3;
  --accent-dim: rgba(0, 255, 163, 0.15);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --mono: "JetBrains Mono", "Fira Code", "Courier New", Courier, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --nav-height: 56px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Navigation --- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(10, 10, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.site-nav.scrolled {
  background: rgba(10, 10, 18, 0.95);
  border-bottom-color: var(--border);
}

.nav-brand {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
  padding: 0.25rem;
}

/* --- Layout --- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* --- Hero --- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 255, 163, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.hero-title .glow {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(0, 255, 163, 0.4), 0 0 60px rgba(0, 255, 163, 0.15);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0, 255, 163, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  border-color: var(--text-dim);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.hero-screenshot {
  margin-top: 3rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 255, 163, 0.05);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Platform Targets --- */

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.platform-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.platform-card .icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.platform-card h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.platform-card .crate {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.platform-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.badge-planned {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--mono);
  background: var(--purple-dim);
  color: var(--purple);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* --- Skin Gallery --- */

.skin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.skin-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.skin-tab:hover {
  color: var(--text);
  border-color: var(--border-light);
}
.skin-tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.skin-panel {
  display: none;
}
.skin-panel.active {
  display: block;
}

.skin-info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.skin-info span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

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

.skin-info .value {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skin-grid img {
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.skin-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.skin-grid .caption {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.35rem;
}

/* --- Features --- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.feature-card h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.feature-card img {
  border-radius: 4px;
  border: 1px solid var(--border);
  margin-top: 0.75rem;
}

/* --- Architecture --- */

.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 2rem;
}

.arch-diagram pre {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre;
}

.arch-diagram .crate-name {
  color: var(--accent);
}

.arch-text {
  max-width: 700px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.arch-text strong {
  color: var(--text-bright);
}

.crate-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  margin-top: 1rem;
}

/* --- PSP Heritage --- */

.psp-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.psp-text {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.psp-text strong {
  color: var(--text-bright);
}

.psp-screenshot {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* --- Getting Started --- */

.build-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}

.build-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.build-tab:hover {
  color: var(--text);
}
.build-tab.active {
  color: var(--accent);
  background: var(--bg-card);
  border-color: var(--accent);
  border-bottom: 1px solid var(--bg-card);
  position: relative;
  z-index: 1;
}

.build-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  padding: 1.5rem;
  margin-top: -1px;
}
.build-panel.active {
  display: block;
}

.build-panel pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
}

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

.build-panel .cmd {
  color: var(--accent);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--accent);
}

.footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.version-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

/* --- Fade-in animation --- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 18, 0.97);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .skin-grid {
    grid-template-columns: 1fr;
  }

  .psp-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .skin-tabs {
    gap: 0.35rem;
  }
  .skin-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
  }
}
