/* ============================================================
   Sprinkle Shine Co — brand tokens + base
   Sampled from the official banner artwork. Do not invent colors.
   MOBILE FIRST: every rule here is the phone rule. Media queries
   only ever scale UP (min-width). Never write max-width here.
   ============================================================ */

:root {
  /* --- brand core (sampled from logo artwork) --- */
  --ssc-blue:        #004BE1;  /* primary royal blue, from the S emblem */
  --ssc-blue-hi:     #2C6BFF;  /* hover / lighter blue */
  --ssc-blue-dim:    #0033A0;  /* pressed / deep */
  --ssc-blue-ghost:  rgba(0, 75, 225, .14);

  /* Blue as SMALL TEXT. --ssc-blue-hi is 4.47:1 on the canvas and 4.20:1 on a
     surface, so eyebrows, pills and links set in it sit just under AA. This is
     the same hue lifted far enough to clear 4.5:1 on both (5.4:1 and 4.7:1).
     It is a text colour only. Do not use it as a fill: white on it is 3.7:1,
     which is why the buttons keep --ssc-blue / --ssc-blue-hi. */
  --ssc-blue-text:   #4A7DFF;

  --ssc-chrome:      #E8EAED;  /* chrome silver, wordmark */
  --ssc-chrome-dim:  #98A0B0;  /* secondary text, tinted not flat gray */

  /* --- surfaces (near-black, never pure #000) --- */
  --ssc-canvas:      #05070C;
  --ssc-surface:     #0B1020;
  --ssc-surface-2:   #121a2e;
  --ssc-line:        rgba(232, 234, 237, .12);
  --ssc-line-strong: rgba(232, 234, 237, .22);

  /* --- ink --- */
  --ssc-ink:         #F5F7FA;
  --ssc-ink-soft:    #98A0B0;
  --ssc-on-blue:     #FFFFFF;

  /* --- status (pipeline) --- */
  --ssc-ok:          #22C55E;
  --ssc-warn:        #F59E0B;
  --ssc-danger:      #EF4444;

  /* --- type --- */
  --ssc-font-display: "Archivo", system-ui, -apple-system, sans-serif;
  --ssc-font-text:    "Geist", system-ui, -apple-system, sans-serif;

  /* --- 4px spacing scale --- */
  --ssc-1: 4px;  --ssc-2: 8px;  --ssc-3: 12px; --ssc-4: 16px;
  --ssc-5: 24px; --ssc-6: 32px; --ssc-7: 48px; --ssc-8: 64px;

  --ssc-gutter: 20px;
  --ssc-radius: 10px;
  --ssc-radius-sm: 6px;

  --ssc-ease: cubic-bezier(.23, 1, .32, 1);
  --ssc-e1: 0 1px 2px rgba(0,0,0,.5);
  --ssc-e2: 0 6px 20px rgba(0,0,0,.45);
  --ssc-e3: 0 16px 44px rgba(0,0,0,.55);

  /* safe areas for the mobile tab bar */
  --ssc-tabbar-h: 62px;
  --ssc-safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ssc-canvas);
  color: var(--ssc-ink);
  font-family: var(--ssc-font-text);
  font-size: 16px;          /* never below 16px: iOS zooms inputs under it */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--ssc-font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2rem, 8vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 6vw, 2.2rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p  { margin: 0; text-wrap: pretty; }

a { color: var(--ssc-blue-text); text-underline-offset: 3px; }

/* every interactive thing gets a visible focus ring */
:focus-visible {
  outline: 2px solid var(--ssc-blue-hi);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--ssc-blue); color: #fff; }

.ssc-wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--ssc-gutter);
}

/* --- eyebrow / label --- */
.ssc-eyebrow {
  font-family: var(--ssc-font-display);
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ssc-blue-text);
}

/* --- buttons: 44px min touch target --- */
.ssc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--ssc-font-display); font-weight: 800;
  font-size: .95rem; letter-spacing: .03em;
  border: 0; border-radius: var(--ssc-radius);
  cursor: pointer; text-decoration: none;
  transition: background .15s var(--ssc-ease), transform .1s var(--ssc-ease), border-color .15s var(--ssc-ease);
}
.ssc-btn:active { transform: translateY(1px); }
.ssc-btn--primary { background: var(--ssc-blue); color: var(--ssc-on-blue); }
.ssc-btn--primary:hover { background: var(--ssc-blue-hi); }
.ssc-btn--ghost {
  background: transparent; color: var(--ssc-ink);
  border: 1px solid var(--ssc-line-strong);
}
.ssc-btn--ghost:hover { border-color: var(--ssc-blue-hi); color: var(--ssc-blue-hi); }
.ssc-btn--sm { min-height: 38px; padding: 8px 14px; font-size: .82rem; }
.ssc-btn[disabled] { opacity: .45; pointer-events: none; }

/* --- form controls --- */
.ssc-field { display: grid; gap: 6px; margin-bottom: var(--ssc-4); }
.ssc-field > label {
  font-family: var(--ssc-font-display); font-weight: 700;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ssc-ink-soft);
}
.ssc-input, .ssc-select, .ssc-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: inherit; font-size: 16px;
  color: var(--ssc-ink);
  background: var(--ssc-surface);
  border: 1px solid var(--ssc-line);
  border-radius: var(--ssc-radius-sm);
  transition: border-color .15s var(--ssc-ease), background .15s var(--ssc-ease);
}
.ssc-textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.ssc-input:focus, .ssc-select:focus, .ssc-textarea:focus {
  border-color: var(--ssc-blue); background: var(--ssc-surface-2); outline: none;
}
/* 4.6:1 on the input surface. #5d677a read at 3.32:1, under AA. */
.ssc-input::placeholder, .ssc-textarea::placeholder { color: #737E90; }
.ssc-input[aria-invalid="true"], .ssc-textarea[aria-invalid="true"] { border-color: var(--ssc-danger); }
.ssc-err { color: var(--ssc-danger); font-size: .8rem; min-height: 1em; }

/* --- card --- */
.ssc-card {
  background: var(--ssc-surface);
  border: 1px solid var(--ssc-line);
  border-radius: var(--ssc-radius);
  padding: var(--ssc-5);
}

/* --- pill / badge --- */
.ssc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--ssc-font-display); font-weight: 700;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--ssc-blue-ghost); color: var(--ssc-blue-text);
  border: 1px solid rgba(0,75,225,.35);
}

/* --- toast --- */
.ssc-toast {
  position: fixed; left: 50%; bottom: calc(var(--ssc-tabbar-h) + var(--ssc-safe-b) + 16px);
  transform: translateX(-50%) translateY(12px);
  z-index: 200; max-width: min(92vw, 420px);
  padding: 14px 18px; border-radius: var(--ssc-radius);
  background: var(--ssc-surface-2); color: var(--ssc-ink);
  border: 1px solid var(--ssc-line-strong); box-shadow: var(--ssc-e3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ssc-ease), transform .2s var(--ssc-ease);
}
.ssc-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.ssc-toast--ok { border-left: 3px solid var(--ssc-ok); }
.ssc-toast--err { border-left: 3px solid var(--ssc-danger); }

/* --- utility --- */
.ssc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ssc-muted { color: var(--ssc-ink-soft); }
.ssc-nums { font-variant-numeric: tabular-nums; }

/* Any wide block (tables, boards) scrolls inside itself, never the page */
.ssc-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* scale UP from the phone */
@media (min-width: 768px) {
  :root { --ssc-gutter: 32px; }
}
@media (min-width: 1024px) {
  :root { --ssc-gutter: 40px; }
}
