/* ─────────────────────────────────────────────────────────────
   jbirdux portfolio — shared stylesheet
   Tokens + utility classes extracted from inline JSX styles.
   Mobile breakpoint stub at the bottom.
   ───────────────────────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Brand palette */
  --ink:       #05081C;
  --navy:      #0F1E57;
  --sapphire:  #2667FF;
  --graphite: #353642;
  --platinum:  #F0EDEE;
  --orange:    #FFA600;

  /* Translucent platinum (used dozens of times) */
  --text-strong: rgba(240, 237, 238, 0.88);
  --text-body:   rgba(240, 237, 238, 0.82);
  --text-soft:   rgba(240, 237, 238, 0.78);
  --text-mute:   rgba(240, 237, 238, 0.65);
  --text-faint:  rgba(240, 237, 238, 0.55);
  --text-dim:    rgba(240, 237, 238, 0.45);
  --text-ghost:  rgba(240, 237, 238, 0.35);

  --border-strong: rgba(240, 237, 238, 0.25);
  --border-mid:    rgba(240, 237, 238, 0.18);
  --border-soft:   rgba(240, 237, 238, 0.10);
  --border-faint:  rgba(240, 237, 238, 0.08);

  --orange-border: rgba(255, 166, 0, 0.35);
  --navy-card:     rgba(15, 30, 87, 0.40);
  --navy-card-hover: rgba(15, 30, 87, 0.60);

  /* Type stacks */
  --font-display: 'Faustina', serif;
  --font-body:    'Faustina', serif;
  --font-ui:      'Outfit', sans-serif;
  --font-mono:    'Outfit', monospace;
}

/* ── Base reset (replaces inline <style> blocks in each HTML) ─ */
html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--platinum);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
html, body { overflow: hidden; }
html.allow-scroll, html.allow-scroll body { overflow: auto; }

* { box-sizing: border-box; }
a { -webkit-tap-highlight-color: transparent; }
input::placeholder, textarea::placeholder { color: var(--text-ghost); }

/* ── Page shell (no-scroll 1440×900 pages) ──────────────────── */
.page-shell {
  width: 100vw;
  height: 100vh;
  max-width: 1440px;
  max-height: 900px;
  min-width: 1440px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--platinum);
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Eyebrow / section label ────────────────────────────────── */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sapphire);
}
.eyebrow--orange { color: var(--orange); }
.eyebrow__rule {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
}

/* ── Tag chips ──────────────────────────────────────────────── */
.tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 5px 10px;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  display: inline-block;
}
.tag--accent {
  color: var(--orange);
  border-color: var(--orange-border);
}
/* Compact tag (case study + work card variants) */
.tag-mini {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 237, 238, 0.85);
  padding: 3px 7px;
  border: 1px solid rgba(240, 237, 238, 0.20);
  border-radius: 2px;
}
.tag-mini--soft { color: rgba(240, 237, 238, 0.80); border-color: var(--border-mid); }

/* NDA lock chip */
.tag-nda {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 2px 6px;
  border: 1px solid var(--orange);
  border-radius: 2px;
}

/* ── Buttons / pills ────────────────────────────────────────── */
.btn-primary {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--platinum);
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  display: inline-block;
}
.btn-primary--lg { padding: 14px 24px; font-size: 14px; }
.btn-ghost {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--platinum);
  background: transparent;
  border: 1px solid var(--border-strong);
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  display: inline-block;
}
.btn-ghost--lg { padding: 14px 24px; font-size: 14px; }

/* Uppercase pill (About → "Let's talk", form submit) */
.btn-pill-upper {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--platinum);
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
}

/* ── Top nav ────────────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-faint);
  padding: 28px 64px;
}
.topnav--compact { padding: 20px 40px; }
.topnav__list {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.topnav__link {
  color: var(--text-faint);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
}
.topnav__link.is-active { color: var(--platinum); }
.topnav__link.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sapphire);
}

/* ── Headline / typography presets ──────────────────────────── */
.headline-xl {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--platinum);
  text-wrap: balance;
  margin: 0;
}
.headline-lg {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--platinum);
  margin: 0;
}
.headline-md {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--platinum);
  text-wrap: balance;
  margin: 0;
}
.headline-card {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--platinum);
  text-wrap: balance;
  margin: 0;
}
.body-serif {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-strong);
  text-wrap: pretty;
  margin: 0;
}
.body-serif--lg { font-size: 19px; line-height: 1.4; }

/* ── Section divider (used 4× per case study) ──────────────── */
.divider-row {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

/* ── Meta row labels (Role / Client / Timeframe) ───────────── */
.meta-key {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 2px;
}
.meta-value {
  color: var(--platinum);
  line-height: 1.35;
}

/* ── CTA card (bottom of each case study) ──────────────────── */
.cta-card {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--navy);
  border: 1px solid var(--border-faint);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}
.cta-card__eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 3px;
}
.cta-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--platinum);
  line-height: 1.15;
  margin-bottom: 3px;
}
.cta-card__detail {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-soft);
  text-wrap: pretty;
}
.cta-card__btn {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--platinum);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

/* ── Form fields (about + password modal) ──────────────────── */
.field-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}
.field-input {
  background: transparent;
  border: 1px solid rgba(240, 237, 238, 0.20);
  border-radius: 2px;
  padding: 11px 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--platinum);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--orange); }
.field-input--textarea { resize: none; min-height: 120px; flex: 1; }

.field-error {
  font-size: 12px;
  color: var(--orange);
  margin-top: 10px;
}
.field-success {
  font-size: 12px;
  color: var(--platinum);
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--orange);
  background: rgba(204, 87, 40, 0.08);
  line-height: 1.45;
}

/* ── Password modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 28, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  font-family: var(--font-ui);
}
.modal-card {
  width: 480px;
  background: var(--ink);
  border: 1px solid var(--orange);
  padding: 36px 32px;
}
.modal-card__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--platinum);
  margin: 14px 0 8px;
  letter-spacing: -0.01em;
}
.modal-card__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
  margin: 0 0 20px;
}
.modal-card__desc a {
  color: var(--platinum);
  border-bottom: 1px solid var(--orange);
  text-decoration: none;
}

/* ── Work card (work.html grid) ─────────────────────────────── */
.work-card {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 30, 87, 0.35);
  text-decoration: none;
  color: var(--platinum);
  transition: border-color 0.2s, background 0.2s;
  min-height: 0;
}
.work-card:hover {
  border-color: var(--orange);
  background: var(--navy-card-hover);
}
.work-card__index {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-ghost);
  line-height: 1;
}
.work-card__time {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.work-card__subtitle {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.work-card__hook {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-body);
  margin: 0 0 12px;
  text-wrap: pretty;
}
.work-card__cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--platinum);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
  margin-top: auto;
}

/* ── Featured case card (no-scroll home) ───────────────────── */
.feat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  border: 1px solid var(--border-soft);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--platinum);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.feat-card--featured {
  background: var(--navy);
  border-color: rgba(38, 103, 255, 0.35);
}
.feat-card:hover { border-color: var(--orange); }
.feat-card--featured:hover { background: rgba(15, 30, 87, 0.85); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-faint);
  padding: 12px 40px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}
.site-footer__credit { color: rgba(240, 237, 238, 0.5); white-space: nowrap; }
.site-footer__credit strong { color: rgba(240, 237, 238, 0.85); font-weight: 500; }
.site-footer__sep { margin: 0 8px; color: rgba(240, 237, 238, 0.3); }

/* ── LinkedIn pill (about page) ─────────────────────────────── */
.linkedin-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-soft);
  text-decoration: none;
  width: fit-content;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  transition: border-color 160ms ease, color 160ms ease;
  margin-top: 14px;
}
.linkedin-chip:hover { border-color: var(--orange); color: var(--platinum); }

/* ── Mobile breakpoint (≤768px) ─────────────────────────────
   Phones + tablets in portrait. Single-column, vertical scroll.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Allow vertical scrolling on mobile (overrides the base hidden) */
  html, body { overflow-x: hidden; overflow-y: auto; }

  /* Drop the desktop min-width that locks the page-shell at 1440 */
  .page-shell {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 100vh;
    overflow: visible;
  }

  /* Top nav: tighten padding, drop the CTA pill, allow wrap */
  .topnav,
  .topnav--compact {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .topnav__list { gap: 18px; font-size: 13px; }
  .topnav__cta { display: none; }

  /* Footer: stack, smaller padding */
  .site-footer {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 10px;
  }

  /* ── Typography scale-down ──────────────────────────────── */
  .headline-xl { font-size: 36px; line-height: 1.05; }
  .headline-lg { font-size: 32px; line-height: 1.08; }
  .headline-md { font-size: 28px; line-height: 1.1; }
  .headline-card { font-size: 22px; }

  /* ── HOME (no-scroll) ───────────────────────────────────── */
  .home-main {
    grid-template-columns: 1fr !important;
    flex: none !important;
    min-height: 0 !important;
  }
  .home-identity {
    padding: 28px 20px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-faint);
  }
  .home-identity__row h1 {
    font-size: 40px !important;
    white-space: normal !important;
  }
  .home-featured {
    padding: 28px 20px !important;
  }
  .feat-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  /* Card needs auto height on mobile (desktop uses 100% to fill grid row) */
  .feat-card {
    height: auto !important;
  }
  /* Image wrapper: lock aspect ratio with flex-shrink: 0 so it can't collapse */
  .feat-card > div:first-child {
    flex-shrink: 0 !important;
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
  }

  /* ── WORK page ──────────────────────────────────────────── */
  .work-main {
    padding: 20px 20px 24px !important;
    flex: none !important;
    overflow: visible !important;
  }
  .work-header {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .work-header > div:last-child {
    text-align: left !important;
  }
  .work-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 16px !important;
  }

  /* Work card: stack image on top, text below, CTA at the bottom of the card */
  .work-card {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    gap: 14px !important;
    padding: 16px !important;
  }
  /* Right column wrapper → promote its children (image + CTA) to flex siblings */
  .work-card > div:last-child { display: contents !important; }
  /* Visual order: image (was right-col first child) → body (left-col) → CTA (was right-col last child) */
  .work-card > div:last-child > div:first-child { order: 1; aspect-ratio: 748 / 644 !important; }
  .work-card > div:first-child { order: 2; }
  .work-card .work-card__cta { order: 3; align-self: flex-start; margin-top: 4px; }

  /* ── CASE STUDY pages ───────────────────────────────────── */
  .case-main {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 20px 20px 32px !important;
    flex: none !important;
    overflow: visible !important;
  }
  .outcomes-grid {
    grid-template-columns: 1fr !important;
  }
  .cta-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  .cta-card__btn { justify-self: start; }

  /* ── ABOUT page ─────────────────────────────────────────── */
  .about-main {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 24px 20px 32px !important;
    flex: none !important;
  }
  /* About section: keep 2-column — compact photo/identity column + about text */
  .about-section {
    grid-template-columns: 140px 1fr !important;
    gap: 18px !important;
  }
  /* Identity column: shrink the headshot box from desktop's 220×260 */
  .about-section > div:first-child > div:first-child {
    width: 140px !important;
    height: 168px !important;
  }
  .about-contact {
    padding: 24px 20px !important;
  }
  /* Design philosophy: keep 2×2 grid on mobile */
  .philosophy-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 16px !important;
  }

  /* Modal: full-bleed-ish on mobile */
  .modal-card {
    width: calc(100vw - 32px);
    max-width: 480px;
    padding: 28px 20px;
  }
}
