/* Kitsune Nexus marketing site - trimmed theme, same accent/badge system
   as the admin panel but without any auth-only components (nav-panel,
   modals, toggle switches, date picker) that this public site has no
   use for. */

:root {
  --color-bg: #f7f6f2;
  --color-surface: #eeebe4;
  --color-surface-2: #e3dfd5;
  --color-border: #d8d6cd;
  --color-text: #2c2c2a;
  --color-text-secondary: #6b6a63;
  --color-accent: #C35817;
  --color-accent-text: #ffffff;

  --badge-success-bg: #dcfce7; --badge-success-text: #15803d;
  --badge-warning-bg: #fef3c7; --badge-warning-text: #b45309;
  --badge-danger-bg: #fee2e2;  --badge-danger-text: #b91c1c;

  --icon-feature: #009E00;
  --icon-subfeature: #4698B3;
  --icon-task: #AF9800;
  --icon-bug: #B31D03;
}

[data-theme="dark"] {
  --color-bg: #1c1c1a;
  --color-surface: #262623;
  --color-surface-2: #333330;
  --color-border: #46453f;
  --color-text: #ece9e0;
  --color-text-secondary: #a6a49a;
  --color-accent: #C35817;
  --color-accent-text: #ffffff;

  --badge-success-bg: #14532d; --badge-success-text: #86efac;
  --badge-warning-bg: #78350f; --badge-warning-text: #fcd34d;
  --badge-danger-bg: #7f1d1d;  --badge-danger-text: #fca5a5;

  --icon-feature: #00E200;
  --icon-subfeature: #64D9FF;
  --icon-task: #FAD800;
  --icon-bug: #FF2A04;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #1c1c1a;
    --color-surface: #262623;
    --color-surface-2: #333330;
    --color-border: #46453f;
    --color-text: #ece9e0;
    --color-text-secondary: #a6a49a;
    --color-accent: #C35817;
    --color-accent-text: #ffffff;

    --badge-success-bg: #14532d; --badge-success-text: #86efac;
    --badge-warning-bg: #78350f; --badge-warning-text: #fcd34d;
    --badge-danger-bg: #7f1d1d;  --badge-danger-text: #fca5a5;

    --icon-feature: #00E200;
    --icon-subfeature: #64D9FF;
    --icon-task: #FAD800;
    --icon-bug: #FF2A04;
  }
}

* { box-sizing: border-box; }

/* Custom scrollbars (WebKit/Blink only - Chrome, Edge, Safari; Firefox
   has no equivalent and falls back to its own native scrollbar).
   Colors use theme variables rather than fixed hex, so both track and
   thumb automatically adapt between light/dark. */
::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface-2);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  filter: brightness(0.85);
}
::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
}
.site-header .brand img { width: 34px; height: 34px; object-fit: contain; }
.header-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.site-nav-desktop {
  display: flex;
  align-items: center;
}
.site-nav-desktop a,
.site-nav-mobile a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav-desktop a + a { margin-left: 1.5rem; }
.site-nav-desktop a i,
.site-nav-mobile a i { margin-right: 0.4rem; }
.site-nav-desktop a:hover,
.site-nav-mobile a:hover { color: var(--color-text); }

/* Hidden entirely outside the mobile breakpoint - only meant to exist
   as the slide-out panel below 768px. */
.site-nav-mobile { display: none; }

.theme-toggle-icon {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
}
.theme-toggle-icon:hover { color: var(--color-text); }

.nav-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
}

/* Mobile: collapse the nav behind a hamburger button.
   768px rather than 640px, as a safety margin for larger phones. */
@media (max-width: 768px) {
  .nav-toggle-btn { display: block; }
  .site-nav-desktop { display: none; }

  /* Sticky so it stays as a stable, known anchor point for the fixed-
     position menu below - without this, the menu's "top" would only be
     correct if the page was scrolled to the very top when opened.

     .container has its own left/right padding (1.5rem) to keep content
     readable - since .site-header is a child of .container, its
     background would otherwise only span .container's inner width, not
     the true viewport edge-to-edge, leaving a gap on each side where
     .site-nav-mobile (which IS full-bleed, via position:fixed) shows
     through underneath. Negative margins push the header's box back out
     to the real edges; matching padding keeps the actual content (logo,
     nav) sitting in the same visual position as before. */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--color-bg);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* position:fixed (not absolute) so this spans the full viewport width,
     rather than being constrained to .container's centered max-width -
     --header-height is set by JS (see base.html) to the header's actual
     rendered height, so this reliably starts right at the header's
     bottom edge regardless of font size, logo size, etc.
     z-index is lower than .site-header's, AND - critically - this is a
     sibling of .site-header in the DOM, not a descendant of it, so that
     z-index comparison actually takes effect (a descendant can never
     paint behind its own ancestor's background no matter what z-index
     it's given). */
  .site-nav-mobile {
    display: flex;
    position: fixed;
    top: var(--header-height, 70px);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    z-index: 2;
    padding: 1.25rem 1.5rem;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
  }
  .site-nav-mobile.nav-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.28s ease, visibility 0s linear 0s;
  }
  .site-nav-mobile a {
    font-size: 1.05rem;
  }
}

.surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-accent-text);
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.subtitle {
  font-weight: 600;
  color: var(--color-text-secondary);
}

table.roadmap-items {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}
table.roadmap-items th {
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  padding: 0.4rem;
}
table.roadmap-items td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

table.roadmap-subfeatures {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.6rem;
  margin-top: 0.75rem;
}
table.roadmap-subfeatures > tbody > tr > td {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 8px;
  padding: 1rem;
}

/* Mobile: turn each Task/Bug row into a small 2-line card instead of a
   cramped 4-column table row. The desktop table layout above stays
   completely untouched - this only kicks in below the breakpoint. */
@media (max-width: 768px) {
  table.roadmap-items thead { display: none; }
  table.roadmap-items,
  table.roadmap-items tbody {
    display: block;
    width: 100%;
  }
  table.roadmap-items tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "icon title status"
      "due  due  due";
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.6rem;
  }
  table.roadmap-items td {
    display: block;
    border-bottom: none;
    padding: 0;
    text-align: left !important;
  }
  table.roadmap-items td:nth-child(1) { grid-area: icon; }
  table.roadmap-items td:nth-child(2) { grid-area: title; font-weight: 600; }
  table.roadmap-items td:nth-child(3) {
    grid-area: status;
    text-align: right !important;
  }
  table.roadmap-items td:nth-child(4) {
    grid-area: due;
    text-align: left !important;
    color: var(--color-text-secondary);
    font-size: 0.82rem;
  }
}

.site-footer {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  padding: 2rem 0;
}
