/* ===========================
   MRAV IT — Design System
   =========================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --navy: #061b2b;
  --navy-2: #082438;
  --orange: #ff6701;
  --orange-2: #ff8a2b;
  --text: #122033;
  --muted: #607086;
  --line: #e8edf3;
  --bg: #f7f9fc;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(6, 27, 43, 0.12);
  --radius: 24px;
}

/* --- Reset --- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Container --- */
.container {
  width: min(1270px, calc(100% - 40px));
  margin: 0 auto;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
}

h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 12px;
}

/* --- Eyebrow / Section Label --- */
.eyebrow,
.section-label {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 15px;
  border: 1px solid rgba(255, 103, 1, 0.75);
  border-radius: 999px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  box-shadow: 0 12px 30px rgba(255, 103, 1, 0.32);
}

.btn--ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.btn--light {
  border: 1px solid #cfd8e3;
  background: var(--white);
}

.btn--dark {
  color: var(--white);
  background: var(--navy);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1270px) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(232, 237, 243, 0.85);
  backdrop-filter: blur(16px);
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  display: block;
  width: auto;
  height: clamp(28px, 3.4vw, 38px);
}

/* --- Desktop Nav --- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--orange);
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-caret {
  position: relative;
  top: -1px;
  display: inline-block;
  width: 12px;
  height: 12px;
  font-size: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20d='M4%206l4%204%204-4'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20d='M4%206l4%204%204-4'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret {
  transform: rotate(180deg);
}

/* --- Dropdown --- */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(12px);
}

.dropdown a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.dropdown a:hover {
  background: var(--bg);
  color: var(--orange);
}

/* --- Language Switch --- */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.lang-switch__btn {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch__btn:hover {
  color: var(--navy);
}

.lang-switch__btn.is-active {
  color: var(--white);
  background: var(--navy);
}

/* --- Mobile Nav Toggle --- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--navy);
}

.nav-close {
  display: none;
}

/* --- Footer --- */
.footer {
  padding: 68px 0 30px;
  color: rgba(255, 255, 255, 0.78);
  background: radial-gradient(circle at 0 0, #103650, var(--navy) 45%, #03111c);
}

.logo--footer {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--white);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.1fr 0.8fr;
  gap: 48px;
}

.footer h3 {
  margin: 0 0 16px;
  color: var(--white);
}

.footer p {
  margin: 0 0 10px;
}

.footer a {
  display: block;
  margin-bottom: 10px;
}

.footer a:hover {
  color: var(--orange);
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  font-weight: 700;
}

.footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.footer__legal {
  max-width: 760px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* --- CTA Section --- */
.cta {
  padding: clamp(56px, 8vw, 80px) 0;
  background: var(--bg);
}

.cta__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}

.cta p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 400;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Responsive: 900px --- */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-header {
    backdrop-filter: none;
    will-change: auto;
  }

  .site-header::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(6, 27, 43, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s;
  }

  body.nav-open .site-header::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .site-nav {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(420px, calc(100% - 32px));
    max-height: 85vh;
    overflow-y: auto;
    padding: 56px 18px 20px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, calc(-50% - 24px));
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
  }

  .nav-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--navy);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .nav-close:hover {
    color: var(--orange);
    border-color: var(--orange);
  }

  .site-nav a {
    padding: 12px;
  }

  .lang-switch {
    align-self: flex-start;
    margin: 8px 0 4px 12px;
  }

  .nav-item {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-caret {
    display: none;
  }

  .dropdown {
    position: static;
    min-width: 0;
    margin: 0 0 4px 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dropdown::before {
    display: none;
  }

  .dropdown a {
    color: var(--muted);
  }

  .dropdown--chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px 12px;
  }

  .dropdown--chips a {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .dropdown--chips a:hover,
  .dropdown--chips a[aria-current="page"] {
    color: var(--orange);
    border-color: var(--orange);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta__grid {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Responsive: 640px --- */
@media (max-width: 640px) {
  .site-header {
    height: 68px;
    padding-inline: 14px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
  }
}
