/* ===========================================================================
   ewatch.cloud — warm editorial dark theme
   Fonts: Fraunces (display/serif), Space Grotesk (UI), JetBrains Mono (code/meta)
   =========================================================================== */

:root {
  /* dark theme (default) */
  --bg: #0E0D0B;
  --paper: #13110F;
  --paper-2: #1A1714;
  --ink: #F3EFE6;
  --ink-soft: #B8B2A5;
  --ink-mute: #6E6A62;
  --line: #2A2621;
  --line-soft: #1E1B17;
  --accent: #E86B2B;
  --accent-hover: #FF8844;
  --accent-dim: rgba(232, 107, 43, 0.13);
  --success: #2EA66A;
  --success-dim: rgba(46, 166, 106, 0.13);
  --danger: #C44A1A;
  --danger-dim: rgba(196, 74, 26, 0.13);

  --r-sm: 8px;
  --r-md: 18px;
  --r-lg: 28px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t: 200ms var(--ease);

  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shell-h: 60px;
}

[data-theme="light"] {
  --bg: #EFEBE4;
  --paper: #F7F3EC;
  --paper-2: #ECE6DB;
  --ink: #1A1816;
  --ink-soft: #55504A;
  --ink-mute: #8A8379;
  --line: #C8C0AE;
  --line-soft: #D8D2C2;
  --accent: #C44A1A;
  --accent-hover: #E86B2B;
  --accent-dim: rgba(196, 74, 26, 0.10);
  --success: #2EA66A;
  --success-dim: rgba(46, 166, 106, 0.10);
  --danger: #C44A1A;
  --danger-dim: rgba(196, 74, 26, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100%; }

::selection { background: var(--accent-dim); color: var(--ink); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); background-clip: content-box; }

/* ---- type helpers ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
.serif { font-family: var(--font-display); }
.serif-i { font-family: var(--font-display); font-style: italic; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.label-micro {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

a { color: inherit; text-decoration: none; }

/* color: inherit so <button> cards (MarketCard, ProjectCard, …) use the page
   --ink instead of the browser's default black; the Button component and other
   buttons set their own color and override this. */
button { font-family: inherit; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ---- focus ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* =========================================================================
   App scaffolding
   ========================================================================= */
.app { display: flex; flex-direction: column; min-height: 100%; }

/* page transition — transform-only so it never captures blank */
@keyframes pageIn {
  from { transform: translateY(9px); }
  to   { transform: translateY(0); }
}
.page-anim { animation: pageIn 340ms var(--ease) both; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes barber { to { background-position: 28px 0; } }

/* content container */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.container-wide { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 28px; }

/* generic surfaces */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

/* spinner */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--paper-2) 0%, var(--line-soft) 50%, var(--paper-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.grow { flex: 1; }
.muted { color: var(--ink-soft); }
.mute2 { color: var(--ink-mute); }
.center { display: flex; align-items: center; justify-content: center; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
