/* ==========================================================================
   RUSTY OLD ROBOTS — Workshop Rust & Cast Iron Editorial Styles
   ========================================================================== */

:root {
  --bg-hull: #121417;
  --bg-slate: #1a1e23;
  --bg-panel: #22272e;
  --bg-paper: #e3dbca;
  --ink-light: #ece5d5;
  --ink-muted: #a7adb3;
  --ink-dim: #7b838c;
  --border-steel: rgba(236, 229, 213, 0.14);
  --border-strong: rgba(236, 229, 213, 0.28);

  --vermilion: #b84a27;
  --teal: #3a6b7c;
  --amber: #d99b38;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-patch: "Russo One", "Barlow Condensed", sans-serif;

  --radius: 3px;
  --max-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

.patch-dog {
  font-family: var(--font-patch);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  font-size: 0.9em;
  color: var(--amber);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  border-bottom: 1.5px solid rgba(184, 74, 39, 0.75);
  padding: 0 0.14em;
  white-space: nowrap;
}
.patch-approval { display:inline-flex; align-items:center; gap:.35rem; width:max-content; max-width:100%; margin:.35rem 0; color:var(--amber); font:600 .6rem/1.2 var(--font-mono); letter-spacing:.06em; text-transform:uppercase; }
.patch-approval img { display:block; width:1rem; height:1rem; flex:none; }

html {
  scroll-behavior: smooth;
  background-color: var(--bg-hull);
  color: var(--ink-light);
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  background:
    radial-gradient(circle at 18% 0%, rgba(184, 74, 39, 0.14), transparent 45%),
    radial-gradient(circle at 82% 12%, rgba(217, 155, 56, 0.10), transparent 42%),
    var(--bg-hull);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Full-size transparent Rust Bucket & Patch layer behind the webpage */
:root {
  --bucket-z-index: 0;
  --bucket-opacity: 0.50;
}

.bucket-bg-layer {
  position: fixed;
  inset: 0;
  z-index: var(--bucket-z-index);
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: hidden;
  padding-right: clamp(0rem, 3vw, 4rem);
}

.bucket-bg-figure {
  height: min(92vh, calc(100vh - 76px));
  max-height: 1120px;
  width: auto;
  object-fit: contain;
  opacity: var(--bucket-opacity);
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.55));
  transition: opacity 0.15s ease;
}

/* Shared section hero banner featuring Rust Bucket & Patch at The Rust Works
   Left side fades massively to full transparency via CSS mask so it melts seamlessly
   into the cast-iron charcoal & workshop rust page canvas with zero box seams. */
.ror-hero-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ror-hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(84%, 880px);
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/bucket-hero.jpg");
  background-repeat: no-repeat;
  background-position: right 44%;
  background-size: cover;
  opacity: 0.94;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, transparent 24%, rgba(0, 0, 0, 0.08) 36%, rgba(0, 0, 0, 0.48) 50%, rgba(0, 0, 0, 0.92) 66%, #000 88%, rgba(0, 0, 0, 0.85) 97%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, transparent 24%, rgba(0, 0, 0, 0.08) 36%, rgba(0, 0, 0, 0.48) 50%, rgba(0, 0, 0, 0.92) 66%, #000 88%, rgba(0, 0, 0, 0.85) 97%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

.ror-hero-banner > * {
  position: relative;
  z-index: 2;
}

.ror-hero-banner--fullbleed::before {
  width: min(74%, 1060px);
  background-position: right 42%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, transparent 20%, rgba(0, 0, 0, 0.10) 34%, rgba(0, 0, 0, 0.54) 50%, rgba(0, 0, 0, 0.94) 68%, #000 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, #000 12%, #000 90%, rgba(0, 0, 0, 0.45) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, transparent 20%, rgba(0, 0, 0, 0.10) 34%, rgba(0, 0, 0, 0.54) 50%, rgba(0, 0, 0, 0.94) 68%, #000 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, #000 12%, #000 90%, rgba(0, 0, 0, 0.45) 100%);
  mask-composite: intersect;
}

main, .site-footer {
  position: relative;
  z-index: 2;
}

.hazard-strip {
  position: relative;
  z-index: 41;
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    -55deg,
    var(--vermilion),
    var(--vermilion) 14px,
    #253445 14px,
    #253445 28px
  );
  opacity: 0.9;
}

.hazard-strip-bottom { margin-top: 2.5rem; opacity: 0.65; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 20, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-steel);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 64px;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.topbar-meta { display: flex; align-items: center; flex: none; min-width: 0; }
.topbar-brand { display: inline-flex; align-items: center; gap: 0.7rem; white-space: nowrap; text-decoration: none; }
.topbar-brand span { color: var(--bg-paper); font: 700 0.78rem/1 var(--font-mono); letter-spacing: 0.1em; }
.topbar-brand:hover span, .topbar-brand:focus-visible span { color: var(--amber); }
.topbar-logo { width: 29px; height: 29px; object-fit: contain; display: block; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.mono-tag.accent { color: var(--amber); }

.sep { color: var(--ink-dim); font-family: var(--font-mono); font-size: 0.74rem; }

.topbar-nav { display: flex; align-items: center; flex: none; gap: clamp(0.85rem, 1.8vw, 1.55rem); white-space: nowrap; }
.topbar-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.topbar-nav a:hover { color: var(--amber); }
.topbar-nav a[aria-current="page"] { color: var(--amber); }
.topbar-nav a:focus-visible, .topbar-brand:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
.topbar-nav a.btn-pill {
  color: var(--bg-hull);
  background: var(--amber);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.topbar-nav a.btn-pill:hover { background: #eab04e; color: var(--bg-hull); }

/* Mobile hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: rgba(26, 30, 35, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink-light);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Masthead */
.hero { padding-top: 2.5rem; padding-bottom: 2rem; }
.masthead {
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
}
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.masthead-logo {
  width: clamp(68px, 9vw, 108px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8.5vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bg-paper);
  font-weight: 800;
}

.site-deck {
  margin: 1rem 0 0;
  max-width: 46rem;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.5;
  color: var(--ink-muted);
}

/* Launch Hero (Bucket Cover + Issue 01 Pitch) */
.launch-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2.25rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(23, 37, 54, 0.94), rgba(18, 20, 23, 0.98));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.launch-cover-wrap {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a1019;
}

.launch-cover-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.launch-cover-stamp {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.launch-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 0.98;
  text-transform: uppercase;
  color: var(--bg-paper);
}

.launch-dek {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 1.08rem;
}

.launch-highlights {
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--ink-light);
}
.launch-highlights li { margin-bottom: 0.45rem; font-size: 0.98rem; }

.launch-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Buttons & Stamps */
.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: var(--bg-hull);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover { background: #eab04e; }

.btn-secondary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.78rem 1.1rem;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-light);
  border-radius: var(--radius);
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); }

.text-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}

.stamp {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 2px;
  border: 1px solid currentColor;
}
.stamp-flown { color: #6fd3df; background: rgba(58, 107, 124, 0.25); }
.stamp-in-build { color: #ff8a6b; background: rgba(217, 79, 43, 0.28); }
.stamp-speculative { color: #ffc56c; background: rgba(217, 155, 56, 0.22); }

/* Sections */
.section { padding-top: 2.4rem; padding-bottom: 1.8rem; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-steel);
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--bg-paper);
}

/* Meet Bucket Panel */
.bucket-panel {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: var(--bg-slate);
  border: 1px solid var(--border-steel);
  border-radius: var(--radius);
}
.panel-intro { margin: 0.75rem 0 0; color: var(--ink-muted); font-size: 1rem; }
.bucket-plate img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}
.bucket-plate-cap { margin-top: 0.55rem; }

/* Issue Shelf */
.issue-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.issue-shelf-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.1rem;
  text-decoration: none;
  color: inherit;
  background: var(--bg-slate);
  border: 1px solid var(--border-steel);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.issue-shelf-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.issue-shelf-thumb {
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
}
.issue-shelf-info h3 {
  margin: 0.35rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--bg-paper);
}
.issue-shelf-info p { margin: 0 0 0.7rem; font-size: 0.9rem; color: var(--ink-muted); line-height: 1.4; }

/* Commissioning Board */
.questions-panel {
  background: var(--bg-slate);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
}
.questions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.vote-counter {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(18, 20, 23, 0.5);
  color: var(--amber);
}
.questions-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.q-col-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-transform: uppercase;
  color: var(--bg-paper);
}
.col-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--vermilion);
  color: var(--bg-hull);
  border-radius: 2px;
}
.col-index-alt { background: var(--teal); color: #eef6f7; }
.q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.q-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(18, 20, 23, 0.55);
  border: 1px solid var(--border-steel);
  border-radius: var(--radius);
  color: var(--ink-light);
  font-family: var(--font-serif);
  font-size: 0.96rem;
  line-height: 1.4;
  cursor: pointer;
}
.q-item:hover, .q-item.voted { border-color: var(--amber); background: rgba(217, 155, 56, 0.12); }
.q-votes {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border-steel);
  border-radius: 2px;
}
.q-item.voted .q-votes { color: var(--bg-hull); background: var(--amber); border-color: var(--amber); }

/* Subscribe */
.subscribe-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.25rem;
  background: linear-gradient(115deg, rgba(58, 107, 124, 0.16), rgba(26, 30, 35, 0.95) 55%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.subscribe-copy p { margin: 0.65rem 0 0; color: var(--ink-muted); }
.input-row { display: flex; gap: 0.6rem; }
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-light);
  background: rgba(18, 20, 23, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.form-status { margin: 0.65rem 0 0; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-dim); }
.form-status.success { color: #6fd3df; }
.form-status.error { color: #ff8a6b; }

/* Footer */
.site-footer { padding-top: 2rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-top: 1px solid var(--border-steel);
  padding-top: 2rem;
}
.footer-brand { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--bg-paper); }
.footer-note { margin: 0.35rem 0 0; max-width: 28rem; font-size: 0.92rem; color: var(--ink-dim); }
.footer-note strong { color: var(--ink-muted); }
.footer-note a { color: var(--ink-muted); text-decoration: none; border-bottom: 1px solid rgba(217, 155, 56, 0.35); transition: color 0.15s ease, border-color 0.15s ease; }
.footer-note a:hover, .footer-note a:hover strong { color: var(--amber); border-bottom-color: var(--amber); }

@media (max-width: 860px) {
  .launch-hero, .bucket-panel, .questions-columns, .subscribe-card { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
  .nav-toggle { display: flex; }
  .topbar-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.85rem 0 0.35rem;
    margin-top: 0.4rem;
    border-top: 1px solid var(--border-steel);
  }
  .topbar-nav.is-open { display: flex; }
  .topbar-nav a {
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    background: rgba(26, 30, 35, 0.72);
    border: 1px solid var(--border-steel);
    text-align: left;
  }
  .topbar-nav a.btn-pill {
    text-align: center;
    padding: 0.7rem 0.9rem;
    border: none;
  }
  .topbar-nav--utility { display: flex; width: auto; padding: 0; margin: 0; border: 0; }

  /* Keep Rust Bucket & Patch cleanly framed below the sticky topbar on mobile */
  .bucket-bg-layer {
    justify-content: center;
    align-items: flex-start;
    padding: 74px 0 0;
  }
  .bucket-bg-figure {
    height: auto;
    width: min(92vw, 440px);
    max-height: calc(100vh - 80px);
    object-position: top center;
  }

  .ror-hero-banner {
    min-height: 290px;
  }
  .ror-hero-banner::before,
  .ror-hero-banner--fullbleed::before {
    width: 100%;
    background-position: 82% 38%;
    opacity: 0.32;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.25) 35%, rgba(0, 0, 0, 0.92) 82%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.25) 35%, rgba(0, 0, 0, 0.92) 82%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-composite: intersect;
  }

  .launch-cover-stamp {
    top: auto;
    bottom: 0.75rem;
    left: 0.75rem;
  }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .input-row { flex-direction: column; }
}
