/* =====================================================================
   SkyHotelier — global theme  (v3.1 "Navy")
   Loaded on every public and application page.

   1. One typeface across the site: IBM Plex Sans (Plex Mono for codes)
   2. Sharper, lighter type: antialiased, kerned, max weight 600
   3. Navy palette tokens shared by every page
   Icon fonts (Font Awesome) are excluded from the typeface rule.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --sky-font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sky-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Navy scale */
  --sky-navy-950: #061429;
  --sky-navy-900: #0A1A35;
  --sky-navy-850: #0C2140;
  --sky-navy-800: #0E2240;
  --sky-navy-700: #173A69;
  --sky-navy-600: #1F4E8C;   /* primary accent */
  --sky-navy-500: #2B63AE;
  --sky-navy-400: #5B88C8;
  --sky-navy-300: #8FB0DE;
  --sky-navy-200: #BFD0EA;
  --sky-navy-100: #E3EBF6;
  --sky-navy-50:  #F2F6FB;

  /* Warm neutrals (v3.4 "front desk" toning, to sit with navy and gold) */
  --sky-bg:      #FAF7F2;
  --sky-surface: #FFFFFF;
  --sky-line:    #E5DACA;
  --sky-line-2:  #EFE7DB;
  --sky-ink:     #2E2117;
  --sky-ink-2:   #4A3B2C;
  --sky-muted:   #6E6052;
  --sky-faint:   #8E806E;

  /* Gold scale — the accent across the site */
  --sky-gold-900: #5E4718;
  --sky-gold-800: #7D5F22;   /* accent text: 4.9:1 on white */
  --sky-gold-600: #A7863A;
  --sky-gold-500: #C8A951;
  --sky-gold-300: #E0C88A;
  --sky-gold-100: #F3E9D6;
  --sky-sand:     #D8C9B2;

  /* Status */
  --sky-ok:   #177A4C;
  --sky-warn: #A06C12;
  --sky-err:  #C43C3C;
  --sky-info: #7D5F22;

  --sky-radius-sm: 6px;
  --sky-radius:    8px;
  --sky-radius-lg: 12px;
}

/* ---------- 1. Typeface everywhere, icons excluded ---------- */
/* NB: keep the :not() chain on ONE compound — a line break here would become a
   descendant combinator and re-select the icons it is meant to exclude. */
html body,
html body :where(:not(i, svg, svg *, code, pre, kbd, samp, .mono, .material-icons, .fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"])) {
  font-family: var(--sky-font) !important;
}
html body :where(code, pre, kbd, samp, .mono, .font-mono, [class*="-mono"]) {
  font-family: var(--sky-mono) !important;
}

/* ---------- 2. Sharper, lighter type ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
body { font-weight: 400; letter-spacing: -0.003em; }

/* Headings: calm weights, tight tracking */
html body :where(h1, h2, h3) { font-weight: 600 !important; letter-spacing: -0.015em; }
html body :where(h4, h5, h6)  { font-weight: 600 !important; letter-spacing: -0.005em; }

/* Heavy weights (declared in stylesheets or inline) are capped at 600 */
html body :where(b, strong) { font-weight: 600; }
html body [style*="font-weight:900"], html body [style*="font-weight: 900"],
html body [style*="font-weight:800"], html body [style*="font-weight: 800"],
html body [style*="font-weight:700"], html body [style*="font-weight: 700"],
html body [style*="font-weight:bold"], html body [style*="font-weight: bold"] {
  font-weight: 600 !important;
}

/* Numbers line up in tables and totals */
html body :where(td, th, .stat-value, .amount, .price, .total, [class*="-total"], [class*="-amount"]) {
  font-variant-numeric: tabular-nums;
}

/* Focus that is visible on both light and navy surfaces */
html body :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--sky-gold-800);
  outline-offset: 2px;
}

::selection { background: var(--sky-gold-100); color: var(--sky-gold-900); }
