/* ============================================================
   DeciLog 데시로그 — Colors & Type Foundations
   층간소음 측정·기록 앱 · dark instrument-grade UI
   ------------------------------------------------------------
   Fonts: IBM Plex Sans KR (UI) + IBM Plex Mono (numeric readouts)
   Load via Google Fonts. If working offline, see fonts/README.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ----------------------------------------------------------
     COLOR — Base surfaces (cool near-black, instrument chassis)
     ---------------------------------------------------------- */
  --bg-base:      #0E0E13;   /* app background */
  --bg-surface:   #16161D;   /* cards, panels, list rows */
  --bg-elevated:  #1F1F29;   /* sheets, elevated cards, menus */
  --bg-inset:     #09090D;   /* waveform wells, readout displays (recessed) */
  --bg-hover:     #23232E;   /* row / control hover */

  /* Borders & hairlines (light-on-dark, low alpha) */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.16);

  /* ----------------------------------------------------------
     COLOR — Text
     ---------------------------------------------------------- */
  --fg-primary:    #F5F5FA;  /* headlines, primary values */
  --fg-secondary:  #9B9BAC;  /* labels, supporting copy */
  --fg-tertiary:   #62626F;  /* captions, meta, axis labels */
  --fg-disabled:   #3C3C46;
  --fg-on-accent:  #FFFFFF;  /* text on violet fills */

  /* ----------------------------------------------------------
     COLOR — Brand accent (electric violet)
     ---------------------------------------------------------- */
  --accent:        #7C6CF6;  /* primary actions, active states, brand */
  --accent-bright: #9B8FFF;  /* hover / highlight */
  --accent-dim:    #4D43A8;  /* pressed / muted */
  --accent-soft:   rgba(124,108,246,0.14);  /* tint fills, selected rows */
  --accent-line:   rgba(124,108,246,0.40);  /* focus rings, active borders */

  /* ----------------------------------------------------------
     COLOR — Severity / data signal
     Maps directly to legal thresholds: safe < caution < over
     ---------------------------------------------------------- */
  --level-safe:        #2FD6A0;  /* under threshold — quiet */
  --level-safe-soft:   rgba(47,214,160,0.14);
  --level-caution:     #F5B544;  /* approaching threshold */
  --level-caution-soft:rgba(245,181,68,0.14);
  --level-over:        #FF5A6E;  /* threshold exceeded */
  --level-over-soft:   rgba(255,90,110,0.14);

  /* ----------------------------------------------------------
     COLOR — Day / Night context (주간 / 야간)
     Warm = daytime (06–22), cool = nighttime (22–06)
     ---------------------------------------------------------- */
  --day:        #F5B544;  /* 주간 — warm amber */
  --day-soft:   rgba(245,181,68,0.14);
  --night:      #6C8BFF;  /* 야간 — cool indigo */
  --night-soft: rgba(108,139,255,0.16);

  /* Charging / power state */
  --power:      #3DD68C;

  /* ----------------------------------------------------------
     TYPE — Families
     ---------------------------------------------------------- */
  --font-sans: 'IBM Plex Sans KR', system-ui, 'Apple SD Gothic Neo', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* TYPE — Numeric readout helper (instrument display) */
  --readout-feat: "tnum" 1, "zero" 1;  /* tabular figures + slashed zero */

  /* ----------------------------------------------------------
     TYPE — Scale (mobile, px). Readouts use --font-mono.
     ---------------------------------------------------------- */
  --readout-xl: 92px;  /* hero dB gauge value */
  --readout-lg: 56px;  /* secondary big number */
  --readout-md: 34px;  /* stat values */
  --t-h1:       28px;
  --t-h2:       22px;
  --t-h3:       18px;
  --t-body-lg:  17px;
  --t-body:     15px;
  --t-label:    13px;
  --t-caption:  12px;
  --t-micro:    11px;

  /* Line heights */
  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-normal:  1.5;

  /* Letter spacing */
  --ls-tight:   -0.02em;
  --ls-normal:  0;
  --ls-wide:    0.04em;   /* eyebrow / overline labels */
  --ls-caps:    0.08em;   /* uppercase micro-labels */

  /* Weights */
  --w-light:    300;
  --w-regular:  400;
  --w-medium:   500;
  --w-semibold: 600;
  --w-bold:     700;

  /* ----------------------------------------------------------
     SPACING — 4px base scale
     ---------------------------------------------------------- */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ----------------------------------------------------------
     RADII — moderate, instrument-soft
     ---------------------------------------------------------- */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  30px;
  --r-full: 999px;

  /* ----------------------------------------------------------
     ELEVATION — shadows + accent/severity glows
     ---------------------------------------------------------- */
  --shadow-card:  0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.35);
  --shadow-sheet: 0 -2px 8px rgba(0,0,0,0.3), 0 -16px 48px rgba(0,0,0,0.5);
  --shadow-pop:   0 8px 28px rgba(0,0,0,0.55);
  --glow-accent:  0 0 0 1px var(--accent-line), 0 6px 24px rgba(124,108,246,0.35);
  --glow-over:    0 0 0 1px rgba(255,90,110,0.5), 0 6px 28px rgba(255,90,110,0.30);
  --inset-well:   inset 0 1px 3px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.03);

  /* ----------------------------------------------------------
     MOTION
     ---------------------------------------------------------- */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);     /* standard exit/settle */
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   120ms;
  --dur-base:   220ms;
  --dur-slow:   360ms;
}

/* ============================================================
   SEMANTIC TYPE CLASSES
   ============================================================ */
.ds-readout-xl {
  font-family: var(--font-mono);
  font-size: var(--readout-xl);
  font-weight: var(--w-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-feature-settings: var(--readout-feat);
  color: var(--fg-primary);
}
.ds-readout-lg {
  font-family: var(--font-mono);
  font-size: var(--readout-lg);
  font-weight: var(--w-medium);
  line-height: var(--lh-tight);
  font-feature-settings: var(--readout-feat);
  color: var(--fg-primary);
}
.ds-readout-md {
  font-family: var(--font-mono);
  font-size: var(--readout-md);
  font-weight: var(--w-medium);
  font-feature-settings: var(--readout-feat);
  color: var(--fg-primary);
}
.ds-h1 {
  font-family: var(--font-sans);
  font-size: var(--t-h1);
  font-weight: var(--w-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--fg-primary);
}
.ds-h2 {
  font-family: var(--font-sans);
  font-size: var(--t-h2);
  font-weight: var(--w-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--fg-primary);
}
.ds-h3 {
  font-family: var(--font-sans);
  font-size: var(--t-h3);
  font-weight: var(--w-semibold);
  line-height: var(--lh-snug);
  color: var(--fg-primary);
}
.ds-body-lg {
  font-family: var(--font-sans);
  font-size: var(--t-body-lg);
  font-weight: var(--w-regular);
  line-height: var(--lh-normal);
  color: var(--fg-secondary);
}
.ds-body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: var(--lh-normal);
  color: var(--fg-secondary);
}
.ds-label {
  font-family: var(--font-sans);
  font-size: var(--t-label);
  font-weight: var(--w-medium);
  line-height: var(--lh-snug);
  color: var(--fg-secondary);
}
.ds-caption {
  font-family: var(--font-sans);
  font-size: var(--t-caption);
  font-weight: var(--w-regular);
  line-height: var(--lh-snug);
  color: var(--fg-tertiary);
}
.ds-overline {
  font-family: var(--font-sans);
  font-size: var(--t-micro);
  font-weight: var(--w-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
