/* ============================================
   PressFixAI — Design Tokens
   Industrial console aesthetic: press-panel dark,
   safety-amber accent, print registration marks
   as the recurring structural motif.
   ============================================ */

:root {
  /* PressFixAI global design tokens (2026-08-10) — deep Navy/Blue-Black
     foundation, Amber primary action, Technical Blue secondary accent for
     selected/informational states, clean technical Green for success/
     active. This is the single canonical definition; dashboard.html's own
     :root mirrors these exact values (it doesn't <link> this file yet —
     see that file's comment for why — but must stay byte-identical). */
  --ink: #060E1B;
  --panel: #0D1724;
  --panel-raised: #122036;
  --input-bg: #15212F;
  --paper: #F5F7FA;
  --paper-dim: #AEB9C7;
  --muted: #6B7A8F;
  --amber: #FFB902;
  --amber-hover: #FFCB3D;
  --amber-active: #E6A300;
  --amber-dim: #9C7A1F;
  --blue: #3E8EF7;
  --blue-hover: #62A4FF;
  --blue-active: #2E75D6;
  --blue-bg: #10233F;
  --steel: #4A7DA6;
  --steel-dim: #1C3040;
  --ok: #46B76E;
  --ok-bg: #10291B;
  --err: #F0554A;
  --danger: #F0554A;
  --danger-bg: #3A1616;
  --disabled-bg: #182231;
  --disabled-text: #566378;
  --line: #202C3D;
  --line-hover: #34455C;
  --line-soft: #16202C;

  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Registration mark motif ---------- */
.regmark {
  display: inline-block;
  width: 14px;
  height: 14px;
  position: relative;
  flex-shrink: 0;
}
.regmark::before, .regmark::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.regmark::before { top: 6px; left: 0; width: 14px; height: 1px; }
.regmark::after { top: 0; left: 6px; width: 1px; height: 14px; }
.regmark-circle {
  position: absolute;
  top: 1px; left: 1px;
  width: 12px; height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.corner-marks {
  position: relative;
}
.corner-marks::before,
.corner-marks::after,
.corner-marks .cm-tr,
.corner-marks .cm-br {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  color: var(--amber-dim);
}
.corner-marks::before { top: -1px; left: -1px; border-left: 1px solid; border-top: 1px solid; }
.corner-marks::after { bottom: -1px; left: -1px; border-left: 1px solid; border-bottom: 1px solid; }
.corner-marks .cm-tr { top: -1px; right: -1px; border-right: 1px solid; border-top: 1px solid; }
.corner-marks .cm-br { bottom: -1px; right: -1px; border-right: 1px solid; border-bottom: 1px solid; }

/* ---------- Nav ----------
   Two rows: nav-top (brand + auth actions) stays pinned while scrolling;
   nav-bottom (page links) scrolls away with the page, same pattern used
   by large sites (news/e-commerce headers) to avoid cramming everything
   — brand/utility actions and wayfinding links — into one crowded bar. */
.nav-top {
  border-bottom: 1px solid var(--line);
  background: rgba(20, 24, 28, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-bottom {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.nav-bottom .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--paper);
  direction: ltr;
  unicode-bidi: isolate;
}
.brand .regmark { color: var(--amber); }
.brand b { color: var(--amber); font-weight: 600; }

/* ============================================
   Force always-Latin technical content (fault
   codes, part numbers) to keep LTR order and
   digit/letter direction no matter what direction
   the page is in. This does NOT apply to translated
   UI text (buttons, labels, prose), which is meant
   to mirror correctly in Arabic.
   ============================================ */
.code {
  direction: ltr;
  unicode-bidi: isolate;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: var(--paper-dim);
  transition: color 0.15s ease;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--amber);
}
.nav-links a.active { border-bottom-color: var(--amber); }

.nav-cta {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--amber);
  padding: 10px 18px;
  border-radius: 2px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover { background: var(--amber-hover); transform: translateY(-1px); }

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-login {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-dim);
  padding: 8px 4px;
  transition: color 0.15s ease;
}
.nav-login:hover { color: var(--amber); }

/* Hamburger toggle — hidden on desktop, shown below the breakpoint where
   nav-bottom's links collapse into a dropdown instead of disappearing. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--paper);
  margin: 0 auto;
}
.nav-toggle:hover { border-color: var(--amber); }
.nav-toggle:hover span { background: var(--amber); }

/* Auth links duplicated inside the mobile dropdown (see nav-bottom's
   .nav-mobile-auth) — hidden on desktop, since nav-top already shows them. */
.nav-mobile-auth { display: none; }

@media (max-width: 860px) {
  .nav-top .wrap { flex-wrap: nowrap; }
  /* Login/Sign up move into the dropdown on mobile so nav-top only ever
     has to fit the brand, the language switch, and the toggle button —
     that's what stops them from cramming/overlapping at narrow widths. */
  .nav-auth .nav-login, .nav-auth .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-bottom {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 49;
  }
  .nav-bottom.open { display: block; }
  .nav-bottom .wrap {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
  }
  .nav-links {
    flex-direction: column;
    gap: 0;
  }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links a { display: block; padding: 14px 2px; }

  .nav-mobile-auth {
    display: flex;
    gap: 10px;
    margin-top: 16px;
  }
  .nav-mobile-auth .nav-login {
    flex: 1;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 10px;
  }
  .nav-mobile-auth .nav-cta { flex: 1; text-align: center; }
}

/* ---------- Typography ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.eyebrow .regmark { color: var(--amber); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(40px, 5.2vw, 68px); line-height: 1.02; }
h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; }
h3 { font-size: 22px; line-height: 1.25; }

p { color: var(--paper-dim); margin: 0; }
.lede { font-size: 19px; line-height: 1.6; color: var(--paper-dim); max-width: 58ch; }

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line-soft);
}
.section-tight { padding: 64px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 2px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-hover); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Console / signature element ---------- */
.console {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px 28px;
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.85;
  position: relative;
  overflow: hidden;
}
.console::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}
.console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
  text-transform: uppercase;
}
.console-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 8px; box-shadow: 0 0 6px var(--ok); }
.console-line { white-space: pre-wrap; }
.console .q { color: var(--paper-dim); }
.console .code { color: var(--amber); }
.console .fix { color: var(--ok); }
.cursor {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--amber);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--ink);
  padding: 34px 30px;
}
.card-index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber-dim);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15px; }

/* ---------- Stat strip ---------- */
.stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  flex: 1;
  padding: 24px 0;
  border-left: 1px solid var(--line);
  text-align: center;
}
.stat:first-child { border-left: none; }
.stat .num {
  font-family: var(--mono);
  font-size: 30px;
  color: var(--amber);
  font-weight: 600;
}
.stat .label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-top: 6px;
}
@media (max-width: 700px) { .stats { flex-wrap: wrap; } .stat { flex: 1 1 50%; border-left: none; border-top: 1px solid var(--line); } }

/* ---------- Footer ---------- */
footer {
  padding: 56px 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 28px;
}
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--paper-dim);
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-dim);
  letter-spacing: 0.03em;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--steel);
  color: var(--steel);
  border-radius: 2px;
}


/* ============================================
   Mobile: the marketing pages build their two-column
   feature rows with inline grid styles, which no media
   query could reach - so narrow screens got unreadable
   one-word columns. Stack them. (2026-08-29)
   ============================================ */
@media (max-width: 900px) {
  .section .wrap[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}
