/* Hope Plastics — site stylesheet
   Palette: natural polymer page, charcoal ink, the logo's red as the one accent.
   Type: Archivo (variable width + weight) for display and interface,
         Source Serif 4 for running text. */

:root {
  --natural: #eff0ed;      /* page: unpigmented polymer */
  --bench: #ffffff;        /* white bench where parts are photographed */
  --ink: #202221;
  --ink-soft: #4a4d4b;
  --steel: #8c8f8a;        /* rules, captions */
  --steel-light: #d6d8d3;
  --red: #b8231f;          /* from the 1964 logo */
  --red-deep: #8f1a17;
  --blue: #1e4fa3;         /* the mold cavity photo; focus rings only */

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 36rem;        /* ~70 characters of serif */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --page: 80rem;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--natural);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.55;
  font-variation-settings: "opsz" 18;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
table { border-collapse: collapse; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; }

/* ---------- type scale ---------- */
.display-1 {
  font-size: clamp(2.5rem, 7.2vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  font-weight: 760;
  font-variation-settings: "wdth" 112;
  text-wrap: balance;
  max-width: 14ch;
}
.display-2 {
  font-size: clamp(1.9rem, 4.2vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  text-wrap: balance;
  max-width: 18ch;
}
.display-3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 650;
  font-variation-settings: "wdth" 100;
}
.lede {
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  line-height: 1.45;
  max-width: var(--measure);
  font-variation-settings: "opsz" 24;
}
.meta {
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 500;
  font-variation-settings: "wdth" 88;
  color: var(--ink-soft);
  line-height: 1.35;
}
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.prose h3 { margin-top: 2.2em; margin-bottom: 0.5em; }
.prose h3:first-child { margin-top: 0; }

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 650;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1;
  padding: 0.95rem 1.4rem;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
}
.button:hover { background: var(--red-deep); color: #fff; }
.button-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.button-quiet:hover { background: var(--ink); color: #fff; }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  max-width: var(--page);
  margin: 0 auto;
  font-family: var(--display);
  position: relative;
}
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.wordmark:hover { color: inherit; }
.wordmark-name {
  font-size: 1.5rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 115;
  color: var(--red);
}
.wordmark-place {
  font-size: 0.8125rem;
  font-weight: 500;
  font-variation-settings: "wdth" 90;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.site-nav a { text-decoration: none; font-weight: 550; font-size: 1rem; font-variation-settings: "wdth" 100; }
.site-nav a[aria-current="page"] { color: var(--red); box-shadow: 0 2px 0 var(--red); }
.masthead-phone {
  font-weight: 700;
  font-variation-settings: "wdth" 100 !important;
  white-space: nowrap;
  text-decoration: none !important;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}
.masthead-phone:hover { background: var(--ink); color: #fff; }
.nav-toggle {
  display: none;
  font: inherit; font-weight: 600;
  background: none; border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 0.5rem 0.9rem; color: var(--ink); cursor: pointer;
  align-items: center; gap: 0.6rem;
}
.nav-toggle-bars {
  width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block;
}
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 56em) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--natural);
    border-top: 1px solid var(--steel-light);
    border-bottom: 1px solid var(--steel-light);
    padding: 1rem var(--gutter) 1.5rem;
    flex-direction: column; align-items: flex-start; gap: 1.25rem;
    z-index: 20;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0.9rem; }
  .site-nav a { font-size: 1.25rem; }
}

/* ---------- sections ---------- */
.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
}
.section-bench { background: var(--bench); }
.section-bench-wrap { background: var(--bench); }
.section-ink { background: var(--ink); color: #f3f3f0; }
.section-ink a:hover { color: #ffb3ad; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem var(--gutter);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head .lede { margin: 0; }
@media (max-width: 48em) { .section-head { grid-template-columns: 1fr; align-items: start; } }

/* ---------- hero ---------- */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter) 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 2rem var(--gutter);
  align-items: end;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-figure {
  margin: clamp(2rem, 4vw, 3.5rem) calc(-1 * var(--gutter)) 0;
  position: relative;
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 1151 / 349;
  object-fit: cover;
}
.hero-figure figcaption {
  position: absolute; left: var(--gutter); bottom: 0.9rem;
  color: #fff; font-family: var(--display); font-size: 0.9rem; font-weight: 500;
  font-variation-settings: "wdth" 90;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
@media (max-width: 48em) { .hero-grid { grid-template-columns: 1fr; } }

/* page-load reveal: a single moment, once */
@media (prefers-reduced-motion: no-preference) {
  .page-index .hero-figure img { clip-path: inset(0 100% 0 0); animation: wipe 1.1s cubic-bezier(.65,0,.2,1) 0.25s forwards; }
  .page-index .hero-figure figcaption { opacity: 0; animation: appear 0.4s ease 1.2s forwards; }
  @keyframes wipe { to { clip-path: inset(0 0 0 0); } }
  @keyframes appear { to { opacity: 1; } }
}

/* ---------- the process strip (a real sequence, so numbered) ---------- */
.process { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.process li { display: grid; grid-template-rows: calc(clamp(3rem, 6vw, 5rem) + 0.5rem + 2px) 13rem auto; }
.process-num {
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  font-weight: 800;
  font-variation-settings: "wdth" 75;
  color: var(--steel-light);
  border-top: 2px solid var(--ink);
  padding-top: 0.5rem;
  align-self: start;
  overflow: hidden;
}
.process-figure {
  margin: 0;
  display: flex; align-items: flex-end; justify-content: center;
  height: 13rem;
  padding: 1rem 0;
}
.process-figure img { max-height: 11rem; max-width: 100%; width: auto; object-fit: contain; }
.process h3 { margin-bottom: 0.35rem; }
.process p { font-size: 1.0625rem; margin-bottom: 0.6rem; }
.process a { font-family: var(--display); font-weight: 600; font-size: 1rem; }
@media (max-width: 56em) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34em) { .process { grid-template-columns: 1fr; } .process-figure { min-height: 0; justify-content: flex-start; } }

/* ---------- capacity table ---------- */
.capacity { width: 100%; font-family: var(--display); }
.capacity caption { text-align: left; padding-bottom: 1rem; }
.capacity th {
  text-align: left; font-weight: 500; font-size: 0.95rem; color: var(--ink-soft);
  font-variation-settings: "wdth" 88;
  padding: 0 0.5rem 0.6rem 0; border-bottom: 2px solid var(--ink);
}
.capacity td { padding: 0.55rem 0.5rem 0.55rem 0; border-bottom: 1px solid var(--steel-light); vertical-align: baseline; }
.capacity .tons {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 760; letter-spacing: -0.02em; line-height: 1;
  font-variation-settings: "wdth" 110;
  width: 11rem;
  white-space: nowrap;
}
.capacity .tons small { font-size: 0.5em; font-weight: 500; letter-spacing: 0; margin-left: 0.2em; color: var(--ink-soft); font-variation-settings: "wdth" 90; }
.capacity .num { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.capacity-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); align-items: start;
}
.capacity-aside .prose { margin-top: 1.5rem; }
@media (max-width: 56em) { .capacity-grid { grid-template-columns: 1fr; } }

/* ---------- gallery / parts bench ---------- */
.bench {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--bench);
}
.bench li { background: var(--bench); box-shadow: 0 0 0 1px var(--steel-light); }
@media (max-width: 64em) { .bench { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 40em) { .bench { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bench figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.bench a { display: block; }
.bench img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain; object-position: center;
  background: var(--bench);
  padding: 0.75rem;
}
.bench figcaption {
  font-family: var(--display); font-size: 0.9rem; font-weight: 500;
  font-variation-settings: "wdth" 92;
  color: var(--ink-soft); padding: 0 0.9rem 0.9rem;
  margin-top: auto;
}
.bench-more { margin-top: 1.5rem; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 56rem); }
.lightbox::backdrop { background: rgba(32, 34, 33, 0.9); }
.lightbox figure { margin: 0; background: var(--bench); }
.lightbox img { width: 100%; max-height: 75vh; object-fit: contain; }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 1rem; font-family: var(--display); font-size: 1rem; }
.lightbox button { font: inherit; font-weight: 600; background: none; border: 1.5px solid var(--ink); border-radius: 2px; padding: 0.4rem 0.8rem; cursor: pointer; }

/* ---------- story ---------- */
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.story-figure { margin: 0; }
.story-figure img { width: 100%; }
.story-figure figcaption { margin-top: 0.6rem; }
.heritage { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--steel-light); }
.heritage img { width: 150px; }
.years { list-style: none; margin-top: 2rem; display: grid; gap: 0; }
.years li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--steel-light); }
.years li:last-child { border-bottom: 1px solid var(--steel-light); }
.years .year { font-family: var(--display); font-weight: 760; font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1.3; font-variation-settings: "wdth" 110; color: var(--red); }
@media (max-width: 48em) { .story-grid { grid-template-columns: 1fr; } }

/* ---------- contact band ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gutter); margin-top: 2.5rem; }
.contact-grid h3 { margin-bottom: 0.5rem; font-variation-settings: "wdth" 100; }
.contact-grid .big { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variation-settings: "wdth" 105; overflow-wrap: anywhere; }
.contact-grid a { text-decoration: none; }
.contact-grid a:hover { text-decoration: underline; }
.formats { list-style: none; display: grid; gap: 0.25rem; font-family: var(--display); font-variation-settings: "wdth" 92; }
.formats span { color: var(--steel); }
@media (max-width: 48em) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- colophon ---------- */
.colophon { border-top: 2px solid var(--ink); margin-top: 2rem; }
.colophon-grid {
  max-width: var(--page); margin: 0 auto; padding: 2.5rem var(--gutter) 3rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter);
  font-family: var(--display); font-size: 0.95rem; font-variation-settings: "wdth" 95; line-height: 1.5;
}
.colophon-name { font-weight: 760; font-size: 1.1rem; color: var(--red); }
.colophon-note { color: var(--ink-soft); }
.colophon a { text-decoration: none; }
.colophon a:hover { text-decoration: underline; }
@media (max-width: 48em) { .colophon-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34em) { .colophon-grid { grid-template-columns: 1fr; } }

/* ---------- inner pages ---------- */
.page-title { max-width: var(--page); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--gutter) 0; }
.page-title .lede { margin-top: 1.25rem; }
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(2rem, 4vw, 3.5rem) 0; border-top: 1px solid var(--steel-light); }
.case:first-of-type { border-top: 0; padding-top: 0; }
.case figure { margin: 0; }
.case img { width: 100%; }
.case figcaption { margin-top: 0.6rem; }
.case-alt figure { order: 2; }
.case h3 { margin-bottom: 0.6rem; }
.case .meta { margin-bottom: 1rem; }
@media (max-width: 48em) { .case { grid-template-columns: 1fr; } .case-alt figure { order: 0; } }

.spec { width: 100%; font-family: var(--display); margin-top: 1rem; }
.spec th { text-align: left; font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); font-variation-settings: "wdth" 88; padding: 0 1rem 0.6rem 0; border-bottom: 2px solid var(--ink); }
.spec td { padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--steel-light); vertical-align: top; }
.spec td:first-child { font-weight: 650; white-space: nowrap; }

.materials { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2.5rem var(--gutter); margin-top: 2.5rem; }
.materials h3 { border-top: 2px solid var(--ink); padding-top: 0.6rem; margin-bottom: 0.75rem; }
.materials ul { list-style: none; }
.materials li { padding: 0.45rem 0; border-top: 1px solid var(--steel-light); font-family: var(--display); font-variation-settings: "wdth" 96; display: flex; justify-content: space-between; gap: 1rem; }
.materials li span { color: var(--ink-soft); text-align: right; font-size: 0.95rem; font-variation-settings: "wdth" 90; }

.machines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); align-items: end; margin-top: 2.5rem; }
.machines figure { margin: 0; }
.machines img { max-height: 16rem; width: auto; margin: 0 auto; }
.machines figcaption { margin-top: 0.75rem; }
@media (max-width: 48em) { .machines { grid-template-columns: 1fr; } .machines img { margin: 0; } }

.notice {
  max-width: var(--measure);
  font-family: var(--display); font-variation-settings: "wdth" 96; font-size: 1rem;
  border-left: 3px solid var(--red); padding-left: 1rem; color: var(--ink-soft);
}
