/* ============================================================
   Steady Stack IT — site primitives
   Built on the Northbeam design-system tokens (../styles.css).
   Shared button, form, layout, and type helpers.
   ============================================================ */

/* ------------------------------------------------------------
   Brand palette retune — matched to the Steady Stack logo
   (navy #001354 · teal #008A96 · charcoal #2B2B2B).
   Overrides the DS tokens for this site only (base.css loads
   after styles.css). Primary = teal, secondary accent = navy,
   ink = deep navy.
   ------------------------------------------------------------ */
:root {
  /* Primary action → teal; remap the blue ramp the site references */
  --blue-50:  #E4F3F4;
  --blue-100: #C4E7EA;
  --blue-200: #9AD6DC;
  --blue-300: #5FBDC5;
  --blue-400: #1F9BA7;
  --blue-500: #008A96;
  --blue-600: #00737E;
  --blue-700: #005159;

  --brand:        #008A96;
  --brand-hover:  #00737E;
  --brand-active: #005C66;
  --text-brand:   #00737E;
  --text-link:    #00737E;
  --border-brand: #5FBDC5;
  --border-focus: #008A96;

  /* Secondary accent → navy; remap the amber ramp the site references */
  --amber-50:  #E9ECF6;
  --amber-100: #CBD3E8;
  --amber-300: #8A99C8;
  --amber-400: #2C429A;
  --amber-500: #102A6B;
  --amber-600: #0A1F52;
  --accent:       #102A6B;
  --accent-hover: #0A1F52;

  /* Ink → deep navy (from the logo's top layer) */
  --ink-900: #030C2C;
  --ink-800: #07173F;
  --ink-700: #122352;
  --ink-600: #243670;
  --text-strong: #07173F;

  /* Effects retinted to teal */
  --ring: 0 0 0 3px rgba(0, 138, 150, 0.30);
  --shadow-brand: 0 6px 18px rgba(0, 138, 150, 0.28);
  --grid-line: rgba(16, 42, 107, 0.06);
  --grid-bg:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

.ss-wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.ss-wrap--narrow { max-width: 820px; }

/* Mono eyebrow label */
.ss-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted);
}
.ss-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---- Buttons ---- */
.ss-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  font-family: var(--font-text); font-size: 15px; font-weight: 600; line-height: 1;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.ss-btn:hover { text-decoration: none; }
.ss-btn:active { transform: translateY(1px); }
.ss-btn .ic { width: 18px; height: 18px; }
.ss-btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }

.ss-btn--primary { background: var(--brand); color: var(--text-inverse); box-shadow: var(--shadow-xs); }
.ss-btn--primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-brand); color: var(--text-inverse); }
.ss-btn--primary:active { background: var(--brand-active); }

.ss-btn--secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); box-shadow: var(--shadow-xs); }
.ss-btn--secondary:hover { background: var(--surface-sunken); border-color: var(--border-strong); color: var(--text-strong); }

.ss-btn--ghost { background: transparent; color: var(--text-body); }
.ss-btn--ghost:hover { background: var(--surface-sunken); color: var(--text-strong); }

/* On dark backgrounds */
.ss-btn--ondark.ss-btn--secondary { background: rgba(255,255,255,0.06); color: var(--gray-0); border-color: rgba(255,255,255,0.18); }
.ss-btn--ondark.ss-btn--secondary:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }

/* ---- Form ---- */
.ss-field { display: block; margin-bottom: 18px; }
.ss-field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-strong); margin-bottom: 7px; }
.ss-input, .ss-textarea, .ss-select {
  width: 100%; font-family: var(--font-text); font-size: 15px; color: var(--text-strong);
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  outline: none;
}
.ss-input, .ss-select { height: 48px; padding: 0 14px; }
.ss-textarea { padding: 12px 14px; line-height: 1.55; resize: vertical; min-height: 120px; }
.ss-input:focus, .ss-textarea:focus, .ss-select:focus { border-color: var(--border-focus); box-shadow: var(--ring); }
.ss-input::placeholder, .ss-textarea::placeholder { color: var(--text-subtle); }
.ss-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7787' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.ss-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ss-form-note { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Form status messages */
.ss-form-status { display: none; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.ss-form-status.is-visible { display: flex; }
.ss-form-status--ok { background: var(--success-bg); border: 1px solid var(--green-100); color: var(--green-600); }
.ss-form-status--err { background: var(--danger-bg); border: 1px solid var(--red-100); color: var(--red-600); }

/* ---- Service / generic card ---- */
.ss-card {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.ss-card--interactive:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-2px); }

/* Icon tile */
.ss-icon-tile {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-50); color: var(--brand);
}
.ss-icon-tile .ic { width: 24px; height: 24px; }

/* Direction switcher pill */
.ss-switch {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(14,22,38,0.92); backdrop-filter: blur(8px);
  border-radius: var(--radius-full); box-shadow: var(--shadow-lg);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
}
.ss-switch a { padding: 7px 14px; border-radius: var(--radius-full); color: var(--gray-400); text-decoration: none; transition: all var(--dur-fast) var(--ease-out); }
.ss-switch a:hover { color: var(--gray-0); }
.ss-switch a.is-active { background: var(--brand); color: var(--gray-0); }
.ss-switch .lbl { color: var(--gray-500); padding: 0 8px 0 10px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
