/* ==========================================================================
   components.css – reusable components (desktop ≥ 1200px)
   ========================================================================== */

/* ---------- Buttons – blue gradient pills ----------
   Every .btn: GOODWIN blue → navy gradient, white text, soft blue glow;
   hover lifts it a little and brightens the gradient.
   .btn--ghost: glass button for dark / photo backgrounds (hero).
   .btn__icon: arrow ↗ that nudges up-right on hover.                    */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: calc(12 * var(--u));
  padding: calc(14 * var(--u)) calc(34 * var(--u));
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7 0%, #004b98 100%);
  color: #fff;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  white-space: nowrap;
  isolation: isolate;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) calc(-10 * var(--u)) rgba(2, 132, 199, 0.85);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.35s, color 0.35s, border-color 0.35s;
}
/* brighter gradient faded in on hover */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.btn:hover, .btn:focus-visible {
  color: #fff;
  transform: translateY(calc(-2 * var(--u)));
  box-shadow: 0 calc(16 * var(--u)) calc(36 * var(--u)) calc(-12 * var(--u)) rgba(2, 132, 199, 0.95);
}
.btn:hover::before, .btn:focus-visible::before { opacity: 1; }
.btn:focus-visible { outline: 2px solid #22d3ee; outline-offset: 3px; }
.btn:active { transform: translateY(0); }
.btn__icon { flex: none; width: calc(18 * var(--u)); height: calc(18 * var(--u)); transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__icon, .btn:focus-visible .btn__icon { transform: translate(calc(3 * var(--u)), calc(-3 * var(--u))); }

/* variants keep their names (used across the site); both now share the gradient */
.btn--solid, .btn--outline { color: #fff; }
.site-header__cta.btn--solid {
  height: calc(60 * var(--u)); padding-block: 0;
  transition: height 0.5s var(--ease-out), transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
/* compact black header: shorter button (same width, colours and shape) */
html.header-scrolled .site-header__cta.btn--solid { height: max(36px, calc(46 * var(--u))); }

/* glass button for dark / photo backgrounds */
.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn--ghost::before { display: none; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: #fff; color: var(--c-navy-deep); box-shadow: inset 0 0 0 1px #fff, 0 calc(12 * var(--u)) calc(30 * var(--u)) calc(-14 * var(--u)) rgba(0, 0, 0, 0.5); }

/* ---------- Chevron (Figma fi_2089684 "Know More" arrow) ---------- */
.chevron {
  display: inline-block; flex: none;
  width: calc(16 * var(--u)); height: calc(16 * var(--u));
  background: currentColor;
  -webkit-mask: url("../assets/svg/chevron-small.svg") center / contain no-repeat;
          mask: url("../assets/svg/chevron-small.svg") center / contain no-repeat;
  transition: transform 0.45s var(--ease-out);
}

/* ---------- Text link "Know More" (Host Grotesk SemiBold 24/32, underline) ---------- */
.text-link {
  display: inline-flex; align-items: center; gap: calc(8 * var(--u));
  color: var(--c-blue);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: calc(24 * var(--u));
  line-height: calc(32 * var(--u));
  text-decoration: underline;
  text-underline-position: from-font;
  transition: color 0.4s var(--ease-out);
}
.text-link--light { color: #fff; }
a:hover .text-link .chevron, .text-link:hover .chevron { transform: translateX(calc(4 * var(--u))); }

/* ==========================================================================
   Mega menus (Figma about-us / manufacturing / products / locations / resources)
   ========================================================================== */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 1;
  height: calc(388 * var(--u));
  background: #fff;
  border-bottom: calc(8 * var(--u)) solid var(--c-blue);
}
.mega--products, .mega--locations { height: calc(408 * var(--u)); }
.mega[hidden] { display: none; }
/* navy corner triangles – 40 × 40 at (16,16) and bottom-right (16, 24) */
.mega::before, .mega::after {
  content: ""; position: absolute;
  width: calc(40 * var(--u)); height: calc(40 * var(--u)); background: var(--c-navy);
}
.mega::before { left: calc(16 * var(--u)); top: calc(16 * var(--u)); clip-path: polygon(0 0, 100% 0, 0 100%); }
.mega::after { right: calc(16 * var(--u)); bottom: calc(16 * var(--u)); clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* Morphing dropdown (js/navigation.js): one shell holds every panel and carries
   the white background, blue border and corner triangles, so switching menus
   only morphs its height while the panels slide inside it. */
.mega-shell {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 1;
  overflow: hidden;
  background: #fff;
  border-bottom: calc(8 * var(--u)) solid var(--c-blue);
}
.mega-shell[hidden] { display: none; }
.mega-shell::before, .mega-shell::after {
  content: ""; position: absolute; z-index: 3;
  width: calc(40 * var(--u)); height: calc(40 * var(--u)); background: var(--c-navy);
}
.mega-shell::before { left: calc(16 * var(--u)); top: calc(16 * var(--u)); clip-path: polygon(0 0, 100% 0, 0 100%); }
.mega-shell::after { right: calc(16 * var(--u)); bottom: calc(16 * var(--u)); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.mega-shell .mega {
  top: 0;
  background: transparent;
  border-bottom-color: transparent;
  transform-origin: 50% 0;
  will-change: transform, opacity;
}
.mega-shell .mega::before, .mega-shell .mega::after { display: none; }

.mega__inner {
  display: flex; justify-content: space-between;
  width: calc(1600 * var(--u)); height: 100%;
  margin-inline: auto;
  padding-top: calc(40 * var(--u));
}
.mega__main { width: calc(1056 * var(--u)); }
.mega__head { display: flex; align-items: center; justify-content: space-between; }
.mega__label {
  padding-bottom: calc(8 * var(--u));
  border-bottom: 1px solid var(--c-rule);
  color: var(--c-muted);
  font-weight: 600;
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  text-transform: uppercase;
}
.mega__head { border-bottom: 1px solid var(--c-rule); padding-bottom: calc(8 * var(--u)); }
.mega__head .mega__label { border: 0; padding: 0; }
.mega__all {
  display: inline-flex; align-items: center; gap: calc(8 * var(--u));
  color: var(--c-navy);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: calc(24 * var(--u));
  line-height: calc(32 * var(--u));
  text-decoration: underline;
  text-underline-position: from-font;
}
.mega__all:hover .chevron { transform: translateX(calc(4 * var(--u))); }

.mega__grid {
  display: grid; grid-template-columns: repeat(3, calc(330 * var(--u)));
  column-gap: calc(33 * var(--u)); row-gap: calc(48 * var(--u));
  margin-top: calc(40 * var(--u));
}
.mega__grid--text { row-gap: calc(32 * var(--u)); }
.mega__item {
  display: flex; align-items: flex-start; gap: calc(16 * var(--u));
  padding: calc(8 * var(--u));
  border-radius: calc(8 * var(--u));
  color: var(--c-text);
  font-weight: 500;
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.mega__item img { flex: none; width: calc(32 * var(--u)); height: calc(32 * var(--u)); }
.mega__item:hover, .mega__item:focus-visible { background: var(--c-menu-hover); color: var(--c-navy); }

.mega__grid--locations { margin-top: calc(34 * var(--u)); }
.mega__location {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  height: calc(228 * var(--u));
  padding-top: calc(16 * var(--u));
  border-radius: calc(16 * var(--u));
  color: #000;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: calc(32 * var(--u));
  line-height: calc(40 * var(--u));
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.mega__location img { width: calc(212 * var(--u)); height: calc(148 * var(--u)); margin-bottom: calc(8 * var(--u)); object-fit: contain; }
.mega__location:hover, .mega__location:focus-visible { background: var(--c-menu-hover); color: #004082; }

/* image panel 464 × 300 with 51px cut corners */
.mega__media {
  flex: none; overflow: hidden;
  width: calc(464 * var(--u)); height: calc(300 * var(--u));
  clip-path: polygon(calc(51 * var(--u)) 0, 100% 0, 100% calc(100% - 51 * var(--u)), calc(100% - 51 * var(--u)) 100%, 0 100%, 0 calc(51 * var(--u)));
}
.mega__media--tall { height: calc(320 * var(--u)); }
.mega__media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

/* ==========================================================================
   Product card (Figma 376 × 480, default + hover "Variant2")
   ========================================================================== */
.product-card {
  position: relative; flex: none;
  width: calc(376 * var(--u)); height: calc(480 * var(--u));
  overflow: hidden;
  clip-path: polygon(calc(50 * var(--u)) 0, 100% 0, 100% calc(100% - 50 * var(--u)), calc(100% - 50 * var(--u)) 100%, 0 100%, 0 calc(50 * var(--u)));
}
.product-card > a { position: absolute; inset: 0; display: block; color: #fff; }
.product-card__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.product-card__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24, 86, 151, 0) 66.979%, #033160 97.978%);
  transition: opacity 0.6s var(--ease-out);
}
.product-card__shade--hover {
  opacity: 0;
  background: linear-gradient(180deg, rgba(24, 86, 151, 0) 0%, rgba(10, 61, 114, 0.68) 50%, #033160 93.876%);
}
.product-card__content {
  position: absolute; left: calc(24 * var(--u)); right: calc(24 * var(--u)); bottom: calc(24 * var(--u));
  display: flex; flex-direction: column;
}
.product-card__title {
  width: calc(328 * var(--u));
  font-family: var(--f-head);
  font-weight: 600;
  font-size: calc(32 * var(--u));
  line-height: calc(40 * var(--u));
}
.product-card__more {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease-out);
}
.product-card__more-inner {
  min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.product-card__desc {
  width: calc(328 * var(--u));
  margin-top: calc(8 * var(--u));
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
}
.product-card__more .text-link { margin-top: calc(16 * var(--u)); }

.product-card:hover .product-card__img,
.product-card:focus-within .product-card__img { transform: scale(1.05); }
.product-card:hover .product-card__shade--hover,
.product-card:focus-within .product-card__shade--hover { opacity: 1; }
.product-card:hover .product-card__more,
.product-card:focus-within .product-card__more { grid-template-rows: 1fr; }
.product-card:hover .product-card__more-inner,
.product-card:focus-within .product-card__more-inner { opacity: 1; transition-delay: 0.12s; }

/* ==========================================================================
   News card (Figma 1:2146 – 470 × 424, default + hover)
   ========================================================================== */
.news-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start;
  width: calc(470 * var(--u)); height: calc(424 * var(--u));
  padding: calc(32 * var(--u));
  background: #fff;
  color: #000;
}
/* blue circle that grows from the bottom-right corner (Ellipse 2 → Ellipse 3) */
.news-card__fill {
  position: absolute; z-index: -1;
  left: calc(-178 * var(--u)); top: calc(-225 * var(--u));
  width: calc(786 * var(--u)); height: calc(786 * var(--u));
  border-radius: 50%;
  background: var(--c-navy);
  transform: translate(calc(303 * var(--u)), calc(303 * var(--u))) scale(0.1272);
  transition: transform 0.8s var(--ease-out);
}
.news-card__corner {
  position: absolute; top: calc(10 * var(--u)); right: calc(10 * var(--u));
  width: calc(41 * var(--u)); height: calc(41 * var(--u));
  background: var(--c-navy);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: background-color 0.5s var(--ease-out);
}
.news-card__title {
  width: calc(406 * var(--u));
  font-family: var(--f-head);
  font-weight: 600;
  font-size: calc(28 * var(--u));
  line-height: calc(40 * var(--u));
  transition: color 0.5s var(--ease-out);
}
.news-card__date {
  align-self: stretch;
  margin-top: calc(24 * var(--u));
  padding-bottom: calc(16 * var(--u));
  border-bottom: 1px solid #e0e0e0;
  color: var(--c-date);
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  transition: color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.news-card__desc {
  width: calc(406 * var(--u));
  margin-top: calc(16 * var(--u));
  color: var(--c-text);
  font-size: calc(20 * var(--u));
  line-height: calc(32 * var(--u));
  transition: color 0.5s var(--ease-out);
}
.news-card .text-link { margin-top: calc(24 * var(--u)); }

.news-card:hover .news-card__fill, .news-card:focus-visible .news-card__fill { transform: none; }
.news-card:hover .news-card__corner, .news-card:focus-visible .news-card__corner { background: #fff; }
.news-card:hover :is(.news-card__title, .news-card__date, .news-card__desc, .text-link),
.news-card:focus-visible :is(.news-card__title, .news-card__date, .news-card__desc, .text-link) { color: #fff; }
.news-card:hover .news-card__date, .news-card:focus-visible .news-card__date { border-color: rgba(255, 255, 255, 0.3); }

/* ==========================================================================
   Contact form fields (Figma 766 × 68, #0754a3 / #467eb8)
   ========================================================================== */
.contact-form { display: flex; flex-direction: column; gap: calc(24 * var(--u)); margin-top: calc(24 * var(--u)); }
.field { position: relative; }
.field__box {
  position: relative;
  display: flex; align-items: center; gap: calc(16 * var(--u));
  height: calc(68 * var(--u));
  padding: calc(16 * var(--u)) calc(12 * var(--u));
  background: var(--c-field);
  border: 1px solid var(--c-field-border);
  cursor: text;
  transition: border-color 0.3s, background-color 0.3s;
}
.field__icon { flex: none; width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.field__placeholder {
  color: var(--c-field-text);
  font-size: calc(24 * var(--u));
  line-height: calc(34 * var(--u));
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s;
}
.field__placeholder b { color: var(--c-required); font-weight: 400; }
.field__box input, .field__box select, .field__box textarea {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: calc(16 * var(--u)) calc(12 * var(--u)) calc(16 * var(--u)) calc(46 * var(--u));
  border: 0; outline: 0;
  background: transparent;
  color: #fff;
  font-family: var(--f-body);
  font-size: calc(24 * var(--u));
  line-height: calc(34 * var(--u));
}
.field__box:focus-within { border-color: #fff; }
.field__box:has(input:focus, textarea:focus) .field__placeholder,
.field__box:has(input:not(:placeholder-shown)) .field__placeholder,
.field__box:has(textarea:not(:placeholder-shown)) .field__placeholder,
.field__box:has(select:valid) .field__placeholder { opacity: 0; }

.field--select .field__box { cursor: pointer; }
.field__box select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: calc(40 * var(--u)); }
.field__box select option { color: #000; }
.field__caret {
  position: absolute; right: calc(12 * var(--u)); top: 50%;
  width: calc(16 * var(--u)); height: calc(16 * var(--u));
  transform: translateY(-50%);
  pointer-events: none;
}
.field--textarea .field__box { align-items: flex-start; height: calc(160 * var(--u)); }
.field--textarea .field__icon { margin-top: calc(8 * var(--u)); }
.field__box textarea { resize: none; }

.field__error {
  position: absolute; left: 0; top: 100%;
  padding-top: calc(2 * var(--u));
  color: #ffd0d0;
  font-size: calc(15 * var(--u));
  line-height: calc(20 * var(--u));
}
.field.is-invalid .field__box { border-color: var(--c-required); }

.contact-form__actions { display: flex; align-items: center; gap: calc(24 * var(--u)); margin-top: calc(16 * var(--u)); }
.contact-form__status { font-size: calc(18 * var(--u)); line-height: calc(28 * var(--u)); color: #fff; }

/* ==========================================================================
   Mobile menu (shown < 1200px only – see responsive.css)
   ========================================================================== */
.mobile-menu { display: none; }

/* ==========================================================================
   Page transitions (js/navigation.js – initPageTransitions)
   The page fades in on load and fades out (300 ms) before going to another page.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js body { animation: page-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
  html.is-leaving body { opacity: 0; transition: opacity 0.3s ease; }
}
@keyframes page-enter { from { opacity: 0; } to { opacity: 1; } }

/* WordPress: a mega menu with a third row of items (Figma “manufacturing” mega
   menu, node 100:4743 – 464 high, 32px between rows). Other panels unchanged. */
.mega--rows-3 { height: calc(464 * var(--u)); }
.mega--rows-3 .mega__grid { row-gap: calc(32 * var(--u)); }

/* Contact Form 7 inside the website's enquiry forms: its helper elements stay
   out of the layout (the website shows its own field errors and status text). */
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); margin: -1px; padding: 0; border: 0; word-wrap: normal !important; }
.wpcf7 .wpcf7-response-output, .wpcf7 .wpcf7-not-valid-tip, .wpcf7 .wpcf7-spinner { display: none !important; }
.contact-form .wpcf7-form-control-wrap { position: static; }
