/* =========================================================================
   MIH Manufacturing — static site styles
   Faithful rebuild of the Webflow site (Sora / Inter, navy #003573).
   ========================================================================= */

/* ---- Tokens ---------------------------------------------------------- */
:root {
  --navy: #003573;
  --navy-dark: #002a5c;
  --ink: #0a0a0a;
  --ink-soft: #333333;
  --white: #ffffff;
  --line: #e6e8ec;
  --overlay: rgba(0, 53, 115, .4);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Sora", var(--font-body);

  --container: 1280px;
  --maxw-large: 768px;
  --maxw-medium: 560px;
  --gutter: clamp(1.25rem, 5vw, 5.95rem);
  --section-pad: clamp(3.5rem, 8vw, 7rem);      /* 112px on desktop */

  --sp-xs: 1rem;      /* 16 */
  --sp-s: 1.5rem;     /* 24 */
  --sp-m: 2rem;       /* 32 */
  --sp-l: 3rem;       /* 48 */
  --sp-xl: 4rem;      /* 64 */
  --sp-xxl: 5rem;     /* 80 */

  --h1: clamp(2.5rem, 1.6rem + 3vw, 3.5rem);    /* 40 → 56 */
  --h2: clamp(2.125rem, 1.5rem + 2.3vw, 3rem);  /* 34 → 48 */
  --h3: clamp(1.875rem, 1.4rem + 1.7vw, 2.5rem);/* 30 → 40 */
  --h4: clamp(1.625rem, 1.3rem + 1vw, 2rem);    /* 26 → 32 */
  --h5: 1.5rem;                                  /* 24 */

  --nav-h: 73px;
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }

.u-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Layout ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); }
.maxw-large { max-width: var(--maxw-large); }
.maxw-medium { max-width: var(--maxw-medium); }
.align-center { margin-inline: auto; }
.text-center { text-align: center; }

.heading-h1 { font-size: var(--h1); }
.heading-h2 { font-size: var(--h2); }
.heading-h3 { font-size: var(--h3); }
.heading-h4 { font-size: var(--h4); }
.heading-h5 { font-size: var(--h5); }

.tagline { font-size: 1rem; font-weight: 600; color: inherit; }
.lead { font-size: 1.125rem; line-height: 1.5; }         /* text-size-medium 18px */
.text-small { font-size: .875rem; }

.mt-m { margin-top: var(--sp-m); }
.mb-xs { margin-bottom: var(--sp-xs); }
.mb-s { margin-bottom: var(--sp-s); }
.mb-xxl { margin-bottom: var(--sp-xxl); }

/* ---- Buttons --------------------------------------------------------- */
.btn-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-s); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 12px 24px; font-size: 1rem; font-weight: 400; line-height: 1.4;
  border: 1px solid var(--ink); background: var(--navy); color: var(--white);
  cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--navy-dark); }
.btn:active { transform: translateY(1px); }
.btn--alt { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--alt:hover { background: #eef1f5; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--white); }
.btn--link {
  padding: 4px 0; border: 0; background: transparent; color: var(--ink);
  gap: .375rem;
}
.btn--link svg { width: 1rem; height: 1rem; transition: transform .2s ease; }
.btn--link:hover svg { transform: translateX(3px); }

/* ---- Header / Nav ---------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.nav__inner { display: flex; align-items: center; gap: 2rem; height: var(--nav-h); }
.nav__brand { display: flex; align-items: center; }
.nav__brand img { height: 44px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 2rem; margin-left: 1rem; }
.nav__link { color: var(--ink-soft); font-size: 1rem; padding: .25rem 0; position: relative; }
.nav__link:hover { color: var(--navy); }
.nav__spacer { margin-left: auto; }
.nav__cta { margin-left: auto; }
.nav__toggle { display: none; }
.nav__link--mobile { display: none; }

/* ---- Hero header30 (home, centered) ---------------------------------- */
.hero { position: relative; color: var(--white); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
.hero__inner { position: relative; z-index: 1; padding-block: clamp(5rem, 12vw, 9rem); }
.hero--center .hero__inner { text-align: center; }
.hero--center .hero__body { max-width: var(--maxw-large); margin-inline: auto; }
.hero__title { font-size: var(--h1); }
.hero__sub { font-size: 1.125rem; margin-top: var(--sp-s); }
.hero--center .hero__sub { margin-inline: auto; max-width: 42rem; }

/* ---- Hero header54 (inner pages, left band) -------------------------- */
.hero--band .hero__inner { padding-block: clamp(3.5rem, 7vw, 6rem); }
.hero--band .hero__body { max-width: var(--maxw-large); }
.hero--band .hero__title { margin-bottom: var(--sp-s); }
.hero--band .hero__sub { margin-top: 0; }

/* ---- Split feature (home features-list) ------------------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split__content > .tagline { margin-bottom: var(--sp-xs); }
.split__content h2 { font-size: var(--h2); }
.split__content .lead { margin-top: var(--sp-s); }

.image-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-s); align-items: start; }
.image-stack img { width: 100%; object-fit: cover; }
.image-stack__tall { grid-row: span 2; aspect-ratio: 3 / 4; }
.image-stack__short { aspect-ratio: 4 / 3; margin-top: var(--sp-xl); }

/* ---- Home how-it-works ----------------------------------------------- */
.howitworks__head { max-width: var(--maxw-medium); margin-bottom: var(--sp-xxl); }
.howitworks__head .tagline { margin-bottom: var(--sp-xs); }
.howitworks__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.howitworks__grid > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.howitworks__right img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.howitworks__right .lead { margin-top: var(--sp-l); }

/* ---- Services: centered block + full image --------------------------- */
.feature-centered { text-align: center; }
.feature-centered .container > .maxw-large { margin-inline: auto; margin-bottom: var(--sp-xl); }
.feature-centered__img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }

/* ---- Services layout-1 (heading row + grid) -------------------------- */
.svc-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,5rem); margin-bottom: var(--sp-xxl); align-items: start; }
.svc-head h2 { font-size: var(--h3); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vw, 4rem); }
.svc-grid__item h3 { font-size: var(--h5); margin-bottom: var(--sp-xs); }
.svc-grid__item p { font-size: 1rem; }

/* ---- Services tabs (Concept / Manufacturing / Launch) ---------------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: stretch; }
.tabs__menu { display: flex; flex-direction: column; justify-content: center; }
.tabs__link {
  display: block; width: 100%; text-align: left; background: transparent;
  border: 0; border-left: 2px solid var(--line); padding: var(--sp-s) 0 var(--sp-s) var(--sp-s);
  cursor: pointer; transition: border-color .25s ease, opacity .25s ease; opacity: .5;
}
.tabs__link[aria-selected="true"] { border-left-color: var(--navy); opacity: 1; }
.tabs__link h3 { font-size: var(--h4); margin-bottom: var(--sp-xs); }
.tabs__link p { font-size: 1rem; }
.tabs__panels { position: relative; min-height: 22rem; }
.tabs__panel { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .3s ease; }
.tabs__panel[data-active="true"] { opacity: 1; visibility: visible; }
.tabs__panel-inner { position: relative; height: 100%; min-height: 22rem; background: #d7dde6; overflow: hidden; }
.tabs__panel-inner img { width: 100%; height: 100%; object-fit: contain; padding: 3rem; }

/* ---- FAQ ------------------------------------------------------------- */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.faq__left h2 { font-size: var(--h2); margin-bottom: var(--sp-s); }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  padding: var(--sp-s) 0; font-size: 1.125rem; font-weight: 700; font-family: var(--font-body);
}
.faq__icon { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; transition: transform .3s ease; }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(180deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq__q[aria-expanded="true"] + .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding-bottom: var(--sp-s); }

/* ---- CTA15 ----------------------------------------------------------- */
.cta { position: relative; color: var(--white); overflow: hidden; }
.cta__bg { position: absolute; inset: 0; z-index: 0; }
.cta__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta__bg::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
.cta__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.cta__inner h2 { font-size: var(--h2); }

/* ---- Brands feature-3 ------------------------------------------------ */
.brand { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.brand + .brand { margin-top: clamp(4rem, 9vw, 7rem); }
.brand__logo { height: auto; width: auto; max-height: 40px; max-width: 240px; object-fit: contain; margin-bottom: var(--sp-s); }
.brand__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.brand .btn-group { margin-top: var(--sp-m); }

/* ---- Gallery slider -------------------------------------------------- */
.gallery__head { max-width: var(--maxw-large); margin-bottom: var(--sp-xxl); }
.gallery__head .tagline { margin-bottom: var(--sp-xs); }
.gallery__viewport { overflow: hidden; }
.gallery__track {
  display: flex; gap: var(--sp-s); scroll-snap-type: x mandatory;
  overflow-x: auto; scroll-behavior: smooth; padding-bottom: 1rem;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 clamp(80%, 60vw, 40%); scroll-snap-align: start; }
.gallery__slide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery__controls { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-l); gap: 1rem; }
.gallery__dots { display: flex; gap: .5rem; flex-wrap: wrap; }
.gallery__dot { width: 8px; height: 8px; border-radius: 50%; background: #c7ccd4; border: 0; padding: 0; cursor: pointer; transition: background .2s; }
.gallery__dot[aria-current="true"] { background: var(--navy); }
.gallery__arrows { display: flex; gap: .75rem; }
.gallery__arrow {
  width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--ink);
  background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s;
}
.gallery__arrow:hover { background: var(--ink); color: var(--white); }
.gallery__arrow svg { width: 1.25rem; height: 1.25rem; }

/* ---- Team ------------------------------------------------------------ */
.team__head { max-width: var(--maxw-large); margin-bottom: var(--sp-xxl); }
.team__head h2 { font-size: var(--h2); margin-bottom: var(--sp-s); }
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.team__photo { aspect-ratio: 1; background: #eef0f3 url("../images/mih-icon.png") center / 40px no-repeat; margin-bottom: var(--sp-s); }
.team__name { font-size: 1.25rem; font-weight: 600; }
.team__role { color: var(--ink-soft); }

/* ---- About section --------------------------------------------------- */
.about__head { max-width: var(--maxw-medium); margin-bottom: var(--sp-xxl); }
.about__head .tagline { margin-bottom: var(--sp-xs); }
.about__head h2 { font-size: var(--h2); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about__images { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-s); align-items: start; }
.about__images img { width: 100%; object-fit: cover; }
.about__images img:first-child { aspect-ratio: 3 / 4; }
.about__images img:last-child { aspect-ratio: 3 / 4; margin-top: var(--sp-xl); }

/* ---- Contact form ---------------------------------------------------- */
.form-head { text-align: center; max-width: var(--maxw-large); margin: 0 auto var(--sp-xxl); }
.form-head .tagline { margin-bottom: var(--sp-xs); }
.form-head h2 { font-size: var(--h2); margin-bottom: var(--sp-s); }
.form-wrap { max-width: var(--maxw-large); margin-inline: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-s); margin-bottom: var(--sp-s); }
.field { display: flex; flex-direction: column; }
.field label { font-size: 1rem; margin-bottom: .5rem; }
.field input, .field textarea {
  width: 100%; padding: .75rem 1rem; border: 1px solid var(--navy);
  background: var(--white); font-size: 1rem; border-radius: 0;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.field textarea { min-height: 11rem; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: .625rem; margin-bottom: var(--sp-s); font-size: .875rem; }
.checkbox input { width: 1.125rem; height: 1.125rem; accent-color: var(--navy); }
.checkbox a { color: var(--navy); text-decoration: underline; }
.form-note { margin-top: 1rem; font-size: .95rem; display: none; }
.form-note--ok { color: #1c7d3f; display: block; }
.form-note--err { color: #b42318; display: block; }

/* ---- Rich text (legal pages) ----------------------------------------- */
.legal { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section-pad); }
.legal h1 { font-size: var(--h1); margin-bottom: var(--sp-l); }
.legal .rich > * + * { margin-top: 1.25rem; }
.legal .rich h2, .legal .rich h3 { font-size: 1.25rem; margin-top: 2rem; }
.legal .rich p, .legal .rich li { font-size: 1rem; line-height: 1.7; }
.legal .rich ul { padding-left: 1.25rem; }
.legal .rich a { color: var(--navy); text-decoration: underline; }
.legal .rich strong { font-weight: 700; }

/* ---- Footer ---------------------------------------------------------- */
.footer { background: var(--navy); color: var(--white); }
.footer__inner { padding-block: clamp(3rem, 6vw, 5rem); }
.footer__logo { height: 40px; width: auto; margin-bottom: var(--sp-l); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__nav a { font-weight: 500; opacity: .95; }
.footer__nav a:hover { opacity: 1; text-decoration: underline; }
.footer__divider { border: 0; border-top: 1px solid rgba(255,255,255,.25); margin-block: var(--sp-l); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer__legal { display: flex; gap: 1.5rem; }
.footer__legal a { text-decoration: underline; opacity: .9; }
.footer__copy { opacity: .8; font-size: .95rem; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 991px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  :root { --nav-h: 64px; }
  .nav__inner { gap: 1rem; }
  .nav__menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--white); padding: .5rem var(--gutter) 1.5rem; margin: 0;
    box-shadow: 0 8px 12px rgba(0,0,0,.12); transform: translateY(-120%); transition: transform .3s ease;
    max-height: calc(100vh - var(--nav-h)); overflow: auto;
  }
  .nav__menu[data-open="true"] { transform: translateY(0); }
  .nav__menu .nav__link { width: 100%; padding: .875rem 0; border-bottom: 1px solid var(--line); }
  .nav__brand img { height: 38px; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer;
  }
  .nav__toggle span { display: block; height: 2px; width: 26px; background: var(--ink); transition: transform .3s, opacity .3s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__cta { display: none; }
  .nav__link--mobile { display: block; }

  .split, .howitworks__grid, .svc-head, .tabs, .faq, .cta__inner, .brand, .about__grid { grid-template-columns: 1fr; }
  .brand { gap: var(--sp-l); }
  .brand:nth-child(even) .brand__img { order: -1; }
  .image-stack__short, .howitworks__right .lead, .about__images img:last-child { margin-top: var(--sp-s); }
  .svc-grid { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .tabs__panels { min-height: 16rem; }
  .form-row { grid-template-columns: 1fr; }
  .gallery__slide { flex-basis: 85%; }
}
@media (max-width: 479px) {
  .team__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
