/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  JAS Cleaning — DESIGN SYSTEM (foundation layer)                        ║
   ║                                                                          ║
   ║  The single source of truth for design tokens (palette, typography,     ║
   ║  spacing, radii, shadows) and primitive components (.btn, .pill,        ║
   ║  .card, .field, .phone, .browser, .logo). All other CSS files build     ║
   ║  on these tokens — see Design System.md §3 for the philosophy.          ║
   ║                                                                          ║
   ║  LOADED BY: every HTML page on the site                                  ║
   ║  PAIRS WITH:                                                             ║
   ║    site.css         — shared page chrome for /*.html consumer pages     ║
   ║    animations.css   — motion, scroll reveals, glass surfaces, i18n CSS  ║
   ║    account/account.css  — customer-account-specific extensions          ║
   ║    pm/pm.css            — PM-portal-specific extensions                  ║
   ║                                                                          ║
   ║  NEVER:                                                                  ║
   ║    • Change a token value here without updating Design System.md        ║
   ║    • Add page-specific styles — those go in the page or its folder CSS  ║
   ║    • Add animation rules — those go in animations.css                   ║
   ║                                                                          ║
   ║  ══════════════════════════════════════════════════════════════════════ ║
   ║   §1. CSS Custom Properties   (line  10) — Design tokens                ║
   ║   §2. Reset + Base            (line  58) — html/body/headings           ║
   ║   §3. Type primitives         (line  74) — .t-display, .t-mono, .eb     ║
   ║   §4. Button                  (line  85) — .btn family + variants       ║
   ║   §5. Pills / Chips           (line 113) — .pill family                 ║
   ║   §6. Card                    (line 141) — .card, .card-flat            ║
   ║   §7. Field (input)           (line 150) — .field + labels             ║
   ║   §8. Logo lockup             (line 164) — brand mark                  ║
   ║   §9. Phone + Browser frames  (line 181) — design canvas mockups       ║
   ║  §10. Misc helpers            (line 243) — .row, .col, .grid, .gap-*   ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

/* JAS Cleaning — Design System */

/* Foundation tokens + self-hosted brand fonts from @jas-cleaning/ui-kit, the single
   source of truth. Imported into a low cascade layer so the kit's component/reset
   rules never override this site's bespoke styles — only its --jsc-* vars and
   @font-face are consumed (the build copies the kit to out/_ui-kit). */
@import url('./_ui-kit/styles.css') layer(jsc-kit);

/* The current ui-kit font snapshot carries Instrument Serif regular; the public
   marketing pages also use real italic in display <em> spans, so keep that face
   self-hosted here instead of falling back to faux browser synthesis. */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/instrument-serif-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand palette aliased onto the kit's --jsc-* tokens (identical values → no visual
     change). Tokens with no kit equivalent stay local and are flagged. */

  /* Surfaces */
  --bone: var(--jsc-color-bone);
  --paper: var(--jsc-color-paper);
  --surface: var(--jsc-color-surface);
  --surface-2: var(--jsc-color-surface-2);
  --surface-3: #E1D9C5;   /* local: no kit equivalent */

  /* Ink + lines */
  --ink: var(--jsc-color-ink);
  --ink-2: var(--jsc-color-ink-2);
  --ink-3: var(--jsc-color-ink-3);
  --mute: var(--jsc-color-mute);
  --line: var(--jsc-color-line);
  --line-2: var(--jsc-color-line-strong);
  --line-soft: var(--jsc-color-line-soft);

  /* Accents */
  --leaf: var(--jsc-color-leaf);          /* primary green */
  --leaf-2: #4F8C5B;                       /* local: no kit equivalent */
  --leaf-soft: var(--jsc-color-leaf-soft);
  --leaf-bg: var(--jsc-color-leaf-bg);
  --moss: var(--jsc-color-moss);           /* darkest green */

  --coral: var(--jsc-color-coral);
  --coral-soft: var(--jsc-color-coral-soft);
  --gold: var(--jsc-color-gold);
  --gold-soft: var(--jsc-color-gold-soft);
  --sky: #3E6E8C;                          /* local: no kit equivalent */
  --sky-soft: #D5E1EB;                     /* local */

  /* Status (local: public-web-specific values) */
  --ok: #2E6B3A;
  --warn: #B27A1F;
  --crit: #B33A2A;

  /* Type — kit families, self-hosted via the imported kit styles.css */
  --display: var(--jsc-font-display);
  --sans: var(--jsc-font-sans);
  --mono: var(--jsc-font-mono);

  /* Radii — kit scale where it matches; --r-lg stays local (kit has no 14px step) */
  --r-xs: var(--jsc-radius-xs);
  --r-sm: var(--jsc-radius-sm);
  --r-md: var(--jsc-radius-md);
  --r-lg: 14px;                            /* local */
  --r-xl: var(--jsc-radius-lg);

  /* Shadow (local: public-web's layered recipes; kit shadows differ) */
  --sh-1: 0 1px 0 rgba(26,30,27,0.04), 0 1px 2px rgba(26,30,27,0.04);
  --sh-2: 0 1px 0 rgba(26,30,27,0.04), 0 8px 24px -6px rgba(26,30,27,0.08);
  --sh-3: 0 24px 60px -20px rgba(26,30,27,0.18), 0 1px 0 rgba(26,30,27,0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bone);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }

/* Type primitives */
.t-display { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.t-mono { font-family: var(--mono); font-feature-settings: 'tnum' 1; }
.t-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-leaf { background: var(--leaf); color: #fff; }
.btn-leaf:hover { background: var(--moss); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }

/* Pills / Chips */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill-leaf { background: var(--leaf-soft); color: var(--moss); border-color: #B8CFA1; }
.pill-coral { background: var(--coral-soft); color: #7C2D17; border-color: #E1B7A6; }
.pill-gold { background: var(--gold-soft); color: #6E521D; border-color: #D4BD86; }
.pill-sky { background: var(--sky-soft); color: #234861; border-color: #B5C8D9; }
.pill-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill-dot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

/* Card */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card-flat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.divider { height: 1px; background: var(--line); border: 0; }

/* Inputs */
.field {
  display: flex; align-items: center;
  height: 44px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink);
}
.field:focus-within { border-color: var(--ink); }
.field-label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; display: block; font-weight: 500; }

/* Logo lockup */
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.02em;
}

/* Phone frame */
.phone {
  width: 390px;
  height: 844px;
  background: #000;
  border-radius: 50px;
  padding: 12px;
  box-shadow: var(--sh-3);
  position: relative;
  flex-shrink: 0;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 38px;
  background: var(--paper);
  overflow: hidden;
  position: relative;
}
.phone-notch {
  position: absolute; top: 14px; left: 50%;
  width: 110px; height: 30px;
  background: #000;
  border-radius: 999px;
  transform: translateX(-50%);
  z-index: 10;
}
.phone-status {
  height: 50px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* Browser frame */
.browser {
  background: var(--paper);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--sh-2);
}
.browser-bar {
  height: 38px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
}
.browser-dots { display: flex; gap: 6px; }
.browser-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--line-2); }
.browser-url {
  flex: 1; height: 22px; border-radius: 6px;
  background: var(--paper); border: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* Misc helpers */
.sr { position: absolute; left: -9999px; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.grid { display: grid; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }

/* Subtle textures */
.grain {
  background-image:
    radial-gradient(rgba(26,30,27,0.025) 1px, transparent 1px);
  background-size: 4px 4px;
}

/* Scrollbar tame inside artboards */
.artboard-inner ::-webkit-scrollbar { width: 6px; height: 6px; }
.artboard-inner ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }

/* Specific: dashed underline link */
.dashed-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 1px;
}
