/* ==========================================================
   MRV Solutions – Landing page
   Tokens taken from the Figma file (Plus Jakarta Sans, #E80203, #F5F5F5)
   ========================================================== */
:root {
  --red: #e80203;
  --grey: #f5f5f5;
  --muted: #6b6b6b;
  --black: #000;
  --white: #fff;

  --gutter: clamp(20px, 8.33vw, 120px);   /* 120px at 1440 */
  --max: 1200px;
  --section-y: clamp(56px, 6.25vw, 90px);

  --fs-h1: clamp(36px, 4.5vw + 8px, 60px);
  --fs-h2: clamp(30px, 2.4vw + 14px, 48px);
  --fs-h3: 24px;
  --fs-body: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: 24px;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.stack-48 { display: flex; flex-direction: column; gap: 48px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-6  { display: flex; flex-direction: column; gap: 6px; }
.section { padding-block: var(--section-y); }
.section--tight-bottom { padding-bottom: 0; }

h2 { font-size: var(--fs-h2); line-height: 1.167; }
h3 { font-size: var(--fs-h3); line-height: 32px; }

/* ---------- Shared bits ---------- */
.pill {
  display: inline-flex; align-items: center; align-self: flex-start;
  padding: 8px 12px 10px; background: var(--white);
  border: 1px solid var(--grey); border-radius: 100px;
  font-weight: 600; text-transform: uppercase; line-height: 16px; white-space: nowrap;
}
.pill__slash { color: var(--red); margin-right: .35em; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 18px; border-radius: 1000px; border: 0; cursor: pointer;
  font: 600 16px/16px "Plus Jakarta Sans", sans-serif; text-transform: uppercase; white-space: nowrap;
  color: var(--white);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn--red   { background: var(--red);   --btn-arrow: var(--red); }
.btn--black { background: var(--black); --btn-arrow: var(--black); }
.btn__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--white); color: var(--btn-arrow);
  transition: transform .25s ease;
}
.btn__icon svg { width: 24px; height: 24px; }
.btn:hover .btn__icon { transform: rotate(45deg); }
.btn:active { transform: scale(.98); }

.check {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px;
  border-radius: 50%; background: var(--red); color: var(--white);
}
.check svg { width: 18px; height: 18px; }
.check--sm { width: 30px; height: 30px; }

.title-block { display: flex; flex-direction: column; gap: 12px; }
.split-title { display: flex; align-items: flex-end; gap: 60px; }
.split-title > * { flex: 1 1 0; min-width: 0; }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; }
.logo { display: block; position: relative; overflow: hidden; flex: none; }
.logo img { position: absolute; max-width: none; height: 278.46%; width: 115.72%; left: -8.1%; top: -93.08%; }
.logo--nav { width: 214px; height: 30px; }
.logo--footer { width: 274px; height: 38px; max-width: 100%; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a:not(.btn) { position: relative; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__cta-mobile, .nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  --video-w: min(900px, calc(100vw - 2 * var(--gutter)));
  --video-h: calc(var(--video-w) * 506 / 900);
  position: relative; overflow: hidden;
  padding-top: 150px;
  background: var(--white);
}
/* Background banner: runs behind the text and stops at the vertical middle of the video */
.hero__bg {
  position: absolute; top: 0; left: 0; right: 0;
  height: calc(100% - var(--video-h) / 2);
  overflow: hidden; pointer-events: none;
  /* Put your image at assets/hero-bg.jpg (or change the file name below).
     The white overlay keeps the black text readable – lower the .55 to show more of the photo. */
  background:
    linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)),
    url("assets/hero-bg.jpg") center / cover no-repeat,
    var(--grey);
}
.hero__pattern { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .06; }
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 48px; max-width: calc(900px + var(--gutter) * 2); }
.hero__text { display: flex; flex-direction: column; align-items: center; gap: 48px; text-align: center; max-width: 790px; }
.hero__text > .pill { align-self: center; margin-bottom: -42px; }
.hero__title { font-size: var(--fs-h1); font-weight: 700; line-height: 1.133; max-width: 11em; }
.hero__text > p { margin-top: -42px; }
.points { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; }
.points li { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

.video { position: relative; width: 100%; aspect-ratio: 900 / 506; border-radius: clamp(20px, 3vw, 42px); overflow: hidden; background: #ddd; }
.video__thumb, .video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video__play {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 72px; height: 72px; border: 0; border-radius: 50%;
  background: var(--red); color: var(--white); cursor: pointer;
  transition: transform .25s ease;
}
.video__play svg { width: 36px; height: 36px; }
.video__play:hover { transform: scale(1.08); }

/* ---------- Logos ---------- */
.logos { padding-top: 33px; }
.logos .container { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.logos__title { font-size: 24px; line-height: 26px; text-align: center; }
.logos__list { display: flex; gap: 18px; width: 100%; }
.logos__list li {
  flex: 1 1 0; min-width: 0; height: 60px; display: grid; place-items: center;
  background: var(--white); border-radius: 1000px; padding-inline: 18px;
  box-shadow: 0 0 0 1px var(--grey);
}
.logos__list img { max-width: 100%; height: auto; max-height: 30px; width: auto; }

/* ---------- About ---------- */
.about__head { display: flex; align-items: center; gap: 120px; }
.about__head .title-block { flex: 1; min-width: 0; }
.about__grid { display: grid; grid-template-columns: 440px 1fr 1fr; gap: 24px; align-items: stretch; }
.about__img { position: relative; min-height: 338px; border-radius: 30px; overflow: hidden; background: var(--grey); }
.about__img img { position: absolute; max-width: none; height: 140.29%; width: 164.56%; left: -55.91%; top: -40.29%; }
.usp { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 150px 24px 24px; background: var(--grey); border-radius: 24px; }
.usp__num { font-size: var(--fs-h2); font-weight: 600; line-height: 56px; }
.usp__num em { font-style: normal; color: var(--red); }
.usp h3 { line-height: 36px; }

/* ---------- Form ---------- */
.form-section { background: var(--grey); padding-block: var(--section-y); }
.form-section__inner { display: flex; gap: 60px; align-items: flex-start; }
.form-section__title { flex: 0 0 420px; max-width: 420px; }
.form-card { flex: 1 1 0; min-width: 0; background: var(--white); border-radius: 30px; padding: 36px; display: flex; flex-direction: column; gap: 30px; }
.form-card__head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
#lead-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.field label { line-height: 24px; }
.field input, .select select {
  width: 100%; padding: 15px 12px; font: inherit; line-height: 18px; color: var(--black);
  background: var(--white); border: 1px solid #ebebeb; border-radius: 12px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .select select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(232, 2, 3, .12); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; color: var(--muted); padding-right: 42px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%236b6b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 7 4.5 4.5L13.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field--invalid input { border-color: var(--red); }
.field__error { min-height: 0; color: var(--red); font-size: 14px; line-height: 18px; }
.field__error:empty { display: none; }
#lead-form .btn { margin-top: 6px; }
.form-status { width: 100%; font-size: 15px; }
.form-status.is-success { color: #0a7a3a; }
.form-status.is-error { color: var(--red); }

/* ---------- Why choose ---------- */
.why { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.why__col { display: flex; flex-direction: column; gap: 24px; }
.why-card { display: flex; flex-direction: column; gap: 30px; padding: 24px; background: var(--grey); border-radius: 24px; }
.why-card--right { align-items: flex-end; text-align: right; }
.why-card > div { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.icon-dot { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--red); flex: none; }
.icon-dot img { width: 30px; height: 30px; }
.why__img { position: relative; width: 420px; height: 484px; border-radius: 30px; overflow: hidden; background: var(--grey); }
.why__img > img { position: absolute; max-width: none; height: 100%; width: 172.9%; left: -49.1%; top: 0; }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px;
  background: var(--white); border-radius: 1000px; white-space: nowrap;
}
.chip--a { left: 18px; top: 420px; }
.chip--b { left: 220px; top: 18px; }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.t-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--grey); border-radius: 18px; }
.t-card__img { position: relative; height: 240px; border-radius: 12px; overflow: hidden; background: var(--white); }
.t-card__img--blue { background: #ebf6fc; }
.t-card__img img { position: absolute; max-width: none; }
.t-card__img .fit { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-card__img .crop-2 { height: 354.34%; width: 112.54%; left: -6.27%; top: -49.35%; }
.t-card__img .crop-3 { height: 262.24%; width: 83.29%; left: 8.33%; top: -20.67%; }
.t-card blockquote { line-height: 26px; }
.t-card figcaption { font-size: 24px; font-weight: 600; line-height: 32px; }

.carousel__controls { display: none; }

/* ---------- CTA ---------- */
.cta { margin-top: var(--section-y); background: var(--red); color: var(--white); position: relative; }
.cta__inner { position: relative; display: grid; grid-template-columns: 600px 1fr; gap: 24px; align-items: center; padding-block: 90px; min-height: 490px; }
.cta__text { display: flex; flex-direction: column; align-items: flex-start; gap: 48px; }
.cta__text h2 { font-size: var(--fs-h2); }
.cta__visual { position: absolute; right: var(--gutter); top: -102px; bottom: -0px; width: 405px; pointer-events: none; }
.cta__person { position: absolute; max-width: none; height: 104.23%; width: 131.93%; left: -15.06%; top: -4.23%; }
.cta__visual { overflow: visible; }
.cta__card {
  position: absolute; left: -253px; top: 412px; width: 260px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
  background: var(--white); color: var(--black); border-radius: 12px; filter: drop-shadow(0 4px 15px rgba(255, 255, 255, .3));
  pointer-events: auto;
}
.cta__card li { display: flex; align-items: center; gap: 8px; min-height: 36px; line-height: 18px; }
.cta__card .check { width: 30px; height: 30px; }

/* ---------- Footer ---------- */
.footer { background: var(--grey); padding: 90px 0 30px; }
.footer__top { display: flex; justify-content: space-between; gap: 48px; margin-bottom: 72px; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; flex: 1 1 342px; max-width: 420px; min-width: 0; }
.footer__tagline { font-size: 24px; font-weight: 600; line-height: 32px; }
.social { display: flex; gap: 8px; }
.social__btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 60px; border: 1px solid var(--black); transition: transform .2s; }
.social__btn:hover { transform: translateY(-3px); }
.social__btn--red { background: var(--red); border-color: var(--red); }
.social__btn img { width: 24px; height: 24px; }
.social__small { width: 18px !important; height: 18px !important; }
.footer__links { display: flex; flex-wrap: wrap; gap: 66px 120px; max-width: 660px; }
.footer__links h4 { font-size: 24px; line-height: 32px; margin-bottom: 18px; }
.footer__links ul { display: flex; flex-direction: column; gap: 18px; color: var(--muted); }
.footer__links a:hover { color: var(--red); }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid #dcdcdc; color: var(--muted); }
.footer__bottom strong { color: var(--red); font-weight: 600; }
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__bottom a:hover { color: var(--red); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1200px) {
  .about__grid { grid-template-columns: 360px 1fr 1fr; }
  .cta__inner { grid-template-columns: 1fr 405px; }
  .cta__visual { right: var(--gutter); }
}

/* Tablet */
@media (max-width: 1024px) {
  .nav__links { gap: 20px; }
  .split-title { flex-direction: column; align-items: flex-start; gap: 16px; }
  .about__head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .about__grid { grid-template-columns: 1fr 1fr; }
  .about__img { grid-column: 1 / -1; min-height: 0; aspect-ratio: 440 / 338; max-height: 460px; }
  .usp { padding-top: 90px; }

  .form-section__inner { flex-direction: column; gap: 36px; }
  .form-section__title { flex: none; max-width: 640px; }
  .form-card { width: 100%; }

  .why { grid-template-columns: 1fr 1fr; }
  .why__img { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: 100%; max-width: 560px; }
  .why__col { display: contents; }
  .why-card--right { align-items: flex-start; text-align: left; }

  .testimonials { grid-template-columns: repeat(2, 1fr); }

  .logos__list { flex-wrap: wrap; justify-content: center; }
  .logos__list li { flex: 0 0 calc((100% - 36px) / 3); }
  .footer__top { flex-direction: column; }
  .footer__brand { max-width: none; }
}

/* Mobile nav + CTA stack */
@media (max-width: 860px) {
  .nav__cta { display: none; }
  .nav__toggle {
    display: grid; gap: 5px; align-content: center; justify-items: center; width: 44px; height: 44px;
    background: var(--white); border: 1px solid var(--grey); border-radius: 50%; cursor: pointer; padding: 0; z-index: 30;
  }
  .nav__toggle span { width: 18px; height: 2px; background: var(--black); border-radius: 2px; transition: transform .25s, opacity .2s; }
  .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__links {
    position: fixed; inset: 0 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    padding: 96px var(--gutter) 28px; background: var(--white); box-shadow: 0 20px 40px rgba(0,0,0,.08);
    transform: translateY(-110%); visibility: hidden; transition: transform .3s ease, visibility .3s;
  }
  .nav__links.is-open { transform: none; visibility: visible; }
  .nav__links a:not(.btn) { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--grey); font-size: 18px; }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__cta-mobile { display: inline-flex; margin-top: 20px; }

  .cta__inner { grid-template-columns: 1fr; padding-bottom: 0; min-height: 0; }
  .cta__visual { position: relative; right: auto; top: auto; bottom: auto; width: min(405px, 100%); height: 420px; margin: 0 auto; }
  .cta__person { left: 50%; translate: -50% 0; top: 0; width: auto; height: 100%; max-width: none; }
  .cta__card { left: 0; top: auto; bottom: 24px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --fs-body: 16px; }
  .hero { padding-top: 110px; }
  .hero__text { gap: 32px; }
  .hero__text > .pill { margin-bottom: -26px; }
  .hero__text > p { margin-top: -26px; }
  .hero__inner { gap: 32px; }
  .pill { white-space: normal; font-size: 14px; line-height: 16px; }
  .points { flex-direction: column; align-items: flex-start; }
  .video__play { width: 56px; height: 56px; }
  .video__play svg { width: 28px; height: 28px; }

  .logos__title { font-size: 20px; }
  .logos__list li { flex-basis: calc((100% - 18px) / 2); }

  .about__grid { grid-template-columns: 1fr; }
  .usp { padding-top: 60px; }

  .form-card { padding: 24px 18px; border-radius: 24px; }

  .why { grid-template-columns: 1fr; }
  .why__img { height: auto; aspect-ratio: 420 / 484; }
  .chip { font-size: 14px; padding-right: 14px; gap: 8px; }
  .chip--a { left: 12px; top: auto; bottom: 12px; }
  .chip--b { left: auto; right: 12px; top: 12px; }

  /* Testimonials become a swipeable carousel with arrow buttons */
  .testimonials {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .testimonials::-webkit-scrollbar { display: none; }
  .t-card { flex: 0 0 100%; scroll-snap-align: center; }
  .carousel__controls { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
  .carousel__btn {
    display: grid; place-items: center; width: 48px; height: 48px; padding: 0; cursor: pointer;
    border-radius: 50%; border: 1px solid var(--black); background: var(--white); color: var(--black);
    transition: background .2s, color .2s, border-color .2s, opacity .2s;
  }
  .carousel__btn--next { background: var(--red); border-color: var(--red); color: var(--white); }
  .carousel__btn svg { width: 24px; height: 24px; }
  .carousel__btn:disabled { opacity: .35; cursor: default; }
  .stack-48 { gap: 32px; }

  .footer { padding-top: 56px; }
  .footer__top { margin-bottom: 40px; }
  .footer__links { gap: 36px 48px; }
  .footer__bottom { flex-direction: column; }
  .btn { padding-left: 16px; }
}

@media (max-width: 380px) {
  .btn__label { font-size: 14px; }
  .footer__links { flex-direction: column; }
}

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