@font-face {
  font-family: "CCGibbonsGazette";
  src: url("/fonts/CCGibbonsGazette.woff2") format("woff2"),
       url("/fonts/CCGibbonsGazette.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fdf3e7;
  --surface: color-mix(in srgb, #fdf3e7 97%, #e6640e);
  --ink: #1f1108;
  --ink-muted: color-mix(in srgb, #1f1108 68%, #fdf3e7);
  --line: color-mix(in srgb, #1f1108 14%, #fdf3e7);
  --orange: #e6640e;
  --orange-hover: color-mix(in srgb, #e6640e 82%, #1f1108);
  --orange-soft: color-mix(in srgb, #e6640e 10%, #fdf3e7);
  --max-w: 760px;
  /* Wider track used by the prototypes showcase, the header and the footer,
     so the brand lines up with the section content instead of sitting inside it. */
  --max-w-wide: 1080px;
  --shadow-sm: 0 1px 2px rgba(31, 17, 8, 0.04);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  /* The page is never meant to scroll sideways; lock it so a slightly
     off-axis touch swipe can't pan or rubber-band the page left/right. */
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
body > main { flex: 1; }

/* Warm paper grain across the whole viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.42'/></svg>");
  background-size: 220px 220px;
  opacity: 0.35;
  mix-blend-mode: multiply;
}
/* The grain is a fixed layer blended against the page, which the browser must
   re-composite on every scroll frame — cheap on desktop, but a frame-drop
   source on mobile GPUs. Drop it on small screens, where it's imperceptible. */
@media (max-width: 720px) {
  body::before { display: none; }
}

a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { border-bottom-color: var(--orange); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max-w-wide);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  border: none;
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  flex: 0 1 auto;
  min-width: 0;
}
.brand:hover { border: none; color: var(--orange); }
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  white-space: nowrap; /* keep "MesaHeights Creative" on one line */
}
.brand-name .accent { color: var(--orange); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0; /* nav keeps its width; the brand shrinks instead */
}
.nav a {
  color: var(--ink-muted);
  font-size: 0.95rem;
  white-space: nowrap; /* keep each link, and the row, unbroken */
}
.nav a:hover { color: var(--orange); }
.nav a.active { color: var(--ink); }

/* Narrow phones: scale the header down so the brand and the nav each stay
   on a single line without wrapping. */
@media (max-width: 560px) {
  .site-header .container { gap: 0.75rem; }
  .brand { font-size: 0.95rem; gap: 0.45rem; }
  .brand img { width: 27px; height: 27px; }
  .nav { gap: 0.9rem; }
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.85rem;
  }
}
@media (max-width: 380px) {
  .brand { font-size: 0.85rem; }
  .brand img { width: 24px; height: 24px; }
  .nav { gap: 0.7rem; }
  .nav a { font-size: 0.78rem; }
}

/* ---------- Hero ---------- */
.hero {
  /* Keep the container's 1.5rem side padding — a `0` here would let the
     tagline run edge-to-edge on phones. */
  padding: 2.25rem 1.5rem 1.5rem;
  text-align: left;
  position: relative;
  isolation: isolate;
}
.hero.hero-center { text-align: center; }

/* Soft warm halo behind the hero.
   Horizontal inset stays 0 so the glow never bleeds past the viewport
   (a negative x-inset caused horizontal page scroll on mobile). */
.hero::before {
  content: "";
  position: absolute;
  inset: -1.5rem 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 70% at 50% 45%,
    rgba(230, 100, 14, 0.18),
    rgba(230, 100, 14, 0.06) 45%,
    transparent 72%
  );
}

.hero-mark {
  margin: 0 auto 1rem;
  animation: rise-in 700ms ease-out both;
}
.hero-logo-icon {
  display: block;
  margin: 0 auto 0.25rem;
  width: 100%;
  max-width: clamp(140px, 18vw, 200px);
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(31, 17, 8, 0.08));
}
.hero-wordmark {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.hero-wordmark .accent { color: var(--orange); }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo-wrap, .hero-tagline { animation: none; }
}
.hero-title {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  line-height: 1.05;
  margin: 0 0 1.25rem;
  letter-spacing: 0.01em;
}
.hero-title .accent { color: var(--orange); }
.hero-tagline {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 24em;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: rise-in 700ms ease-out 180ms both;
}
.hero.hero-center .hero-tagline {
  margin: 0 auto;
}
.hero-subline {
  font-size: 0.98rem;
  color: var(--ink-muted);
  max-width: 30em;
  margin: 0.7rem 0 0;
  animation: rise-in 700ms ease-out 260ms both;
}
.hero.hero-center .hero-subline {
  margin: 0.7rem auto 0;
}

/* ---------- Sections ---------- */
section.block {
  padding: 1.5rem 0;
}
.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--orange);
  margin: 0 0 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.section-heading {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  line-height: 1.1;
  margin: 0 0 0.6rem;
  letter-spacing: 0.005em;
}
.section-body {
  color: var(--ink-muted);
  max-width: 36em;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}
.section-body p { margin: 0 0 0.75rem; }
.section-body p:last-child { margin-bottom: 0; }

/* Simple orange dash divider between sections */
.dash-divider {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--orange);
  border: 0;
  border-radius: 2px;
  margin: 1.5rem auto;
}

/* About block on the home page */
.about-block {
  text-align: center;
  padding: 0.5rem 1.5rem 1rem;
}
.about-copy {
  color: var(--ink-muted);
  font-size: 1rem;
  max-width: 30em;
  margin: 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  padding: 1.75rem 0 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  background: linear-gradient(180deg, rgba(230, 100, 14, 0.035), transparent 55%);
  font-size: 0.9rem;
}
.site-footer a { color: var(--ink-muted); border-bottom: none; }
.site-footer a:hover { color: var(--orange); border-bottom: none; }
.site-footer .container { max-width: var(--max-w-wide); }

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.15rem;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
}
.footer-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(31, 17, 8, 0.06));
}
.footer-wordmark {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  line-height: 1;
}
.footer-wordmark .accent { color: var(--orange); }

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-end;
  text-align: right;
}
.footer-nav {
  display: flex;
  gap: 1.35rem;
  font-size: 0.9rem;
}
.footer-email {
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.6rem 2rem;
}
.footer-address {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.7;
  line-height: 1.55;
  max-width: 480px;
  flex: 1 1 280px;
}
.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.9;
  white-space: nowrap;
}

/* ---------- Jobs ---------- */
.jobs-intro {
  /* Side padding must be kept so the heading and copy don't touch the
     screen edges on phones; top space scales down on short screens. */
  padding: clamp(2.5rem, 7vh, 4.5rem) 1.5rem 2rem;
}
.jobs-intro .section-heading {
  font-size: clamp(2.1rem, 5vw, 2.9rem);
}
.jobs-intro p {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 36em;
  margin: 0;
}
.jobs-list {
  padding: 1.5rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.jobs-group + .jobs-group { margin-top: 3.5rem; }
.jobs-group-title {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1.25rem;
}
.jobs-group-copy {
  color: var(--ink-muted);
  margin: -0.75rem 0 1.25rem;
}
.jobs-group-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.job-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: 0 1px 2px rgba(31, 17, 8, 0.04), 0 10px 30px rgba(31, 17, 8, 0.05);
}

/* Card header: the role title, set off from the body by a hairline. The display
   font is reserved for this one heading so it clearly leads the card. */
.job-card h2 {
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.job-body {
  color: var(--ink);
}
.job-card.filled {
  padding: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, var(--line));
}
.filled-job-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  cursor: pointer;
  list-style: none;
}
.filled-job-summary::-webkit-details-marker { display: none; }
.filled-job-summary-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 0.65rem;
}
.filled-job-title {
  color: var(--ink);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
}
.job-filled-status {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.filled-job-toggle {
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.filled-job-toggle::after {
  content: " +";
  color: var(--orange);
  font-size: 1.05em;
}
.filled-job-details[open] .filled-job-toggle::after { content: " −"; }
.filled-job-toggle .when-open { display: none; }
.filled-job-details[open] .when-closed { display: none; }
.filled-job-details[open] .when-open { display: inline; }
.filled-job-body {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid var(--line);
}
.job-body > :first-child { margin-top: 0; }
.job-body p { margin: 0.7rem 0; }

/* In-body section labels ("About the project", "Responsibilities", …): a quiet,
   letter-spaced sans-serif eyebrow — refined rather than loud, so hierarchy is
   clear without competing with the title. */
.job-body h2, .job-body h3, .job-body h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--orange);
  margin: 2rem 0 0.75rem;
}

/* Lists: small, subtle brand markers + comfortable spacing for scannability. */
.job-body ul, .job-body ol { margin: 0.7rem 0; }
.job-body li { margin: 0.5rem 0; }
.job-body ul { list-style: none; padding-left: 0; }
.job-body ul > li { position: relative; padding-left: 1.4rem; }
.job-body ul > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 50%;
  transform: translateY(-50%);
}
.job-body ol { padding-left: 1.5rem; }
.job-body ol > li { padding-left: 0.25rem; margin: 0.5rem 0; }
.job-body ol > li::marker { color: var(--orange); font-weight: 700; }

.job-body a { color: var(--orange); border-bottom: 1px solid var(--orange); }

/* Per-card apply action: a solid primary CTA, set off by a hairline. */
.job-card-foot {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.job-apply {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  background: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.job-apply:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
  color: var(--ink);
}
.job-body blockquote {
  margin: 0.75rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--orange);
  color: var(--ink-muted);
}
.job-body code {
  background: var(--orange-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}

.jobs-empty {
  padding: 1rem 0 3rem;
  color: var(--ink-muted);
}

.jobs-loading {
  padding: 1.5rem 0;
  color: var(--ink-muted);
  font-style: italic;
}

/* ---------- Full-screen hero ---------- */
.hero-full {
  min-height: calc(100vh - 68px);
  /* svh (not dvh): a stable height that doesn't change as the mobile URL bar
     hides/shows, so the full-height hero doesn't reflow mid-scroll. */
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* The scroll cue is positioned at the bottom of the hero. Reserve enough
     vertical room for it so shorter desktop windows cannot make it overlap
     the subline; because this is a min-height, very short screens can still
     grow and scroll naturally. */
  padding-top: clamp(1.5rem, 4vh, 3rem);
  padding-bottom: clamp(7rem, 12vh, 8rem);
}
.hero-full .hero-logo-icon { max-width: clamp(190px, 22vw, 300px); }
.hero-full .hero-wordmark { font-size: clamp(2.7rem, 7vw, 4.75rem); }
.hero-full .hero-tagline { font-size: clamp(1.05rem, 1.9vw, 1.45rem); margin-top: 0.6rem; }
.hero-full .hero-subline { font-size: 1.05rem; }

.hero-scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--ink-muted);
  border: none;
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-scroll:hover { color: var(--orange); border: none; }
.hero-scroll svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@media (prefers-reduced-motion: reduce) { .hero-scroll svg { animation: none; } }

/* ---------- Prototypes (home section, alternating rows) ---------- */
.prototypes-section {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: clamp(3.5rem, 10vh, 7rem) 1.5rem;
}
.prototypes-head {
  text-align: center;
  margin-bottom: clamp(3rem, 7vh, 5rem);
}
.prototypes-head .section-eyebrow {
  justify-content: center;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  margin-bottom: 1.1rem;
}
/* Symmetric dash on the trailing side for the centered label */
.prototypes-head .section-eyebrow::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.prototypes-head .section-eyebrow::before { width: 26px; }
.prototypes-head .section-heading {
  font-size: clamp(2.6rem, 5.5vw, 4.25rem);
  line-height: 1.02;
  margin-bottom: 1.1rem;
}
.prototypes-head .section-body {
  margin: 0 auto;
  font-size: 1.1rem;
  max-width: 42ch;
}

.prototypes-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 9vh, 6.5rem);
}
.prototype-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
}
/* Alternate: even rows flip media to the right, text to the left */
.prototype-row:nth-child(even) .prototype-media { order: 2; }
.prototype-row:nth-child(even) .prototype-info {
  order: 1;
  text-align: right;
  justify-items: end;
}

.prototype-media {
  display: block;
  border: none;
  line-height: 0;
}
.prototype-media:hover { border: none; }
.prototype-media img,
.prototype-media-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--ink);
}
.prototype-media-placeholder {
  background: var(--orange-soft);
}

.prototype-info { display: grid; gap: 0.75rem; }
.prototype-name {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(1.85rem, 2.6vw, 2.3rem);
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  overflow-wrap: break-word;
}
.prototype-blurb {
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 34em;
  margin: 0;
}
.btn-pill {
  display: inline-block;
  justify-self: start;
  margin-top: 0.5rem;
  padding: 0.7rem 1.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-pill:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}
.prototype-row:nth-child(even) .btn-pill { justify-self: end; }

.prototypes-empty,
.prototypes-loading {
  padding: 1rem 0;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
}

/* ---------- Prototype detail page ---------- */
.prototype-back {
  padding-top: 2.5rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.prototype-back a {
  color: var(--ink-muted);
  text-decoration: none;
}
.prototype-back a:hover { color: var(--orange); }
.prototype-detail {
  padding-bottom: 3.5rem;
}
.prototype-detail h1 {
  font-family: "CCGibbonsGazette", sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
}
.prototype-detail-cover {
  margin: 0 0 1.75rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.prototype-detail-cover img {
  width: 100%;
  height: auto;
  display: block;
}
.prototype-body {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.65;
  overflow-wrap: break-word; /* long words / URLs wrap instead of overflowing */
}
.prototype-body p { margin: 0.75rem 0; }
.prototype-body ul, .prototype-body ol { padding-left: 1.25rem; margin: 0.75rem 0; }
.prototype-body h2, .prototype-body h3, .prototype-body h4 {
  font-family: "CCGibbonsGazette", sans-serif;
  margin: 1.5rem 0 0.5rem;
}
.prototype-body a { color: var(--orange); border-bottom: 1px solid var(--orange); }
.prototype-body blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--orange);
  color: var(--ink-muted);
}
.prototype-body code {
  background: var(--orange-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
.prototype-body pre {
  background: var(--orange-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  font-size: 0.9em;
  white-space: pre-wrap;   /* wrap long code lines */
  overflow-wrap: anywhere; /* break very long unbroken tokens */
  overflow-x: auto;        /* last-resort scroll within the block */
}
.prototype-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.prototype-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}
/* Alignment written by the editor (applies to text and images alike). */
.prototype-body .ql-align-center { text-align: center; }
.prototype-body .ql-align-right { text-align: right; }
.prototype-body .ql-align-justify { text-align: justify; }
/* When the class lands on the image itself, centre/right it as a block. */
.prototype-body img.ql-align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.prototype-body img.ql-align-right {
  display: block;
  margin-left: auto;
  margin-right: 0;
}
.prototype-loading {
  padding: 3rem 0;
  color: var(--ink-muted);
  font-style: italic;
}
.prototype-missing {
  padding: 2rem 0 4rem;
  color: var(--ink-muted);
}
.prototype-missing h1 {
  font-family: "CCGibbonsGazette", sans-serif;
  color: var(--ink);
}
.prototype-missing a { color: var(--orange); }

/* ---------- Image slider (carousel for steps) ---------- */
/* Base strip: a horizontal scroll-snap row of images. Works as a swipeable
   slider even before slider.js upgrades it with arrows and dots. */
.img-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: min(70vh, 460px);
  margin: 1.25rem 0;
  background: var(--orange-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.img-slider::-webkit-scrollbar { display: none; }
.img-slider > img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
  margin: 0;
  border-radius: 10px;
}

/* Enhanced state: wrapper positions arrows over the strip and dots below. */
.img-slider-wrap {
  position: relative;
  margin: 1.25rem 0;
}
.img-slider-wrap .img-slider { margin: 0; }
.img-slider-wrap:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.img-slider-arrow {
  position: absolute;
  top: 50%; /* refined to the image-box centre by slider.js */
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 17, 8, 0.62);
  color: var(--bg);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.img-slider-arrow:hover { background: var(--orange); }
.img-slider-arrow.prev { left: 0.6rem; }
.img-slider-arrow.next { right: 0.6rem; }
.img-slider-arrow:disabled { opacity: 0.3; cursor: default; }
.img-slider-arrow:disabled:hover { background: rgba(31, 17, 8, 0.62); }

.img-slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.img-slider-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.img-slider-dot:hover { background: var(--ink-muted); }
.img-slider-dot.active { background: var(--orange); transform: scale(1.25); }

/* ---------- Shared rich-text safety (job + prototype bodies) ----------
   Both are written in the same editor, so job listings can also contain
   images, code blocks and alignment. Keep them from overflowing. */
.job-body { overflow-wrap: break-word; }
.job-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}
.job-body pre {
  background: var(--orange-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  font-size: 0.9em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
}
.job-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.job-body .ql-align-center { text-align: center; }
.job-body .ql-align-right { text-align: right; }
.job-body .ql-align-justify { text-align: justify; }
.job-body img.ql-align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.job-body img.ql-align-right {
  display: block;
  margin-left: auto;
  margin-right: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .footer-main {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
  }
  .footer-info {
    align-items: flex-start;
    text-align: left;
  }
  .footer-nav { gap: 1.15rem; }
  .footer-copy { white-space: normal; }
  .job-card h2 { font-size: 1.5rem; }
  .job-apply { display: block; text-align: center; }
  .filled-job-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  /* Prototype rows stack; drop the left/right alternation */
  .prototype-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .prototype-row:nth-child(even) .prototype-media,
  .prototype-row:nth-child(even) .prototype-info { order: initial; }
  .prototype-row:nth-child(even) .prototype-info {
    text-align: left;
    justify-items: start;
  }
  .prototype-row:nth-child(even) .btn-pill { justify-self: start; }
}
