/* Spendly — design tokens + shared components (landing and dashboard) */
@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  --porcelain: #e8eaec;
  --paper: #f6f7f8;
  --white: #ffffff;
  --graphite: #1a1d21;
  --on-graphite: #ffffff;
  --slate: #626873;
  --mist: #9aa0a9;
  --line: #d3d7dc;
  --line-soft: #dfe2e6;
  --cobalt: #2b3fe0;
  --cobalt-ink: #1f2fb0;
  --cobalt-tint: #e3e6fb;
  --ok: #1e7f5c;
  --ok-tint: #dcefe7;
  --warn: #9a5b06;
  --warn-tint: #f6ead6;
  --err: #b42318;
  --err-tint: #f8e1de;
  /* scene */
  --stage-glow: #fbfbfc;
  --stage-floor: #dfe2e5;
  --floor-shadow: rgba(26, 29, 33, 0.28);
  --logo-filter: none;
  --nav-glass: rgba(232, 234, 236, 0.86);

  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.625rem;
  --t-2xl: 2.125rem;
  --t-3xl: 3rem;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-lift: 0 1px 2px rgba(26, 29, 33, 0.06), 0 8px 24px -12px rgba(26, 29, 33, 0.22);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --porcelain: #111317;
    --paper: #181b20;
    --white: #1f2329;
    --graphite: #e9ebee;
    --on-graphite: #111317;
    --slate: #9aa1ab;
    --mist: #6c737d;
    --line: #2c3139;
    --line-soft: #23272e;
    --cobalt: #6b7bff;
    --cobalt-ink: #8d99ff;
    --cobalt-tint: #222848;
    --ok: #4cc597;
    --ok-tint: #15302a;
    --warn: #e0a64b;
    --warn-tint: #33280f;
    --err: #f27d6e;
    --err-tint: #3a1d1a;
    --stage-glow: #1d2128;
    --stage-floor: #0c0e11;
    --floor-shadow: rgba(0, 0, 0, 0.7);
    --logo-filter: brightness(0) invert(0.92);
    --nav-glass: rgba(17, 19, 23, 0.82);
    --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --porcelain: #111317;
  --paper: #181b20;
  --white: #1f2329;
  --graphite: #e9ebee;
  --on-graphite: #111317;
  --slate: #9aa1ab;
  --mist: #6c737d;
  --line: #2c3139;
  --line-soft: #23272e;
  --cobalt: #6b7bff;
  --cobalt-ink: #8d99ff;
  --cobalt-tint: #222848;
  --ok: #4cc597;
  --ok-tint: #15302a;
  --warn: #e0a64b;
  --warn-tint: #33280f;
  --err: #f27d6e;
  --err-tint: #3a1d1a;
  --stage-glow: #1d2128;
  --stage-floor: #0c0e11;
  --floor-shadow: rgba(0, 0, 0, 0.7);
  --logo-filter: brightness(0) invert(0.92);
  --nav-glass: rgba(17, 19, 23, 0.82);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--graphite);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.5;
  font-feature-settings: 'ss01', 'tnum' 0;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- wordmark */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--graphite);
}
.wordmark i {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: url('/assets/logo-mark.svg') center / contain no-repeat;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); /* stays visible on the cobalt hero */
}

/* ---------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--t-md);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.18s var(--ease-out);
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--cobalt);
  color: #fff;
}
.btn-primary:hover {
  background: var(--cobalt-ink);
}
.btn-dark {
  background: var(--graphite);
  color: var(--on-graphite);
}
.btn-dark:hover {
  opacity: 0.88;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--graphite);
}
.btn-ghost:hover {
  border-color: var(--graphite);
}
.btn-quiet {
  background: transparent;
  color: var(--slate);
  padding: 0 0.6rem;
  min-height: 2.25rem;
}
.btn-quiet:hover {
  color: var(--graphite);
}
.btn-sm {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  font-size: var(--t-sm);
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- wallet modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(26, 29, 33, 0.35);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease-out;
}
.modal {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -30px rgba(26, 29, 33, 0.55);
  padding: 1.5rem;
  animation: rise 0.28s var(--ease-out);
}
.modal h2 {
  margin: 0 0 0.25rem;
  font-size: var(--t-xl);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.modal p {
  margin: 0 0 1.1rem;
  color: var(--slate);
  font-size: var(--t-sm);
}
.wallet-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wallet-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  transition: border-color 0.15s;
}
.wallet-opt:hover {
  border-color: var(--graphite);
}
.wallet-opt img,
.wallet-opt .wi {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: none;
}
.wallet-opt .wi {
  display: grid;
  place-items: center;
  background: var(--graphite);
  color: var(--on-graphite);
  font-size: 0.8rem;
}
.wallet-opt small {
  margin-left: auto;
  color: var(--slate);
  font-weight: 500;
}
.modal-status {
  min-height: 1.25rem;
  margin-top: 0.9rem;
  font-size: var(--t-sm);
  color: var(--slate);
}
.modal-status.err {
  color: var(--err);
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

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

/* ---------- theme toggle */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover {
  border-color: var(--graphite);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
.theme-toggle .moon,
:root[data-theme-effective='dark'] .theme-toggle .sun {
  display: none;
}
:root[data-theme-effective='dark'] .theme-toggle .moon {
  display: block;
}
/* monochrome brand logos follow the theme */
img.logo {
  filter: var(--logo-filter);
}
