/* ==========================================================================
   TransMed Trading SA — pixel-faithful rebuild of transmedtrade.com
   Grid: 1200px content column, all sizes taken from the original layout.
   ========================================================================== */

:root {
  --navy: #001f59;
  --navy-hover: #002a75;
  --bg: #f7f7f7;
  --white: #ffffff;
  --field: #f3f3f3;
  --accent: #55aeff;
  --link: #ff8562;

  --content: 1200px;
  --header-h: 101px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: 'Lato', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--navy);
  color: var(--white);
  border-radius: 0 0 12px 12px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: calc(var(--content) + 40px);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header (101px, #f7f7f7, fixed over the content) ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.header__logo img { width: 165px; height: 44px; }

.nav__list {
  display: flex;
  align-items: center;
}
/* exact item boxes / gaps of the original header */
.nav__list li:nth-child(1) { width: 72px; margin-right: 26px; }
.nav__list li:nth-child(2) { width: 72px; margin-right: 28px; }
.nav__list li:nth-child(3) { width: 147px; margin-right: 25px; }
.nav__list li:nth-child(4) { width: 90px; }

.nav__link {
  position: relative;
  display: inline-block;
  font-size: 18px;
  line-height: 28px;
  color: var(--navy);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 24px; height: 2px;
  margin: 0 auto;
  background: #7d8ba9;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 80px; }

.hero__title {
  max-width: 400px;
  margin: 0 auto;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  color: var(--navy);
}

.hero__cta {
  margin: 48px 0 80px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 195px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color .25s var(--ease);
}
.btn:hover { background: var(--navy-hover); }

.globe {
  aspect-ratio: 1200 / 675;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}
.globe__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Sections & cards ---------- */
.section { padding: 80px 0; }

.card { border-radius: 32px; }
.card--white { background: var(--white); }
.card--navy { background: var(--navy); color: var(--white); }
.card--r24 { border-radius: 24px; }
.card--r32 { border-radius: 32px; }
.card--r40 { border-radius: 40px; }

.section__title {
  margin: 0;
  padding-top: 80px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 400;
  text-align: center;
  color: var(--navy);
}
.section__title--600 { font-weight: 600; }

.section__lead {
  margin: 24px auto 0;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  color: var(--navy);
}
.section__lead--330 { max-width: 330px; }
.section__lead--482 { max-width: 482px; }

/* ---------- Stats (card 366px tall) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 88px 0 84px;
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* the original columns are not evenly spaced — reproduce their centres */
@media (min-width: 1240px) {
  .stat:nth-child(1) { left: 9px; }
  .stat:nth-child(2) { left: -4px; }
  .stat:nth-child(4) { left: 9px; }
  .stat:nth-child(5) { left: -9px; }
}
.stat__icon {
  width: 58px;
  height: 58px;
  margin-bottom: 35px;
}
.stat__value {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 400;
  margin-bottom: 24px;
}
.stat__value--500 { font-weight: 500; }
.stat__label {
  font-size: 18px;
  line-height: 24px;
}
/* label widths reproduce the original line breaks */
.stat:nth-child(1) .stat__label { max-width: 161px; }
.stat:nth-child(2) .stat__label { max-width: 168px; }
.stat:nth-child(3) .stat__label { max-width: 250px; }
.stat:nth-child(4) .stat__label { max-width: 159px; }
.stat:nth-child(5) .stat__label { max-width: 171px; }

/* ---------- About (card 452px tall) ---------- */
.about { padding-bottom: 80px; }
.about__title {
  margin: 0;
  padding-top: 80px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 400;
  text-align: center;
  color: var(--white);
}
.about__text {
  max-width: 724px;
  margin: 26px auto 0;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  color: var(--white);
}
.about__text p + p { margin-top: 22px; }

/* ---------- Products (card 783px tall) ---------- */
.products {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 106px);
  gap: 39px 80px;
  justify-content: center;
  margin-top: 80px;
  padding-bottom: 80px;
}
/* the original products card sits 1px higher and its grid 5px right of centre */
@media (min-width: 1240px) {
  #products .card { margin-top: -1px; }
  #products .section__title { padding-top: 81px; }
  .products {
    left: 5px;
    padding-bottom: 79px;
  }
}
.product {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product__drop {
  width: 106px;
  height: 149px;
  transition: transform .35s var(--ease);
}
.product:hover .product__drop { transform: translateY(-6px); }
.product__name {
  margin-top: 17px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  color: var(--navy);
  white-space: nowrap;
}

/* ---------- Regions (card 633px tall) ---------- */
.regions {
  display: grid;
  grid-template-columns: repeat(5, 209px);
  gap: 19px;
  justify-content: center;
  margin-top: 40px;
  padding-bottom: 81px;
}
.region {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.region__img {
  width: 209px;
  height: 230px;
  object-fit: cover;
}
.region__name {
  max-width: 171px;
  margin-top: 30px;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  color: var(--navy);
}

/* ---------- Contact (card 521px tall) ---------- */
.contact {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 48px;
}
.contact__title {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--white);
}
.contact__text {
  max-width: 334px;
  margin-top: 24px;
  font-size: 16px;
  line-height: 22px;
  color: var(--white);
}
.contact__text p + p { margin-top: 22px; }
.contact__mail {
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  transition: border-color .2s var(--ease);
}
.contact__mail:hover { border-color: var(--white); }

.contact__form {
  flex: 0 0 368px;
  width: 368px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
}

/* honeypot — hidden from humans, bots fill it and get rejected server-side */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.input {
  display: block;
  width: 100%;
  height: 48px;
  margin-bottom: 16px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--field);
  font-size: 16px;
  color: var(--navy);
  transition: border-color .2s var(--ease);
}
.input::placeholder { color: #9b9b9b; }
.input:focus { outline: none; border-color: var(--navy); }
.input--area {
  height: 85px;
  padding: 14px 20px;
  resize: none;
  line-height: 1.4;
}
.input.is-invalid { border-color: #c0392b; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--navy);
  cursor: pointer;
}
.checkbox input {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
}
.checkbox__box {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border: 1.5px solid var(--navy);
  border-radius: 4px;
  color: transparent;
  transition: color .15s var(--ease);
}
.checkbox__box svg { width: 13px; height: 13px; }
.checkbox input:checked + .checkbox__box { color: var(--navy); }
.checkbox input:focus-visible + .checkbox__box { outline: 2px solid var(--accent); outline-offset: 2px; }

.submit {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .25s var(--ease);
}
.submit:hover { background: var(--navy-hover); }

.form__error {
  display: none;
  margin: -8px 0 10px;
  font-size: 12px;
  color: #c0392b;
}
.form__error.is-shown { display: block; }

.form__success {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 31, 89, .06);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

/* ---------- Legal pages ---------- */
.legal-page { background: var(--white); }
.legal {
  padding: 120px 0 50px;
  margin-left: 20px;
  max-width: 1162px;
  font-size: 16px;
  line-height: 25px;
  color: var(--navy);
}
.legal--1138 { max-width: 1138px; }
.legal a {
  color: var(--link);
  transition: opacity .2s var(--ease);
}
.legal a:hover { opacity: .8; }
.legal ul {
  padding-left: 20px;
  list-style: disc;
}
.legal li { list-style: disc; }
.legal strong { font-weight: 700; }
.legal em { font-style: italic; }

/* ---------- Footer (169px, white) ---------- */
.footer { background: var(--white); }
.footer__top {
  display: flex;
  align-items: center;
  height: 100px;
}
.footer__logo img { width: 148px; height: 39px; }
.footer__nav {
  display: flex;
  gap: 24px;
  margin-left: 126px;
}
.footer__nav a {
  font-size: 16px;
  line-height: 19px;
  color: var(--navy);
  transition: opacity .2s var(--ease);
}
/* exact link boxes of the original footer */
.footer__nav a:nth-child(1) { width: 64px; }
.footer__nav a:nth-child(2) { width: 63px; }
.footer__nav a:nth-child(3) { width: 132px; }
.footer__nav a:nth-child(4) { width: 76px; }
.footer__nav a:hover { opacity: .65; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 69px;
  border-top: 1px solid rgba(0, 31, 89, .1);
}
.footer__copy {
  font-size: 14px;
  line-height: 17px;
  color: var(--navy);
}
.footer__legal {
  display: flex;
  gap: 28px;
}
.footer__legal a {
  font-size: 14px;
  line-height: 20px;
  color: var(--navy);
  transition: opacity .2s var(--ease);
}
.footer__legal a:nth-child(1) { width: 86px; }
.footer__legal a:nth-child(2) { width: 84px; }
.footer__legal a:hover { opacity: .65; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* --- ≤1199px: content column 960 --- */
@media (max-width: 1239px) {
  .products { gap: 39px 60px; }
  .regions {
    grid-template-columns: repeat(5, 1fr);
    gap: 19px;
  }
  .region__img { width: 100%; }
  .contact { padding: 40px; }
  .footer__nav { margin-left: 80px; }
}

@media (max-width: 1023px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 0;
    padding: 64px 0 64px;
  }
  .regions {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 19px;
  }
  .contact {
    flex-direction: column;
    gap: 40px;
  }
  .contact__form { width: 100%; flex: 0 0 auto; max-width: 460px; }
  .contact__text { max-width: none; }
}

/* --- ≤959px: burger menu --- */
@media (max-width: 959px) {
  :root { --header-h: 92px; }

  .burger { display: block; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    padding: 8px 20px 24px;
    background: var(--bg);
    border-top: 1px solid rgba(0, 31, 89, .1);
    box-shadow: 0 18px 30px rgba(0, 31, 89, .08);
    transform: translateY(-140%);
    transition: transform .35s var(--ease);
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav__list li,
  .nav__list li:nth-child(1),
  .nav__list li:nth-child(2),
  .nav__list li:nth-child(3),
  .nav__list li:nth-child(4) {
    width: 100%;
    margin-right: 0;
  }
  .nav__link {
    display: block;
    padding: 14px 0;
    font-size: 20px;
    border-bottom: 1px solid rgba(0, 31, 89, .08);
  }
  .nav__link::after { display: none; }

  .hero { padding: 140px 0 56px; }
  .hero__title { font-size: 34px; max-width: 360px; }
  .hero__cta { margin: 40px 0 56px; }
  .globe { aspect-ratio: 4 / 3; }

  .section { padding: 56px 0; }
  .section__title { padding-top: 56px; font-size: 34px; }

  .about { padding-bottom: 56px; }
  .about__title { padding-top: 56px; font-size: 34px; }

  .products {
    grid-template-columns: repeat(2, 106px);
    gap: 40px 60px;
    margin-top: 56px;
    padding-bottom: 56px;
  }
  .regions {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 32px;
    padding-bottom: 56px;
  }
  .regions .region:last-child { grid-column: 1 / -1; justify-self: center; max-width: 50%; }

  .footer__top {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 32px 0;
  }
  .footer__nav { margin-left: 0; flex-wrap: wrap; gap: 16px 24px; }
  .footer__nav a:nth-child(1),
  .footer__nav a:nth-child(2),
  .footer__nav a:nth-child(3),
  .footer__nav a:nth-child(4),
  .footer__legal a:nth-child(1),
  .footer__legal a:nth-child(2) { width: auto; }
  .footer__bottom {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0 32px;
  }

  .legal {
    margin-left: 0;
    padding: 130px 0 48px;
  }
}

/* --- ≤639px --- */
@media (max-width: 639px) {
  .container { padding: 0 16px; }

  .header__logo img { width: 140px; height: auto; }

  .hero { padding: 130px 0 40px; }
  .hero__title { font-size: 28px; max-width: 320px; }
  .globe { aspect-ratio: 1 / 1; border-radius: 20px; }

  .section { padding: 40px 0; }
  .card, .card--r24, .card--r32, .card--r40 { border-radius: 24px; }
  .section__title { padding-top: 44px; font-size: 28px; }
  .section__lead { padding: 0 16px; }

  .about { padding-bottom: 44px; }
  .about__title { padding-top: 44px; font-size: 28px; }
  .about__text { padding: 0 20px; }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 8px;
    padding: 44px 12px;
  }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .stat__icon { margin-bottom: 24px; }
  .stat__value { font-size: 22px; margin-bottom: 14px; }
  .stat__label { font-size: 16px; }

  .products {
    grid-template-columns: repeat(2, 88px);
    gap: 32px 40px;
    margin-top: 44px;
    padding-bottom: 44px;
  }
  .product__drop { width: 88px; height: 124px; }
  .product__name { font-size: 16px; white-space: normal; }

  .regions { padding-bottom: 44px; }
  .region__name { font-size: 17px; margin-top: 14px; }

  .contact { padding: 28px 20px; }
  .contact__title { font-size: 28px; }
  .contact__form { padding: 20px 16px; }

  .legal { padding: 124px 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
