/* ============================================================
   The Fradley Family — shared theme tokens & base styles
   Modern command-center aesthetic · light + dark
   ============================================================ */

:root {
  /* Brand */
  --accent:        #5b6ef5;   /* friendly indigo */
  --accent-strong: #4453d6;
  --accent-soft:   #eef0ff;
  --gold:          #f5a623;   /* stars / rewards */
  --green:         #20bf6b;
  --red:           #eb3b5a;
  --pink:          #fc5c9c;
  --teal:          #0fb9b1;

  /* Light surfaces */
  --bg:        #f5f6fb;
  --bg-2:      #eceef6;
  --surface:   #ffffff;
  --surface-2: #f8f9fd;
  --border:    #e6e8f0;
  --text:      #1c2230;
  --text-soft: #5a6275;
  --text-faint:#8a92a6;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(20, 25, 40, .06), 0 1px 3px rgba(20, 25, 40, .05);
  --shadow:    0 6px 22px rgba(28, 34, 60, .08);
  --shadow-lg: 0 18px 50px rgba(28, 34, 60, .16);
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --ring:      0 0 0 3px rgba(91, 110, 245, .28);

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-ui);
}

html[data-theme="dark"] {
  --accent:        #8b9bff;
  --accent-strong: #aab6ff;
  --accent-soft:   #20253c;
  --bg:        #0e1118;
  --bg-2:      #0a0d13;
  --surface:   #161b27;
  --surface-2: #1c2230;
  --border:    #262d3d;
  --text:      #eef1f8;
  --text-soft: #aab2c5;
  --text-faint:#6b7488;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 8px 26px rgba(0,0,0,.45);
  --shadow-lg: 0 22px 60px rgba(0,0,0,.6);
  --ring:      0 0 0 3px rgba(139, 155, 255, .35);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }

a { color: inherit; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

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

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--accent);
  --b-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: var(--b-bg); color: var(--b-fg);
  border: none; border-radius: 999px;
  padding: .7rem 1.4rem; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
  box-shadow: 0 6px 16px rgba(91, 110, 245, .28);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 10px 22px rgba(91, 110, 245, .34); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  --b-bg: transparent; --b-fg: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--surface-2); border-color: var(--accent); }

.btn.subtle {
  --b-bg: var(--surface-2); --b-fg: var(--text);
  box-shadow: none; border: 1px solid var(--border);
}
.btn.subtle:hover { background: var(--bg-2); }

.btn.sm { padding: .42rem .85rem; font-size: .85rem; }
.btn.icon { padding: .5rem; width: 40px; height: 40px; border-radius: 50%; }

/* ---------- brand mark (shared by landing + hub) ---------- */
.brand-mark {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
  text-decoration: none; color: var(--text);
}
.monogram {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  box-shadow: var(--shadow);
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--text-soft);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: color .2s, transform .2s;
}
.theme-toggle:hover { color: var(--accent); transform: rotate(12deg); }
.theme-toggle svg { width: 20px; height: 20px; }
html:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
html[data-theme="dark"]      .theme-toggle .sun  { display: none; }

/* ---------- helpers ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
