/* ===================================================================
   LocalTechJobs — the one stylesheet.

   Change the look here. Colours, fonts and the page's rhythm are variables in
   :root; the sections below only read them. Order: fonts, tokens, base,
   header, footer, legal pages, then the landing page (.lo-*).

   Rules of the look: square corners, 1px borders, no gradients, no shadows, no
   icons. IBM Plex Mono for the logo, headline, labels, buttons and table
   metadata; IBM Plex Sans for body copy. Two families only (the privacy page
   says so). Inputs and buttons are at least 44px tall.
   =================================================================== */

/* ===== Fonts (self-hosted, SIL Open Font License: /fonts/OFL-IBM-Plex.txt) ===== */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600.woff2') format('woff2');
}

/* ===== Tokens ===== */
:root {
  /* Surfaces */
  --bg-page: #fbfcfa;           /* page background */
  --bg-card: #ffffff;           /* the signup card, inputs */
  --bg-tile: #e9f0ea;           /* the pale tile behind the headshot */
  --bg-stripe: #f3f6f2;         /* alternate table rows */
  --bg-chrome: #14201a;         /* header and footer bars */
  --bg-highlight: #e3f1e6;      /* type-ahead hover */

  /* Lines */
  --border-default: #d6ddd3;
  --border-input: #7f8b83;      /* 3.4:1 on the page, so an input's edge is visible */

  /* Text */
  --text-primary: #17201b;      /* 16.3:1 on --bg-page */
  --text-secondary: #38443d;
  --text-muted: #4a5750;
  --text-placeholder: #5c6a62;
  --text-on-chrome: #d0dece;

  /* Accent (green) */
  --accent: #22a34d;            /* the header rule, focus */
  --accent-bright: #4ade80;     /* on dark chrome, the logo's "tech" */
  --button: #15803d;            /* white text on this is 5.0:1 */
  --button-hover: #166534;
  --link: #166534;              /* links on light surfaces */
  --link-on-chrome: #bfe3c8;

  --error: #b42318;

  /* Type */
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --page-width: 1120px;
  --card-width: 440px;
  --legal-width: 42rem;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
}

a { color: var(--link); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ltj-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ltj-main {
  flex: 1;
  background: var(--bg-page);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Header ===== */
.ltj-header {
  background: var(--bg-chrome);
  color: var(--text-on-chrome);
  padding: 0 24px;
  border-bottom: 3px solid var(--accent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  min-height: 56px;
}

.ltj-logo {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #fbfcfa;
  text-decoration: none;
}
.ltj-logo .accent { color: var(--accent-bright); }

.ltj-where {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-on-chrome);
}
.ltj-where__metro { text-transform: lowercase; }

.ltj-where__change,
.ltj-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--link-on-chrome);
  text-underline-offset: 3px;
}
.ltj-where__change:hover,
.ltj-switch:hover { color: #ffffff; }

.ltj-switch { margin-left: auto; }
.ltj-switch__short { display: none; }


/* ===== Footer ===== */
.ltj-footer {
  background: var(--bg-chrome);
  color: var(--text-on-chrome);
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-top: 3px solid var(--accent);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.ltj-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--link-on-chrome);
  text-underline-offset: 3px;
}
.ltj-footer a:hover { color: #ffffff; }

/* ===== Legal pages (privacy, terms, not found) ===== */
.legal {
  max-width: var(--legal-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  line-height: 1.65;
}
.legal h1 { margin: 0 0 .5rem; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 600; }
.legal h2 { margin: 2rem 0 .5rem; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; }
.legal p { margin-bottom: .75rem; }
.legal__updated { color: var(--text-muted); font-size: .85rem; margin: 0 0 1.5rem; }
.legal__lede { margin-bottom: 1.5rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: .35rem 0; }
.legal code {
  font-family: var(--font-mono);
  font-size: .9em;
  padding: .1em .3em;
  background: rgba(127, 127, 127, .18);
}
.legal__related { margin-top: 2.5rem; opacity: .8; }

/* ===== The landing page ===== */
.lo {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 44px 24px 80px;
}

/* ── Hero: pitch left, form right; stacked on a phone ───────────── */
.lo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--card-width));
  grid-template-areas:
    "head form"
    "bullets form";
  column-gap: 64px;
  align-items: start;
}
.lo-head { grid-area: head; }
.lo-card, .lo-thanks { grid-area: form; }
.lo-bullets { grid-area: bullets; }

.lo-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 14px;
}

.lo-hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 18px;
  text-wrap: balance;
}

.lo-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34em;
}

.lo-bullets { margin-top: 26px; }
.lo-bullets ul { list-style: none; max-width: 36em; }
.lo-bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
}
.lo-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--button);
}

/* ── Form ───────────────────────────────────────────────────────── */
.lo-card { min-width: 0; }

.lo-form {
  padding: 22px 22px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-top: 3px solid var(--accent);
}

.lo-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  border: 1px solid var(--text-primary);
}
.lo-toggle a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
}
.lo-toggle a + a { border-left: 1px solid var(--text-primary); }
.lo-toggle a[aria-current="page"] {
  background: var(--bg-chrome);
  color: #ffffff;
}
.lo-toggle a:not([aria-current="page"]):hover { background: var(--bg-highlight); }

.lo-field { margin-bottom: 14px; }

.lo-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.lo-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border-input);
  border-radius: 0;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  caret-color: var(--button);
}
.lo-field input::placeholder { color: var(--text-placeholder); opacity: 1; }
.lo-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--text-primary);
}

.lo-submit {
  width: 100%;
  min-height: 48px;
  background: var(--button);
  color: #ffffff;
  border: 0;
  border-radius: 0;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.lo-submit:hover { background: var(--button-hover); }
.lo-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lo-fineprint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 12px 0 0;
}
.lo-fineprint a { color: var(--link); }

.lo-error {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--error);
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.lo-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── City type-ahead ────────────────────────────────────────────── */
.lo-metro { position: relative; }

ul.lo-metro-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 264px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--text-primary);
}
ul.lo-metro-list[hidden] { display: none; }

ul.lo-metro-list [role="option"] {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}
ul.lo-metro-list [role="option"]:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}
ul.lo-metro-list [role="option"].is-active {
  background: var(--bg-chrome);
  color: #ffffff;
}

.lo-metro-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Thank-you ──────────────────────────────────────────────────── */
.lo-thanks {
  padding: 24px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-top: 3px solid var(--accent);
}
.lo-thanks__title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--link);
  margin: 0 0 8px;
}
.lo-thanks__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ── List preview ───────────────────────────────────────────────── */
.lo-preview { margin-top: 72px; }

.lo-preview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.lo-preview h2,
.lo-about h2 {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lo-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
  background: var(--bg-card);
}

.lo-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
}
.lo-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-input);
  background: var(--bg-stripe);
}
.lo-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-default);
  font-size: 15px;
  vertical-align: top;
}
.lo-table tbody tr:last-child td { border-bottom: 0; }
.lo-table td:nth-child(1),
.lo-table td:nth-child(3),
.lo-table td:nth-child(4) {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-secondary);
}
.lo-role-title { font-weight: 600; }
.lo-employer { color: var(--text-muted); }
.lo-employer::before { content: "· "; }

/* ── Who's behind this ──────────────────────────────────────────── */
.lo-about { margin-top: 72px; }
.lo-about h2 { margin-bottom: 16px; }

.lo-about__body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 44em;
}
.lo-headshot {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  background: var(--bg-tile);
  border: 1px solid var(--border-default);
}
.lo-headshot img { display: block; width: 96px; height: 96px; }
.lo-about p { font-size: 17px; line-height: 1.65; color: var(--text-primary); }

/* ── Phone and narrow windows ───────────────────────────────────── */
@media (max-width: 860px) {
  .lo-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "form"
      "bullets";
  }
  .lo-bullets { margin-top: 26px; }
  .lo-head { margin-bottom: 20px; }
}

@media (max-width: 640px) {
  /* Logo and audience link on one row; metro sits cleanly on the next.
     The full "hiring? post a job for $99" label is too wide at 375px, so
     a shorter label is used and the link does not wrap. */
  .ltj-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo switch"
      "where where";
    column-gap: 8px;
    row-gap: 0;
    padding: 0 16px;
    align-items: center;
  }
  .ltj-logo { grid-area: logo; font-size: 18px; min-height: 44px; }
  .ltj-switch {
    grid-area: switch;
    margin-left: 0;
    font-size: 12px;
    white-space: nowrap;
    justify-self: end;
  }
  .ltj-switch__full { display: none; }
  .ltj-switch__short { display: inline; }
  .ltj-where { grid-area: where; min-height: 36px; }
  .ltj-where__change { min-height: 40px; }

  .lo { padding: 22px 16px 56px; }
  .lo-eyebrow { font-size: 12px; margin-bottom: 8px; }
  .lo-hero h1 { font-size: 26px; margin-bottom: 12px; }
  .lo-sub { font-size: 15px; line-height: 1.5; }
  .lo-head { margin-bottom: 16px; }
  .lo-form { padding: 16px 16px 14px; }
  .lo-toggle { margin-bottom: 14px; }
  .lo-field { margin-bottom: 10px; }
  .lo-fineprint { font-size: 12px; margin-top: 10px; }

  .lo-preview, .lo-about { margin-top: 52px; }

  /* The table becomes a plain list of rows. */
  .lo-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .lo-table, .lo-table tbody { display: block; }
  .lo-table tr {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-default);
  }
  .lo-table tbody tr:last-child { border-bottom: 0; }
  .lo-table td { display: block; padding: 0; border: 0; }
  .lo-table td:nth-child(2) { order: -1; flex-basis: 100%; }

  .lo-about__body { gap: 14px; }
}
