/* Youngstown Plastic Tooling & Machinery - site styles */
:root {
  --white: #ffffff;
  --panel: #eef1f5;
  --rule: #d5dbe3;
  --navy: #1c3c7b;
  --navy-deep: #12244a;
  --steel: #556173;
  --ink: #141c2b;
  --focus: #f2b705;

  --wide: "wdth" 118;
  --font: "Archivo", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 {
  font-variation-settings: var(--wide);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--navy-deep);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--white); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.header-row { min-width: 0; display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { flex-shrink: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy-deep); margin-right: auto; }
.brand img { width: 48px; height: 48px; }
.brand span { font-variation-settings: "wdth" 112; font-weight: 700; font-size: 1rem; line-height: 1.15; width: 12.5em; }
.brand .short { display: none; }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 2px; }
.nav a, .nav .sub-toggle { white-space: nowrap; }
.nav a, .nav .sub-toggle {
  display: block; padding: 10px 10px; text-decoration: none;
  color: var(--ink); font: inherit; font-size: 0.97rem; font-weight: 500;
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav .sub-toggle:hover { color: var(--navy); }
.nav a[aria-current="page"], .nav .is-current > .sub-toggle { color: var(--navy); box-shadow: inset 0 -3px 0 var(--navy); }
.has-sub { position: relative; }
.sub-toggle::after { content: ""; display: inline-block; margin-left: 6px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--navy);
  padding: 8px 0; display: none;
  box-shadow: 0 14px 30px -18px rgba(18, 36, 74, 0.45);
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu, .has-sub.open .submenu { display: block; }
.submenu a { padding: 8px 18px; }
.submenu .all { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 12px; font-weight: 600; }

.header-call { display: flex; align-items: center; gap: 16px; }
.header-call .phone { font-weight: 600; text-decoration: none; color: var(--navy-deep); white-space: nowrap; }
.menu-btn { display: none; }

.btn {
  display: inline-block; padding: 13px 22px; border: 2px solid var(--navy);
  background: var(--navy); color: var(--white); text-decoration: none;
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; line-height: 1.2; white-space: nowrap;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); }
.btn.small { padding: 9px 16px; font-size: 0.95rem; }

/* Livery stripe: the two-band pinstripe on YPTM machines */
.livery { display: flex; height: 48px; width: 100%; overflow: hidden; }
.livery .run { flex: 0 0 64%; background:
  linear-gradient(var(--navy), var(--navy)) 0 30px / 100% 10px no-repeat,
  linear-gradient(var(--navy), var(--navy)) 0 44px / 100% 4px no-repeat; }
.livery .run.high { flex: 1 1 auto; background:
  linear-gradient(var(--navy), var(--navy)) 0 0 / 100% 10px no-repeat,
  linear-gradient(var(--navy), var(--navy)) 0 14px / 100% 4px no-repeat; }
.livery svg { flex: 0 0 30px; width: 30px; height: 48px; fill: var(--navy); }
.livery.flip { transform: scaleX(-1); }

/* Hero */
.hero { padding-top: clamp(32px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-variation-settings: "wdth" 106; font-size: clamp(2.1rem, 3.8vw, 3rem); }
.hero-copy { padding-bottom: clamp(20px, 4vw, 48px); }
.hero-copy p { font-size: 1.2rem; color: var(--steel); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero .livery { margin-top: -24px; position: relative; }

.made { display: flex; flex-wrap: wrap; gap: 8px 40px; padding-top: 22px; color: var(--steel); font-size: 0.98rem; }
.made strong { color: var(--navy-deep); font-variation-settings: var(--wide); font-size: 1.15rem; margin-right: 6px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.panel { background: var(--panel); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.section-head p { color: var(--steel); margin: 0; }

.service { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding: 40px 0; border-top: 1px solid var(--rule); }
.section-head + .service { border-top: 0; padding-top: 0; }
.service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service.contain img { object-fit: contain; background: var(--white); }
.service .more { font-weight: 600; }

/* Machinery lineup */
.lineup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--rule); border: 2px solid var(--rule); }
.lineup a { display: flex; flex-direction: column; background: var(--white); text-decoration: none; color: var(--ink); padding: 20px 20px 22px; }
.lineup a:hover { background: #f7f9fc; }
.lineup a:hover h3 { color: var(--navy); }
.lineup .thumb { height: 170px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.lineup .thumb img { max-height: 170px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.lineup h3 { font-size: 1.12rem; margin-bottom: 6px; }
.lineup p { font-size: 0.95rem; color: var(--steel); margin: 0; }

/* Applications list */
.apps { columns: 2; column-gap: 48px; padding: 0; margin: 0; list-style: none; }
.apps li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--rule); }

.materials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.materials li { border: 1px solid var(--rule); background: var(--white); padding: 6px 12px; font-size: 0.95rem; }

/* Page header for inner pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); }
.page-head p { font-size: 1.15rem; color: var(--steel); }
.crumbs { font-size: 0.92rem; color: var(--steel); margin-bottom: 14px; }
.crumbs a { color: var(--steel); }

.split { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.split img { width: 100%; }
.split.rev { grid-template-columns: 5fr 7fr; }
.split img + img { margin-top: 16px; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }

/* Machine gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.gallery figure { margin: 0; background: var(--white); display: flex; flex-direction: column; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.gallery figcaption { margin-top: auto; }
.gallery button { all: unset; cursor: zoom-in; display: flex; align-items: center; justify-content: center; height: 240px; padding: 18px; }
.gallery button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.gallery img { max-height: 204px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.gallery figcaption { padding: 10px 16px 14px; font-size: 0.95rem; font-weight: 600; color: var(--navy-deep); border-top: 1px solid var(--rule); }

.siblings { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.siblings a { display: block; padding: 8px 14px; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.siblings a:hover { border-color: var(--navy); color: var(--navy); }
.siblings a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

dialog.viewer { border: 0; padding: 0; max-width: min(92vw, 960px); background: var(--white); }
dialog.viewer::backdrop { background: rgba(18, 36, 74, 0.82); }
dialog.viewer img { max-height: 78vh; width: auto; margin: 0 auto; padding: 24px; }
dialog.viewer .bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px 12px 24px; border-top: 1px solid var(--rule); font-weight: 600; color: var(--navy-deep); }

/* Quote band */
.quote-band { background: var(--navy-deep); color: #dfe6f2; }
.quote-band .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.quote-band h2 { color: var(--white); }
.quote-band p { margin: 0; }
.quote-band .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.quote-band .btn { background: var(--white); border-color: var(--white); color: var(--navy-deep); }
.quote-band .btn:hover { background: #dfe6f2; border-color: #dfe6f2; }
.quote-band .btn.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.quote-band .btn.ghost:hover { background: rgba(255,255,255,0.1); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
label .req { color: var(--steel); font-weight: 400; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #b7c0cc; padding: 11px 12px; border-radius: 0;
}
input:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--navy); }
textarea { min-height: 160px; resize: vertical; }
.form-note { font-size: 0.92rem; color: var(--steel); margin-top: 12px; }
.form-error { color: #a4161a; font-weight: 600; margin-top: 12px; }
.details { border-top: 4px solid var(--navy); background: var(--panel); padding: 28px; }
.details dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; }
.details dt { color: var(--steel); }
.details dd { margin: 0; font-weight: 600; }
.details address { font-style: normal; margin-bottom: 22px; }

/* Footer */
.site-footer { background: var(--white); padding-top: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 40px 0 28px; font-size: 0.97rem; }
.footer-grid h2 { font-size: 1rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 3px 0; }
.footer-grid address { font-style: normal; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--navy); text-decoration: underline; }
.legal { border-top: 1px solid var(--rule); padding: 18px 0 28px; font-size: 0.9rem; color: var(--steel); }

/* Responsive */
@media (max-width: 1400px) {
  .header-call .phone { display: none; }
}
@media (max-width: 1040px) {
  .lineup { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1200px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--rule); padding: 9px 14px; font: inherit; font-weight: 600; color: var(--navy-deep); cursor: pointer; }
  .header-call .btn { display: none; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--rule); max-height: calc(100vh - 76px); overflow-y: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 20px; gap: 0; }
  .nav a, .nav .sub-toggle { padding: 12px 0; width: 100%; text-align: left; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"], .nav .is-current > .sub-toggle { box-shadow: none; font-weight: 700; }
  .submenu { position: static; display: none; border: 0; box-shadow: none; padding: 0 0 0 16px; }
  .has-sub:hover .submenu, .has-sub:focus-within .submenu { display: none; }
  .has-sub.open .submenu { display: block; }
}
@media (max-width: 880px) {
  .hero-grid, .service, .split, .split.rev, .contact-grid, .quote-band .wrap { grid-template-columns: 1fr; }
  .hero .livery { margin-top: 0; }
  .quote-band .actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .apps { columns: 1; }
  .section-head { display: block; }
}
@media (max-width: 560px) {
  .lineup a { padding: 14px; }
  .lineup .thumb { height: 110px; }
  .lineup .thumb img { max-height: 110px; }
  .lineup p { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery button { height: 170px; padding: 12px; }
  .gallery img { max-height: 146px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand .long { display: none; }
  .brand .short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
