/* ----- Theme: Dark (default) ----- */
:root {
  --bg: #0c0e14;
  --bg-alt: #12151d;
  --surface: #161a24;
  --surface-hover: #1c212e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6e9f0;
  --text-muted: #8b92a6;
  --accent: #5b9cf4;
  --accent-soft: #7eb8f7;
  --accent-bg: rgba(91, 156, 244, 0.12);
  --focus-ring: #5b9cf4;
  --shadow: rgba(0, 0, 0, 0.4);
}

/* ----- Theme: Light ----- */
[data-theme="light"] {
  --bg: #f6f7fa;
  --bg-alt: #eef0f5;
  --surface: #ffffff;
  --surface-hover: #f0f2f7;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1a1d26;
  --text-muted: #5a6178;
  --accent: #2563eb;
  --accent-soft: #3b76ef;
  --accent-bg: rgba(37, 99, 235, 0.1);
  --focus-ring: #2563eb;
  --shadow: rgba(0, 0, 0, 0.08);
}

/* ----- Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--accent-soft);
}

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

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

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-self: start;
}

.header-logo img {
  height: 36px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-self: center;
}

.header-inner .theme-toggle {
  justify-self: end;
}

.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.header-nav a:hover {
  color: var(--text);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.theme-icon {
  display: inline-flex;
  line-height: 1;
}

.theme-icon svg {
  display: block;
}

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

[data-theme="light"] .theme-icon--light {
  display: inline;
}

.theme-icon--light {
  display: none;
}

.theme-icon--dark {
  display: inline;
}

/* ----- Hero ----- */
.hero {
  padding: 4rem 1.5rem 5rem;
  background: var(--bg-alt);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 3.5rem;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 20px 40px var(--shadow));
}

.hero-content {
  max-width: 36rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

/* ----- Sections ----- */
.section {
  padding: 4rem 1.5rem;
}

.section--alt {
  background: var(--bg-alt);
}

.section--cta {
  background: var(--surface);
  border: 1px solid var(--border);
  margin: 0 1.5rem;
  border-radius: 16px;
  padding: 3.5rem 1.5rem;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: 640px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--text);
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.section p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.section p:last-child {
  margin-bottom: 0;
}

.ethos {
  font-size: 1.1rem;
  color: var(--text);
}

/* ----- Product list ----- */
.product-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.product-list li {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.product-list strong {
  color: var(--text);
  font-weight: 600;
}

/* ----- Cards ----- */
.cards-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.cards-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--accent-bg);
  background: var(--surface-hover);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}

.card--wide {
  padding: 1.35rem 1.5rem;
}

/* ----- Early Access form ----- */
.early-access-form {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.form-row {
  flex: 1;
  min-width: 180px;
}

.early-access-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.early-access-form input::placeholder {
  color: var(--text-muted);
}

.early-access-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.early-access-form .btn {
  flex-shrink: 0;
}

/* ----- Footer ----- */
.site-footer {
  padding: 2rem 1.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text);
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-logo-wrap {
    order: -1;
  }

  .hero-logo {
    max-width: 240px;
    margin: 0 auto;
  }

  .hero-content {
    max-width: none;
  }

  .hero-actions {
    justify-content: center;
  }

  .cards-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-nav a:not(.header-logo) {
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0.6rem 1rem;
  }

  .header-nav {
    gap: 0.75rem;
  }

  .header-nav a {
    font-size: 0.8rem;
  }

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

  .section,
  .section--alt {
    padding: 3rem 1rem;
  }

  .section--cta {
    margin: 0 1rem;
    padding: 2.5rem 1rem;
  }

  .cards-grid--four {
    grid-template-columns: 1fr;
  }

  .early-access-form {
    flex-direction: column;
  }

  .form-row {
    min-width: 100%;
  }

  .early-access-form .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
