:root {
  --bg: #0b0f14;
  --surface: #12181f;
  --fg: #f2f5f7;
  --muted: #9aa7b0;
  --border: #2a333b;
  --accent: #3ea6ff;
  --accent-fg: #04121f;
  --max-width: 1200px;

  /* Header keeps a fixed dark identity regardless of page theme, like a
     storefront's brand navbar — only the page body follows the toggle. */
  --header-bg: #131a20;
  --header-bg-alt: #0c1116;
  --header-fg: #f2f5f7;
  --header-muted: #9aa7b0;
  --header-border: #232c34;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f6f8;
  --fg: #14181c;
  --muted: #5b6670;
  --border: #dde3e8;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --surface: #f4f6f8;
    --fg: #14181c;
    --muted: #5b6670;
    --border: #dde3e8;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

/* ---- header ---- */

.site-header {
  background: var(--header-bg);
  color: var(--header-fg);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  color: var(--header-fg);
  flex-shrink: 0;
}

/* -- search -- */

.header-search {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  height: 2.5rem;
  border-radius: 6px;
  overflow: visible;
}

.search-category {
  display: none;
  border: none;
  border-radius: 6px 0 0 6px;
  background: #e2e6ea;
  color: #14181c;
  font-size: 0.8rem;
  padding: 0 0.5rem;
  max-width: 8rem;
}

.search-form {
  display: flex;
  flex: 1;
  min-width: 0;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input-wrap input {
  width: 100%;
  height: 100%;
  border: none;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  color: #14181c;
  background: #ffffff;
}

.search-input-wrap input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 20;
}

.search-suggestions li {
  padding: 0.55rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-suggestions li:hover {
  background: var(--surface);
}

.search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  flex-shrink: 0;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

.search-form button svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* -- actions -- */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: 1px solid var(--header-border);
  border-radius: 999px;
  color: var(--header-fg);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

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

.auth-text {
  display: none;
}

.btn {
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--header-border);
  white-space: nowrap;
}

.btn-ghost {
  color: var(--header-fg);
  background: none;
}

.btn-primary {
  color: var(--accent-fg);
  background: var(--accent);
  border-color: var(--accent);
}

/* -- tag strip -- */

.tag-strip {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.55rem 1rem;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--header-bg-alt);
  scrollbar-width: none;
}

.tag-strip::-webkit-scrollbar {
  display: none;
}

.tag-strip a {
  color: var(--header-muted);
  text-decoration: none;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.tag-strip a:hover, .tag-strip a:focus-visible, .tag-strip a.active {
  color: var(--header-fg);
}

.tag-sep {
  width: 1px;
  height: 1rem;
  background: var(--header-border);
  flex-shrink: 0;
}

/* ---- hero / sections ---- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  margin: 0 0 0.75rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 auto 1.75rem;
  max-width: 40ch;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
}

.services {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.placeholder {
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
}

@media (min-width: 640px) {
  .auth-icon {
    display: none;
  }
  .auth-text {
    display: inline-block;
  }
  .search-category {
    display: block;
  }
}

@media (min-width: 900px) {
  .header-top {
    padding: 1rem 3rem;
  }
  .tag-strip {
    padding: 0.55rem 3rem;
  }
  .hero {
    padding: 5rem 2rem 3rem;
  }
}
