/* brandenbeachy.com/new — public page
   Palette is taken from the locomotive photo itself (graphite, steel, steam)
   plus coral (#f75f5f) as the single signal colour for actions. */
:root {
  --smokebox: #1c1e20;
  --steel: #2c3034;
  --steel-2: #3a3f44;
  --ballast: #9aa0a5;
  --steam: #f1f2ef;
  --armour: #f75f5f;
  --armour-deep: #f75f5f;
  --board: #000;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --edge: clamp(16px, 4vw, 56px);
  --radius: 6px;
  --shade: 0.2;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--steam);
  background: var(--smokebox);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--armour); outline-offset: 3px; border-radius: 2px; }

/* ---------- The locomotive: fixed behind the whole page ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -2;
  background: #6b6f72 url("bg-train.jpg") 62% 40% / cover no-repeat;
  animation: steam-in 1.6s cubic-bezier(.2,.7,.2,1) both;
}
@media (max-width: 900px) {
  .backdrop { background-image: url("bg-train-sm.jpg"); background-position: 66% 50%; }
}
.backdrop-shade {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28,30,32,.55) 0%, rgba(28,30,32,0) 22%),
    linear-gradient(20deg, rgba(28,30,32,.92) 0%, rgba(28,30,32,.55) 38%, rgba(28,30,32,0) 70%),
    rgba(28,30,32, var(--shade));
}
@keyframes steam-in {
  from { opacity: 0; transform: scale(1.06); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--edge);
  padding-top: max(14px, env(safe-area-inset-top));
  transition: background-color .3s, backdrop-filter .3s, box-shadow .3s;
}
.topbar.is-solid {
  background: rgba(28,30,32,.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(241,242,239,.08);
}
.wordmark { display: flex; flex-direction: column; text-decoration: none; line-height: .9; }
.wordmark-name { font-family: var(--display); font-weight: 800; font-size: 1.55rem; letter-spacing: .01em; }
.wordmark-trade { font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--ballast); letter-spacing: .08em; }
.topnav { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); }
.topnav-link { text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .9; }
.topnav-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 560px) { .topnav-link { display: none; } }
@media (max-width: 760px) { .hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 2px solid transparent; border-radius: 4px;
  font-family: var(--body); font-weight: 650; font-size: 1rem; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.06rem; }
.btn-signal { background: var(--armour); color: var(--smokebox); }
.btn-signal:hover { background: #f75f5f; }
.btn-steam { border-color: rgba(241,242,239,.85); color: var(--steam); background: rgba(28,30,32,.25); }
.btn-steam:hover { background: var(--steam); color: var(--smokebox); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px var(--edge) clamp(56px, 10vh, 110px);
}
.hero-copy { max-width: 760px; }
.hero-title {
  margin: 0;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3.6rem, 12vw, 9.5rem);
  line-height: .84; letter-spacing: -.005em;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero-text { max-width: 34em; margin: 22px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(241,242,239,.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  color: rgba(241,242,239,.7); border-radius: 50%;
}
.hero-scroll:hover { color: var(--steam); }
@media (max-width: 560px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-scroll { display: none; }
}

/* The number board, after the X4014 board on the smokebox */
.number-board {
  display: inline-flex; align-items: baseline; gap: .3em;
  margin-bottom: 20px; padding: 6px 14px 5px;
  background: var(--board); color: var(--steam);
  border: 2px solid rgba(241,242,239,.85); outline: 1px solid var(--board);
  box-shadow: inset 0 0 0 3px var(--board), inset 0 0 0 4px rgba(241,242,239,.35);
  font-family: var(--display); line-height: 1;
}
.nb-num { font-weight: 900; font-size: 2.3rem; }
.nb-word { font-weight: 700; font-size: 1.35rem; }

/* ---------- Sports pictures band ---------- */
.sports {
  position: relative;
  background: var(--armour); color: var(--smokebox);
  padding: clamp(36px, 6vw, 64px) var(--edge);
  scroll-margin-top: 60px;
}
.sports::before, .sports::after { /* the striping on a UP locomotive */
  content: ""; position: absolute; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--smokebox) 0 28px, transparent 28px 40px);
  opacity: .9;
}
.sports::before { top: 10px; }
.sports::after { bottom: 10px; }
.sports-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; gap: clamp(20px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center;
}
.sports-title {
  margin: 0; font-family: var(--display); font-weight: 900;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: .9; text-wrap: balance;
}
.sports-text { margin: 14px 0 0; max-width: 30em; font-weight: 500; }
.sports-links { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 860px) { .sports-inner { grid-template-columns: 1fr; } }

/* Railroad ticket: notched sides */
.ticket {
  --notch: 12px;
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 26px 18px; min-height: 132px;
  background: var(--smokebox); color: var(--steam); text-decoration: none;
  border-radius: 4px;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  transition: transform .18s, background-color .18s;
}
.ticket:hover { background: #000; transform: translateY(-2px); }
.ticket-label { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.ticket-note { color: var(--ballast); font-size: .95rem; }
.ticket-go {
  margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--armour); font-weight: 650;
  border-top: 1px dashed rgba(241,242,239,.25);
}
.ticket:hover .ticket-go svg { transform: translateX(3px); }
.ticket-go svg { transition: transform .18s; }

/* ---------- Products ---------- */
.products {
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px);
  background: rgba(28,30,32,.84);
  -webkit-backdrop-filter: blur(18px) saturate(.8); backdrop-filter: blur(18px) saturate(.8);
  scroll-margin-top: 40px;
}
.products-head {
  max-width: 1240px; margin: 0 auto 28px; padding: 0 var(--edge);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.products-title { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .9; }
.products-text { margin: 10px 0 0; color: var(--ballast); max-width: 36em; }
.carousel-controls { display: flex; align-items: center; gap: 10px; }
.carousel-count { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-right: 6px; color: var(--ballast); font-variant-numeric: tabular-nums; }
.carousel-count [data-current] { color: var(--steam); }
.round-btn {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; border: 2px solid rgba(241,242,239,.35); background: transparent; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.round-btn:hover { border-color: var(--armour); color: var(--armour); }
.round-btn:disabled { opacity: .35; cursor: default; border-color: rgba(241,242,239,.35); color: inherit; }

.carousel { --slide-w: min(1120px, 88vw); position: relative; }
@media (max-width: 700px) { .carousel { --slide-w: 86vw; } }
.track {
  position: relative;
  display: flex; gap: clamp(12px, 2vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 6px calc((100% - var(--slide-w)) / 2) 14px;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -3px; }
.slide {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center; scroll-snap-stop: always;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  background: var(--steel); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  transition: opacity .4s, transform .4s;
}
.js .slide:not(.is-active) { opacity: .38; transform: scale(.965); }
@media (max-width: 860px) { .slide { grid-template-columns: 1fr; } }

.slide-media {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 4 / 3.3; overflow: hidden; background: #111315;
}
@media (max-width: 860px) { .slide-media { aspect-ratio: 1 / 1; } }
.slide-blur {
  position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(34px) brightness(.55) saturate(1.1); transform: scale(1.1);
}
.slide-media img { position: relative; width: 100%; height: 100%; object-fit: contain; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.slide-media:hover img { transform: scale(1.025); }
.photo-count {
  position: absolute; left: 12px; bottom: 12px;
  padding: 4px 10px; border-radius: 3px; font-size: .82rem; font-weight: 600;
  background: rgba(0,0,0,.66); color: var(--steam);
}
.slide-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(22px, 3.2vw, 44px); }
.slide-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: .95; text-wrap: balance; }
.slide-summary { margin: 14px 0 0; color: rgba(241,242,239,.86); max-width: 32em; }
.price { margin: 18px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1; color: var(--armour); }
.price-note { font-family: var(--body); font-weight: 500; font-size: .95rem; color: var(--ballast); }
.slide-actions { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) { .slide-body { justify-content: flex-start; } .slide-actions { width: 100%; margin-top: 22px; } .slide-actions .btn { width: 100%; } }

/* Badge set like a number board */
.badge {
  display: inline-block; margin-bottom: 14px; padding: 4px 10px 3px;
  background: var(--board); color: var(--steam);
  border: 1.5px solid rgba(241,242,239,.8);
  box-shadow: inset 0 0 0 2px var(--board), inset 0 0 0 3px rgba(241,242,239,.3);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.1; letter-spacing: .03em;
}

/* Thumbnail rail: every product one tap away */
.rail {
  max-width: 1240px; margin: 22px auto 0; padding: 4px var(--edge) 8px;
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin;
}
.rail-item {
  flex: 0 0 auto; display: grid; grid-template-columns: 56px auto; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; text-align: left;
  width: 230px; padding: 8px 12px 8px 8px; cursor: pointer;
  background: rgba(241,242,239,.05); border: 2px solid transparent; border-radius: var(--radius);
  transition: background-color .15s, border-color .15s;
}
.rail-item img { grid-row: 1 / 3; width: 56px; height: 56px; object-fit: cover; border-radius: 3px; }
.rail-title { font-weight: 600; font-size: .92rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: end; }
.rail-price { font-family: var(--display); font-weight: 700; color: var(--armour); align-self: start; }
.rail-item:hover { background: rgba(241,242,239,.1); }
.rail-item[aria-selected="true"] { border-color: var(--armour); background: rgba(247,95,95,.08); }

.empty { max-width: 640px; margin: 0 auto; padding: 32px var(--edge); text-align: center; }
.empty-title { font-family: var(--display); font-weight: 800; font-size: 2.2rem; margin: 0 0 6px; }
.empty .btn { margin-top: 18px; }

/* ---------- Footer ---------- */
.footer { background: #141517; padding: 48px var(--edge) 28px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; line-height: .95; }
.footer-place { margin: 12px 0 0; color: var(--ballast); font-size: .95rem; line-height: 1.4; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.footer-links a { text-decoration: none; color: rgba(241,242,239,.85); }
.footer-links a:hover { color: var(--armour); text-decoration: underline; text-underline-offset: 4px; }
.copyright { max-width: 1240px; margin: 36px auto 0; color: #6f757a; font-size: .85rem; }

/* ---------- Product detail window ---------- */
.pd {
  width: min(1180px, 100vw - 32px); max-width: none; max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--steel); color: var(--steam);
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
.pd::backdrop { background: rgba(10,11,12,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pd[open] { animation: pd-in .28s cubic-bezier(.2,.7,.2,1); }
@keyframes pd-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.pd-frame { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); max-height: calc(100vh - 32px); }
.pd-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(28,30,32,.8); }
.pd-gallery { background: #111315; display: flex; flex-direction: column; min-height: 0; }
.pd-main { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; }
.pd-main img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; padding: 0 12px 12px; overflow-x: auto; }
.pd-thumbs:empty { display: none; }
.pd-thumbs button { flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 3px; background: none; cursor: pointer; opacity: .6; }
.pd-thumbs button[aria-current="true"] { border-color: var(--armour); opacity: 1; }
.pd-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 2px; }
.pd-info { padding: clamp(24px, 3vw, 44px); padding-top: 56px; overflow-y: auto; display: flex; flex-direction: column; align-items: flex-start; }
.pd-title:focus { outline: none; }
.pd-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 3.6vw, 3.2rem); line-height: .95; }
.pd-desc { margin-top: 18px; color: rgba(241,242,239,.88); max-width: 36em; }
.pd-desc p { margin: 0 0 .85em; }
.pd-actions { margin-top: 18px; width: 100%; }
.pd-actions .btn { width: 100%; }
.pd-share { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .95rem; color: var(--ballast); }
.pd-share a, .pd-share button { color: var(--steam); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(241,242,239,.35); }
.pd-share a:hover, .pd-share button:hover { color: var(--armour); }
@media (max-width: 860px) {
  .pd { width: 100vw; max-height: 100vh; height: 100%; border-radius: 0; margin: 0; }
  .pd-frame { grid-template-columns: 1fr; max-height: 100vh; height: 100%; overflow-y: auto; }
  .pd-main img { max-height: 62vh; }
  .pd-info { padding-top: 22px; overflow: visible; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
