/*
 * ATCORP main stylesheet.
 * Sizes use calc(N * var(--u)) where N is the pixel value in the 1512px Figma frame.
 * Type sizes use max(minimum, design size) so text stays readable on smaller screens.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: max(16px, calc(20 * var(--u)));
  line-height: 1.85;
  letter-spacing: var(--tracking);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--red); color: #fff; padding: 8px 16px; }
.skip-link:focus { left: 16px; top: 16px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

main, .site-header, .site-footer { max-width: calc(1512 * var(--u)); margin-inline: auto; }
@media (min-width: 1513px) { main, .site-header { max-width: 1512px; } }

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  margin-inline: calc(33 * var(--u));
}
.rounded { border-radius: var(--radius); }

.h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: max(30px, calc(45 * var(--u)));
  line-height: 1.355;
  color: var(--ink-heading);
}
.prose p + p { margin-top: 1.85em; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(50 * var(--u)); min-height: 40px;
  padding: 0 calc(32 * var(--u));
  min-width: calc(166 * var(--u));
  border: 0; border-radius: var(--radius-btn);
  font-family: var(--font-body); font-size: max(15px, calc(18 * var(--u)));
  line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.btn--red { background: var(--red); color: var(--page); }
.btn--red:hover { background: #CF2F3A; }
.btn--dark { background: var(--dark-btn); color: var(--page); }
.btn--dark:hover { background: #1B1F26; }

.link-red, .link-dark {
  font-size: max(18px, calc(24 * var(--u)));
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.link-red { color: var(--red); }
.link-dark { color: var(--ink); }
.link-red:hover, .link-dark:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */
.site-header, .site-menu__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(48 * var(--u)) calc(52 * var(--u)) calc(47 * var(--u)) calc(55 * var(--u));
}
.site-header__logo img { width: calc(211 * var(--u)); min-width: 120px; }
.site-header__actions { display: flex; align-items: center; gap: calc(61 * var(--u)); }
.menu-toggle, .menu-close {
  display: inline-flex; align-items: center; gap: calc(15 * var(--u));
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font-size: max(15px, calc(18 * var(--u)));
}
.menu-toggle__bars { position: relative; width: calc(28 * var(--u)); min-width: 22px; height: 7px; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
}
.menu-toggle__bars::before { top: 0; }
.menu-toggle__bars::after { bottom: 0; }

/* Full screen menu (Figma "MacBook Pro 14 - 2", warm grey) */
.site-menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--warm-grey); color: var(--ink-navy);
  overflow-y: auto;
  display: flex; flex-direction: column;
  animation: menu-in .25s ease;
}
.site-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
.site-menu__top { width: 100%; max-width: calc(1512 * var(--u)); margin-inline: auto; }
.menu-close { color: var(--page); font-size: max(14px, calc(16 * var(--u))); }
.menu-close span { font-size: 1.5em; line-height: 1; }
.site-menu__nav, .site-menu__legal {
  width: 100%; max-width: calc(1512 * var(--u)); margin-inline: auto;
  padding-inline: calc(75 * var(--u));
}
.site-menu__nav { padding-top: calc(40 * var(--u)); }
.site-menu__nav a {
  display: inline-block; text-decoration: none;
  font-size: max(36px, calc(84 * var(--u))); line-height: 1.1; letter-spacing: 0;
}
.site-menu__nav .plus { margin-left: .2em; transition: color .2s ease; }
.site-menu__nav a:hover .plus, .site-menu__nav a:focus-visible .plus { color: var(--red); }
.site-menu__legal {
  display: flex; gap: calc(136 * var(--u)) ; flex-wrap: wrap;
  padding-top: calc(70 * var(--u)); padding-bottom: 48px;
  font-size: max(17px, calc(22 * var(--u)));
}
.site-menu__legal a { text-decoration: none; }
.site-menu__legal a.is-underlined { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: calc(652 * var(--u)) calc(751 * var(--u));
  padding: calc(40 * var(--u)) 0 calc(47 * var(--u));
  background: linear-gradient(180deg, var(--off-white) 0%, var(--panel) 100%);
  scroll-margin-top: 20px;
}
.hero__intro { padding: calc(55 * var(--u)) 0 0 calc(107 * var(--u)); }
.hero__title {
  font-family: var(--font-heading); font-weight: 500;
  font-size: max(34px, calc(45 * var(--u))); line-height: 1.267;
  color: var(--ink-heading);
}
.hero__sub { margin-top: calc(22 * var(--u)); font-size: max(17px, calc(20 * var(--u))); line-height: 1.65; }
.hero__img { margin-top: calc(53 * var(--u)); width: calc(442 * var(--u)); }

.call-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-end) 100%);
  border-radius: var(--radius);
  padding: calc(55 * var(--u)) calc(60 * var(--u)) calc(53 * var(--u)) calc(67 * var(--u));
}
.call-card__title {
  font-family: var(--font-body); font-weight: 500;
  font-size: max(22px, calc(27 * var(--u))); line-height: calc(57 * var(--u));
  text-transform: uppercase; color: var(--ink);
}
.form-note { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-btn); font-size: 16px; line-height: 1.5; }
.form-note--ok { background: #fff; border-left: 4px solid #2E7D4F; }
.form-note--error { background: #fff; border-left: 4px solid var(--red); }
.call-form { margin-top: calc(3 * var(--u)); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: calc(44 * var(--u)); }
.field { display: block; height: calc(84 * var(--u)); min-height: 60px; position: relative; }
.field input, .field textarea {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; border: 0; border-bottom: 1.5px solid var(--warm-grey); border-radius: 0;
  background: transparent; outline: none;
  padding: 0 calc(7 * var(--u)) calc(20 * var(--u));
  font: inherit; font-size: max(16px, calc(18 * var(--u))); line-height: 1.4; color: var(--ink);
  resize: none; overflow: hidden;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); opacity: 1; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--red); }
.field .is-invalid, .field input.is-invalid, .field textarea.is-invalid { border-bottom-color: var(--red); }
.check {
  display: flex; align-items: center; gap: calc(11 * var(--u));
  margin-top: calc(35 * var(--u)); padding-left: calc(7 * var(--u));
  font-size: max(12px, calc(13 * var(--u))); font-weight: 500; cursor: pointer;
}
.check span { opacity: .61; }
.check input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: calc(17 * var(--u)); height: calc(17 * var(--u)); min-width: 16px; min-height: 16px;
  background: #fff; border-radius: 2px; border: 1px solid transparent; cursor: pointer; display: grid; place-content: center;
}
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--red); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input.is-invalid { border-color: var(--red); }
.btn--submit { margin-top: calc(39 * var(--u)); margin-left: calc(7 * var(--u)); min-width: calc(180 * var(--u)); height: calc(51 * var(--u)); }

/* ---------- Features ---------- */
.features { padding: calc(105 * var(--u)) 0 calc(155 * var(--u)); }
.features__list {
  display: grid;
  grid-template-columns: calc(292 * var(--u)) calc(251 * var(--u)) calc(245 * var(--u)) calc(237 * var(--u)) calc(234 * var(--u));
  margin-left: calc(115 * var(--u));
}
.feature { display: grid; grid-template-rows: calc(160 * var(--u)) auto; row-gap: calc(42 * var(--u)); justify-items: center; }
.feature img { align-self: center; width: auto; height: auto; max-height: calc(150 * var(--u)); }
.feature:nth-child(1) img { width: calc(180 * var(--u)); }
.feature:nth-child(2) img { width: calc(127 * var(--u)); }
.feature:nth-child(3) img { width: calc(102 * var(--u)); }
.feature:nth-child(4) img { width: calc(132 * var(--u)); }
.feature:nth-child(5) img { width: calc(105 * var(--u)); }
.feature span {
  width: 100%; text-align: center; text-transform: uppercase; color: var(--ink-navy);
  font-size: max(14px, calc(20 * var(--u))); font-weight: 500; line-height: 1.75; letter-spacing: .05em;
  padding: calc(8 * var(--u)) 0 calc(14 * var(--u));
}
.feature span { max-width: calc(200 * var(--u)); margin-inline: auto; }
.feature:first-child span { max-width: calc(170 * var(--u)); }
.feature + .feature { position: relative; }
.feature + .feature::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: calc(92 * var(--u)); width: 1.5px; background: var(--rule);
}

/* ---------- Split sections ---------- */
.split { display: grid; align-items: start; }
.split--expertise {
  grid-template-columns: calc(500 * var(--u)) calc(515 * var(--u));
  column-gap: calc(75 * var(--u));
  padding: 0 0 calc(110 * var(--u)) calc(210 * var(--u));
}
.split--expertise .split__media { width: 100%; aspect-ratio: 500 / 554; object-fit: cover; }
.split--expertise .split__text { padding-top: calc(11 * var(--u)); }

.split--company {
  grid-template-columns: calc(505 * var(--u)) 1fr;
  align-items: center;
  padding: calc(110 * var(--u)) 0 calc(140 * var(--u)) calc(210 * var(--u));
}
.split--company .split__logo { display: flex; justify-content: center; padding-left: calc(70 * var(--u)); }
.split--company .split__logo img { width: calc(318 * var(--u)); }

/* ---------- Product range accordion ---------- */
.ranges { padding: calc(76 * var(--u)) calc(137 * var(--u)) calc(94 * var(--u)) calc(136 * var(--u)); }
.acc-item:not(:last-child) { border-bottom: 2px solid var(--red); }
.acc-item__head button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  height: calc(90 * var(--u)); min-height: 64px;
  padding: 0 calc(32 * var(--u)) 0 calc(30 * var(--u));
  background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-heading); font-weight: 600;
  font-size: max(22px, calc(30 * var(--u))); line-height: 1.3; color: var(--ink);
}
.acc-icon { position: relative; width: calc(32 * var(--u)); height: calc(32 * var(--u)); min-width: 22px; min-height: 22px; }
.acc-icon::before, .acc-icon::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px;
  background: var(--icon-grey); transition: transform .25s ease;
}
.acc-icon::after { transform: rotate(90deg); }
.acc-item.is-open .acc-icon { width: calc(22 * var(--u)); min-width: 16px; margin-right: calc(-1 * var(--u)); }
.acc-item.is-open .acc-icon::after { transform: rotate(0deg); }
.acc-item__body { overflow: hidden; }
.acc-item__inner {
  display: grid; grid-template-columns: 1fr calc(448 * var(--u)); column-gap: calc(40 * var(--u));
  padding: calc(26 * var(--u)) calc(44 * var(--u)) calc(108 * var(--u)) 0;
}
.acc-item__inner > img { margin-top: calc(62 * var(--u)); width: auto; max-width: 100%; max-height: calc(330 * var(--u)); justify-self: center; }
.acc-links { display: flex; gap: calc(46 * var(--u)); padding-left: calc(30 * var(--u)); line-height: 1.625; }
.dot-list { margin-top: calc(50 * var(--u)); padding-left: calc(31 * var(--u)); }
.dot-list li { position: relative; font-size: max(16px, calc(20 * var(--u))); line-height: 2.3; }
.dot-list li::before { content: ""; position: absolute; left: calc(-17 * var(--u)); top: 1.15em; width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; transform: translate(-50%, -50%); }

/* ---------- Industries ---------- */
.industries {
  display: grid; grid-template-columns: calc(485 * var(--u)) 1fr; align-items: start;
  padding: calc(87 * var(--u)) 0 0 calc(156 * var(--u));
  overflow: hidden;
}
.industries__intro { padding-top: calc(20 * var(--u)); }
.industries__intro p { margin-top: calc(42 * var(--u)); max-width: calc(390 * var(--u)); min-width: 260px; }
.industries__track-wrap { position: relative; }
.industries__track {
  display: flex; gap: calc(20 * var(--u));
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; outline-offset: 4px;
}
.industries__track::-webkit-scrollbar { display: none; }
.industry-card {
  position: relative; flex: 0 0 calc(351 * var(--u)); aspect-ratio: 1;
  overflow: hidden; scroll-snap-align: start; background: #222;
}
.industry-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.industry-card::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 100%); }
.industry-card:hover img { transform: scale(1.04); }
.industry-card span {
  position: absolute; left: calc(39 * var(--u)); bottom: calc(20 * var(--u)); z-index: 1;
  color: var(--page); font-size: max(16px, calc(22 * var(--u))); font-weight: 500;
}
.industries__next {
  position: absolute; top: 50%; left: calc(721 * var(--u)); transform: translate(-50%, -50%);
  width: calc(60 * var(--u)); height: calc(60 * var(--u)); min-width: 44px; min-height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(225, 221, 216, .85); color: #3A2A2C;
}
.industries__next:hover { background: var(--off-white); }

/* ---------- Clients ---------- */
.clients { padding: calc(135 * var(--u)) calc(113 * var(--u)) calc(140 * var(--u)) calc(114 * var(--u)); }
.clients__list { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.clients__list img { mix-blend-mode: multiply; }

/* ---------- Chicago Pneumatic ---------- */
.cp {
  display: grid; grid-template-columns: calc(595 * var(--u)) calc(440 * var(--u));
  column-gap: calc(101 * var(--u));
  padding: calc(80 * var(--u)) 0 calc(83 * var(--u)) calc(130 * var(--u));
}
.cp__media { aspect-ratio: 595 / 496; background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%); }
.cp__text { padding-top: calc(23 * var(--u)); }
.cp__logo { width: calc(260 * var(--u)); min-width: 170px; margin-bottom: calc(65 * var(--u)); }

/* ---------- Wide photo & service ---------- */
.wide-photo { padding: 0 calc(40 * var(--u)); }
.wide-photo img { width: 100%; aspect-ratio: 1432 / 600; object-fit: cover; }
.service {
  display: grid; grid-template-columns: calc(653 * var(--u)) calc(475 * var(--u));
  padding: calc(127 * var(--u)) 0 calc(121 * var(--u)) calc(210 * var(--u));
}
.service .h2 { margin-top: calc(-4 * var(--u)); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  min-height: calc(158 * var(--u));
  padding: 28px calc(90 * var(--u)) 28px calc(104 * var(--u));
  background: var(--red); color: var(--page);
  max-width: none;
}
.site-footer__logo img { width: calc(211 * var(--u)); min-width: 120px; }
.site-footer__nav { display: flex; gap: calc(59 * var(--u)); flex-wrap: wrap; font-size: max(16px, calc(22 * var(--u))); }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 900px) {
  body { line-height: 1.7; }
  .site-header, .site-menu__top { padding: 20px 16px; }
  .site-header__actions { gap: 18px; }
  .site-header .btn { padding: 0 16px; min-width: 0; }

  .panel { margin-inline: 12px; }
  .hero { grid-template-columns: 1fr; padding: 28px 16px 16px; gap: 28px; }
  .hero__intro { padding: 0 8px; }
  .hero__sub { margin-top: 12px; }
  .hero__img { width: 100%; max-width: 440px; margin-top: 28px; }
  .call-card { padding: 28px 20px 28px; }
  .call-card__title { line-height: 1.4; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field { min-height: 64px; }
  .check { margin-top: 24px; gap: 10px; }
  .btn--submit { margin-top: 24px; min-width: 160px; height: 48px; }

  .features { padding: 64px 16px 56px; }
  .features__list { grid-template-columns: repeat(2, 1fr); margin: 0; row-gap: 36px; }
  .feature { grid-template-rows: 110px auto; row-gap: 16px; }
  .feature img { max-height: 100px; }
  .feature:nth-child(1) img { width: 130px; }
  .feature:nth-child(2) img { width: 92px; }
  .feature:nth-child(3) img { width: 76px; }
  .feature:nth-child(4) img { width: 98px; }
  .feature:nth-child(5) img { width: 78px; }
  .feature span, .feature:first-child span { max-width: 190px; padding: 0 8px; }
  .feature + .feature::before { display: none; }
  .feature:last-child { grid-column: 1 / -1; }

  .split--expertise, .split--company, .service, .cp { grid-template-columns: 1fr; padding: 0 16px 64px; row-gap: 28px; }
  .split--company { padding-top: 64px; }
  .split--company .split__logo { padding: 0; }
  .split--company .split__logo img { width: 220px; }
  .cp { padding: 20px 16px 32px; }
  .cp__logo { margin-bottom: 24px; }

  .ranges { padding: 24px 16px 32px; }
  .acc-item__head button { padding: 0 8px; }
  .acc-item__inner { grid-template-columns: 1fr; padding: 16px 0 40px; row-gap: 24px; }
  .acc-item__inner > img { margin-top: 0; max-width: min(100%, 420px); max-height: 300px; justify-self: start; }
  .acc-links { padding-left: 8px; gap: 28px; }
  .dot-list { margin-top: 20px; padding-left: 26px; }
  .dot-list li { line-height: 1.6; padding: 6px 0; }
  .dot-list li::before { left: -14px; }

  .industries { grid-template-columns: 1fr; padding: 64px 0 0 16px; row-gap: 28px; }
  .industries__intro { padding: 0 16px 0 0; }
  .industries__intro p { margin-top: 16px; max-width: none; }
  .industry-card { flex-basis: 72%; }
  .industries__next { left: auto; right: 12px; }

  .clients { padding: 56px 16px; }
  .clients__list { flex-wrap: wrap; justify-content: center; gap: 28px 36px; }
  .clients__list img { width: auto !important; height: auto; max-height: 60px; max-width: 120px; }

  .wide-photo { padding: 0 12px; }
  .service { padding: 64px 16px; }

  .site-footer { padding: 32px 16px; flex-direction: column; align-items: flex-start; }
  .site-footer__nav { gap: 12px 28px; }

  .site-menu__nav, .site-menu__legal { padding-inline: 16px; }
  .site-menu__nav { padding-top: 24px; }
  .site-menu__legal { gap: 32px; padding-top: 40px; }
}

@media (max-width: 420px) {
  .site-header .btn { height: 40px; font-size: 14px; }
  .menu-toggle > span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
