/* ===== CSS Custom Properties (Dark by default) ===== */
:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --text: #e8e8e8;
  --text-muted: #888888;
  --border: #222222;
  --accent: #ffffff;
  --card-bg: #111111;
  --card-border: #1a1a1a;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-secondary: #f0f0f0;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #e0e0e0;
  --accent: #000000;
  --card-bg: #ffffff;
  --card-border: #e8e8e8;
}

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

/* ===== Base ===== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  opacity: 0.7;
}

/* ===== Header / Nav ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo img {
  width: 32px;
  height: 32px;
  transition: filter 0.2s;
}

[data-theme="light"] .logo img,
[data-theme="light"] .hero-logo img {
  filter: invert(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-right a {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.nav-right a:hover {
  color: var(--text);
  opacity: 1;
}

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

#theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Theme toggle icons: show sun in dark mode, moon in light mode */
.icon-sun, .icon-moon {
  display: none;
}

.icon-sun { display: block; }

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Invert white/gray icons in light mode */
[data-theme="light"] #theme-toggle img,
[data-theme="light"] .footer-links img {
  filter: invert(1);
}

/* ===== Main ===== */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-top: 4rem;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 6rem 0 4rem;
}

.hero-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.hero-logo img {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
}

/* ===== Star Glow ===== */
.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 0;
}

.ray {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.3) 40%,
    transparent
  );
  border-radius: 1px;
}

[data-theme="light"] .ray {
  background: linear-gradient(
    to top,
    rgba(200, 16, 46, 0.5),
    rgba(200, 16, 46, 0.12) 40%,
    transparent
  );
}

.hero h1 {
  font-family: var(--font-body);
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  color: var(--accent);
}

.hero h1 .sted {
  font-weight: 700;
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto 0.75rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.flag {
  display: inline-flex;
  align-items: center;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ===== Product Cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s;
}

.product-card:hover {
  border-color: var(--text-muted);
}

.product-card h3 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
  opacity: 1;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

/* ===== About ===== */
.about-content {
  max-width: 640px;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-content a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.about-content a:hover {
  border-color: var(--text);
  opacity: 1;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
