/* ==========================================================================
   Sahuut! Design System — tokens, resets, layout, nav
   ========================================================================== */

:root {
  --bg: #F7F8FC;
  --surface: #FFFFFF;
  --surface-alt: #F0F1F9;
  --primary: #635BFF;
  --primary-dark: #4E47D6;
  --secondary: #00B8D9;
  --accent: #FFB020;
  --success: #22C55E;
  --danger: #EF4444;
  --text: #171A2B;
  --muted: #6B7280;
  --border: #E5E7F0;

  --opt-a: #7C6BFF;
  --opt-b: #00B8D9;
  --opt-c: #FFB020;
  --opt-d: #22C55E;

  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-input: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(23, 26, 43, 0.06);
  --shadow-md: 0 8px 30px rgba(23, 26, 43, 0.10);
  --shadow-lg: 0 16px 50px rgba(23, 26, 43, 0.16);

  --font-main: 'Plus Jakarta Sans', 'Google Sans', Inter, system-ui, -apple-system, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0F1020;
  --surface: #191B2E;
  --surface-alt: #22243B;
  --primary: #8B7FFF;
  --primary-dark: #6D5FFF;
  --secondary: #22D3EE;
  --accent: #FFC24B;
  --success: #34D399;
  --danger: #F87171;
  --text: #F3F4FA;
  --muted: #9498B3;
  --border: #2C2E48;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1020;
    --surface: #191B2E;
    --surface-alt: #22243B;
    --primary: #8B7FFF;
    --primary-dark: #6D5FFF;
    --secondary: #22D3EE;
    --accent: #FFC24B;
    --success: #34D399;
    --danger: #F87171;
    --text: #F3F4FA;
    --muted: #9498B3;
    --border: #2C2E48;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* fallback for old browsers */
  overflow-x: clip;   /* clips without turning html/body into scroll containers (breaks mobile scrolling) */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

::selection { background: var(--primary); color: #fff; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- Nav ---------------- */

.fq-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.fq-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.fq-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  margin-right: auto;
}
.fq-logo__icon { font-size: 1.4rem; }
/* Brand logo image. The logo already includes the "Sahuut!" wordmark, so it
   stands alone (no text beside it). Sized by height; width auto keeps aspect. */
.fq-logo__img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Theme-aware logo swap: show the light logo by default, the dark-theme logo when
   dark mode is active (explicit toggle OR system preference). Both <img>s are in
   the DOM; CSS toggles which one is visible. */
.fq-logo__img--dark { display: none; }
.fq-join-logo__img.fq-logo__img--dark { display: none; }

:root[data-theme="dark"] .fq-logo__img--light { display: none; }
:root[data-theme="dark"] .fq-logo__img--dark { display: block; }
:root[data-theme="dark"] .fq-join-logo__img.fq-logo__img--dark { display: inline-block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fq-logo__img--light { display: none; }
  :root:not([data-theme="light"]) .fq-logo__img--dark { display: block; }
  :root:not([data-theme="light"]) .fq-join-logo__img.fq-logo__img--dark { display: inline-block; }
}

.fq-nav__links {
  display: flex;
  gap: 20px;
  font-weight: 600;
  color: var(--muted);
}
.fq-nav__links a:hover { color: var(--text); }

.fq-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fq-nav__burger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

.fq-nav__mobile {
  display: none;
  flex-direction: column;
  padding: 8px 24px 16px;
  gap: 4px;
}
.fq-nav__mobile a {
  padding: 10px 8px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--muted);
}
.fq-nav__mobile a:hover { background: var(--surface-alt); color: var(--text); }
.fq-nav__mobile.open { display: flex; }

@media (max-width: 760px) {
  .fq-nav__links { display: none; }
  .fq-nav__actions .fq-btn { display: none; }
  .fq-nav__burger { display: inline-flex; }
}

.icon-sun, .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .icon-moon { display: block; }
}

.fq-main {
  min-height: calc(100vh - 70px);
  min-height: calc(100dvh - 70px);
}

.fq-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.fq-container--narrow {
  max-width: 760px;
}

@media (max-width: 600px) {
  .fq-container { padding: 20px 16px 60px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.fq-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
}
/* Keep page content clear of the fixed footer so nothing hides behind it. */
.fq-main { padding-bottom: 84px; }
.fq-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.fq-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}
.fq-footer__copy { color: var(--muted); font-size: 0.85rem; }
/* Footer logo is smaller than the nav logo. */
.fq-footer__brand .fq-logo__img { height: 30px; }

@media (max-width: 600px) {
  .fq-footer__inner { justify-content: center; text-align: center; }
}
