/* Iowa Tool & Manufacturing — "the well-kept board": square tiles, 8px gaps, one face (Jost). */
:root {
  --bg: #e3e7e6;
  --paper: #f4f6f5;
  --tile: #d3d9d7;
  --ink: #0d1b1e;
  --muted: #3a4a4d;
  --deep: #0b2d33;
  --deep2: #103a42;
  --teal: #11686a;
  --teal-2: #1b7b7d;
  --teal-lite: #dfeeed;
  --accent: #f2c22e;
  --accent-hover: #e2b11c;
  --on-dark: #eaf4f3;
  --on-dark-soft: #bcd6d4;

  --gap: 8px;
  --m: 16px;
  --sec: 128px;

  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(96px, 12.5vw, 190px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body) / 1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; transition: text-underline-offset 0.2s var(--ease), color 0.2s; }
a:hover { text-underline-offset: 0.3em; }
h1, h2, h3 { margin: 0; font-weight: 700; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.h-dark :focus-visible, .s-rows :focus-visible, .t-head :focus-visible, .e-num :focus-visible,
.a-visit :focus-visible, .contact :focus-visible, .foot :focus-visible { outline-color: #fff; }
::selection { background: var(--accent); color: var(--ink); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display { font-size: var(--step-display); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.head { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.03em; }
.lead { font-size: var(--step-lead); line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }

.tile { padding: 22px; min-width: 0; }
.tile img, .mod img, .sp img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter 0.5s var(--ease), transform 0.6s var(--ease); }
.tile:hover img, .mod:hover img, .mod figure:hover img { filter: grayscale(0) contrast(1); } /* taste-skill-ignore: grayscale filter, not a scale transform */
.ph { width: 100%; height: 100%; min-height: 120px; background: var(--tile); }

.btn {
  display: inline-block; background: var(--accent); color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 16px 22px; transition: background 0.2s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.text-link { font-weight: 500; }

/* ---------- top row ---------- */
.top { display: grid; grid-template-columns: 60px 1fr auto; gap: var(--gap); height: 60px; margin: var(--m) var(--m) var(--gap); }
.t-logo { background: var(--deep); display: grid; place-items: center; transition: background 0.2s; }
.t-logo:hover { background: var(--teal); }
.t-logo svg { width: 30px; height: 30px; fill: var(--teal-lite); }
.t-nav { background: var(--tile); display: flex; align-items: center; gap: 28px; padding-left: calc(50vw - 92px); font-weight: 500; min-width: 0; overflow: hidden; }
.t-nav a { text-decoration: none; }
.t-nav a:hover { text-decoration: underline; }
.t-menu { display: none; }
.t-act { background: var(--accent); color: var(--ink); display: flex; align-items: center; padding: 0 22px; font-weight: 500; text-decoration: none; transition: background 0.2s; }
.t-act:hover { background: var(--accent-hover); }

/* ---------- hero: two-by-two board ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--gap); margin: 0 var(--m);
  height: calc(100svh - 60px - var(--m) * 2 - var(--gap)); min-height: 560px; max-height: 1000px;
}
.h-name { background: var(--paper); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.h-tag { margin-top: 16px; font-weight: 500; color: var(--muted); }
.h-photo { padding: 0; overflow: hidden; background: var(--tile); }
.h-p1 { grid-column: 2; grid-row: 1; }
.h-p2 { grid-column: 1; grid-row: 2; }
.h-pair { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.h-dark { background: var(--deep); color: var(--on-dark); }
.h-accent { background: var(--accent); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.h-call { font-weight: 500; font-size: var(--step-body); }
.shutter img { animation: shutter 1.1s var(--ease) 0.15s both; }
@keyframes shutter { from { clip-path: inset(0 0 0 100%); transform: scale(1.12); } to { clip-path: inset(0 0 0 0); transform: scale(1); } }

/* ---------- services: statement cell + dark rows ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; margin: var(--sec) var(--m) 0; min-height: 90svh; }
.s-light { background: var(--paper); padding: 40px 32px 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.zig span { display: block; }
.zig .z2 { text-align: right; }
.s-foot { display: grid; grid-template-columns: minmax(0, 32ch) auto; justify-content: space-between; align-items: end; gap: 24px; }
.s-rows { background: var(--deep); color: var(--on-dark); display: grid; grid-auto-rows: 1fr; }
.srow { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 24px; padding: 28px; align-items: start; }
.srow:nth-child(even) { background: var(--deep2); }
.srow h3 { color: #fff; }
.terms { list-style: none; margin: 0; padding: 0; color: var(--on-dark-soft); font-size: var(--step-small); line-height: 1.6; }

/* ---------- industries board ---------- */
.board { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 92px; grid-auto-flow: dense; gap: var(--gap); margin: var(--sec) var(--m) 0; }
.board > .tile { grid-column: span 3; grid-row: span 2; }
.board > .t-head { grid-column: span 6; background: var(--teal); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.t-ind.is-paper { background: var(--paper); }
.t-ind.is-tile { background: var(--tile); }
.t-fact { background: var(--deep); color: var(--on-dark); display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; }
.t-fact .big { font-size: var(--step-head); line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: #fff; }
.t-photo { padding: 0; overflow: hidden; background: var(--tile); }
.t-since { background: var(--teal-2); color: #fff; }
.t-action { background: var(--accent); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; transition: background 0.2s; }
.t-action:hover { background: var(--accent-hover); }
.t-action .num { font-weight: 500; white-space: nowrap; }

/* ---------- equipment: giant word + filled bars ---------- */
.equip { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); margin: var(--sec) var(--m) 0; }
.e-col { container-type: inline-size; padding: 0 0 8px; }
.giant { font-size: 16.4cqw; line-height: 0.8; letter-spacing: -0.03em; text-transform: uppercase; margin: 0 0 20px -0.04em; }
.e-intro { color: var(--muted); margin: 0 0 20px; font-weight: 500; }
.bar { background: var(--tile); margin-top: 6px; }
.bar summary { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-weight: 500; cursor: pointer; list-style: none; transition: background 0.2s; }
.bar summary::-webkit-details-marker { display: none; }
.bar summary:hover { background: #c8cfcd; }
.plus::before { content: "+"; font-size: 1.5em; line-height: 1; display: inline-block; transition: transform 0.25s var(--ease); }
.bar[open] .plus::before { transform: rotate(45deg); }
.bar ul { list-style: none; margin: 0; padding: 4px 18px 18px; }
.bar li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.spec { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.e-side { display: grid; grid-template-rows: 1fr auto 1fr; gap: var(--gap); }
.e-num { background: var(--deep); color: var(--on-dark); display: flex; flex-direction: column; gap: 10px; }
.e-num .head { color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.e-side .t-photo { min-height: 210px; }

/* ---------- about ---------- */
.about { margin: var(--sec) var(--m) 0; }
.about > .head { margin-bottom: 24px; }
.a-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.a-team { grid-column: span 8; padding: 0; background: var(--teal); overflow: hidden; min-height: 320px; }
.a-team img { mix-blend-mode: multiply; filter: grayscale(1) contrast(1.15); }
.a-team:hover img { filter: grayscale(1) contrast(1.15); }
.a-text { grid-column: span 4; background: var(--paper); display: flex; flex-direction: column; gap: 14px; }
.a-visit { grid-column: span 7; background: var(--deep); color: var(--on-dark); min-height: 200px; }
.a-where { grid-column: span 5; background: var(--tile); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }

/* ---------- gallery: drag row ---------- */
.gallery { margin-top: var(--sec); }
.g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 var(--m) 24px; }
.g-count { color: var(--muted); font-weight: 500; }
.g-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 0 var(--m) 4px; scrollbar-width: none; cursor: grab; }
.g-row::-webkit-scrollbar { display: none; }
.g-row.dragging { cursor: grabbing; scroll-snap-type: none; }
.mod { flex: 0 0 auto; height: 340px; scroll-snap-align: start; overflow: hidden; background: var(--tile); }
.mod-wide { aspect-ratio: 16 / 10; }
.mod-pair { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; width: calc((340px - 12px) / 2 * 4 / 3); background: none; }
.mod-pair figure { overflow: hidden; background: var(--tile); }
.mod img { -webkit-user-drag: none; user-select: none; }

/* ---------- contact: photo strip + quote form ---------- */
.contact { margin: var(--sec) var(--m) 0; background: var(--teal); color: #fff; overflow: hidden; padding-bottom: 48px; }
.strip { margin-top: 48px; overflow: hidden; }
.strip-track { display: flex; gap: 8px; width: max-content; animation: drift 70s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.sp { height: 150px; overflow: hidden; background: var(--teal-2); }
.sp-0 { aspect-ratio: 3 / 4; }
.sp-1 { aspect-ratio: 1; }
.sp-2 { aspect-ratio: 3 / 2; }
@keyframes drift { to { transform: translateX(-50%); } }
.c-inner { padding: 72px 32px 0; }
.c-intro { margin-top: 16px; max-width: 52ch; color: var(--on-dark); }
.quote { margin-top: 40px; }
.quote fieldset { border: 0; margin: 0; padding: 0; }
.quote legend { font-weight: 500; margin-bottom: 12px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: block; padding: 14px 18px; background: var(--teal-2); font-weight: 500; transition: background 0.2s, transform 0.15s var(--ease); }
.chip:hover span { background: #238a8c; }
.chip input:checked + span { background: var(--accent); color: var(--ink); }
.chip input:active + span { transform: scale(0.97); }
.chip input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.cell { background: var(--teal-2); display: flex; flex-direction: column; justify-content: center; padding: 12px 18px; transition: background 0.2s; }
.cell > span { font-size: var(--step-small); color: var(--on-dark); font-weight: 500; }
.cell:focus-within { background: var(--teal-lite); color: var(--ink); }
.cell:focus-within > span { color: var(--muted); }
.cell input, .cell select { background: transparent; border: 0; color: inherit; font: 400 var(--step-body)/1.4 var(--font); padding: 6px 0; width: 100%; outline: none; }
.cell select option { color: var(--ink); }
.cell input::placeholder { color: var(--on-dark-soft); }
.cell:focus-within input::placeholder { color: var(--muted); }
.cell-wide { margin-top: var(--gap); }
.q-sum { margin: 20px 0 12px; font-weight: 500; min-height: 1.5em; }
.q-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gap); height: 96px; }
.q-bar input { text-align: center; }
.q-send { background: var(--accent); color: var(--ink); border: 0; font: 500 var(--step-lead) var(--font); cursor: pointer; justify-content: center; transition: background 0.2s, transform 0.15s var(--ease); }
.q-send:hover { background: var(--accent-hover); }
.q-send:active { transform: scale(0.98); }
.q-send[disabled] { opacity: 0.7; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: off-screen spam trap, not a visible rule */
.q-err { margin-top: 12px; background: var(--deep); padding: 14px 18px; font-weight: 500; }
.c-thanks { margin-top: 40px; background: var(--deep); padding: 28px; }
.c-lines { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--gap); }
.c-lines li { background: var(--teal-2); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.c-lines li > span:first-child { font-size: var(--step-small); color: var(--on-dark); font-weight: 500; }
.c-lines a { color: #fff; font-weight: 500; }

/* ---------- footer: the mark, built large ---------- */
.foot { margin: 96px var(--m) var(--m); background: var(--deep); color: var(--on-dark); padding: 40px 24px 24px; }
.mark { display: flex; gap: 4px; align-items: flex-end; height: 26svh; min-height: 170px; }
.blk { flex: 1; display: flex; align-items: flex-end; padding: 0 0 0 0.06em; color: var(--deep); font-weight: 700; text-transform: uppercase; line-height: 0.78; font-size: min(11vw, 19svh); overflow: hidden; transition: transform 0.4s var(--ease); }
.blk:hover { transform: translateY(-6px); }
.blk.w-gap { margin-left: clamp(16px, 3vw, 48px); }
.c-teal { background: var(--teal); }
.c-paper { background: var(--paper); }
.c-tile { background: var(--tile); }
.c-accent { background: var(--accent); }
.h-100 { height: 100%; } .h-96 { height: 96%; } .h-94 { height: 94%; } .h-90 { height: 90%; } .h-88 { height: 88%; } .h-84 { height: 84%; }
.h-78 { height: 78%; } .h-76 { height: 76%; } .h-72 { height: 72%; } .h-70 { height: 70%; } .h-66 { height: 66%; }
.f-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 24px; margin-top: 56px; }
.f-links { display: grid; grid-template-columns: repeat(3, max-content); gap: 10px 40px; }
.f-links a { color: var(--on-dark); text-decoration: none; }
.f-links a:hover { text-decoration: underline; }
.f-contact { display: flex; flex-direction: column; gap: 12px; }
.f-contact a { color: #fff; }
.f-last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; font-size: var(--step-small); }
.f-last a { color: var(--on-dark); }
.btn-small { padding: 10px 14px; background: var(--tile); color: var(--ink) !important; text-decoration: none; }
.btn-small:hover { background: var(--paper); }

/* ---------- entrances (site.js only hides what is still below the fold) ---------- */
.pre { opacity: 0; transform: translateY(24px); }
.rise { transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .srow { grid-template-columns: 1fr 1fr; }
  .srow .terms { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 4px; }
  .srow .terms li:not(:last-child)::after { content: ","; }
  .board > .tile { grid-column: span 4; }
  .board > .t-head { grid-column: span 8; }
  .equip { grid-template-columns: 1fr; }
  .e-side { margin-top: 40px; }
  .t-nav { padding-left: 24px; gap: 20px; }
  .e-side { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: none; }
  .e-side .t-photo { min-height: 180px; }
}

/* ---------- phone: its own board ---------- */
@media (max-width: 760px) {
  :root { --gap: 6px; --m: 16px; --sec: 72px; }
  .top { grid-template-columns: 60px 1fr 1fr; }
  .t-nav { display: none; }
  .t-menu { display: block; position: relative; background: var(--tile); }
  .t-menu summary { height: 60px; display: flex; align-items: center; padding: 0 18px; font-weight: 500; cursor: pointer; list-style: none; }
  .t-menu summary::-webkit-details-marker { display: none; }
  .t-menu nav { position: absolute; top: 66px; left: 0; width: calc(100vw - 32px - 66px); display: grid; gap: 6px; z-index: 5; }
  .t-menu nav a { background: var(--deep); color: #fff; padding: 16px 18px; text-decoration: none; font-weight: 500; }
  .t-act { padding: 0 16px; justify-content: center; text-align: center; line-height: 1.15; }
  .hero { display: grid; grid-template-columns: 1fr; grid-template-rows: none; height: auto; min-height: 0; max-height: none; }
  .h-name { min-height: 30svh; }
  .h-name .display { font-size: 22vw; }
  .h-p1 { grid-column: 1; grid-row: auto; order: 1; aspect-ratio: 4 / 3; }
  .h-pair { grid-column: 1; grid-row: auto; order: 2; }
  .h-pair .tile { min-height: 170px; padding: 16px; }
  .h-p2 { grid-column: 1; grid-row: auto; order: 3; aspect-ratio: 4 / 3; }
  .services { grid-template-columns: 1fr; min-height: 0; }
  .s-light { min-height: 0; padding: 28px 20px 24px; }
  .s-foot { grid-template-columns: 1fr; justify-items: start; }
  .srow { grid-template-columns: 1fr; gap: 10px; padding: 22px 20px; }
  .board { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .board > .tile { grid-column: span 1; grid-row: span 1; aspect-ratio: 1; padding: 16px; }
  .board > .t-head { grid-column: span 2; aspect-ratio: auto; min-height: 200px; }
  .board > .t-photo { padding: 0; }
  .e-side { grid-template-columns: 1fr; }
  .e-side .t-photo { aspect-ratio: 16 / 9; min-height: 0; }
  .a-grid > .tile { grid-column: 1 / -1; }
  .a-team { min-height: 0; aspect-ratio: 486 / 159; }
  .g-row { padding: 0 var(--m) 4px; }
  .mod { height: 240px; }
  .mod-pair { width: calc((240px - 12px) / 2 * 4 / 3); }
  .strip { margin-top: 28px; }
  .sp { height: 110px; }
  .c-inner { padding: 44px 18px 0; }
  .q-row { grid-template-columns: 1fr; }
  .q-bar { grid-template-columns: 1fr; height: auto; }
  .q-bar .cell { min-height: 60px; }
  .q-bar input { text-align: left; }
  .foot { padding: 28px 16px 18px; }
  .mark { height: 18svh; min-height: 110px; }
  .foot { margin-top: 64px; }
  .blk { font-size: min(10.5vw, 18svh); }
  .f-grid { grid-template-columns: 1fr; }
  .f-links { grid-template-columns: repeat(2, max-content); gap: 10px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shutter img { animation: none; }
  .strip-track { animation: none; }
  .strip { overflow-x: auto; }
  .pre { opacity: 1; transform: none; }
  .rise, .tile img, .mod img, .blk, .btn, .chip span { transition: none; }
}
