/* ==========================================================================
   app.css — Global / Shared Styles for QuoteQ Presentation Website
   Loaded on EVERY page. Contains variables, reset, navigation, megamenu,
   mobile menu, buttons, footer, modal, section wrappers, CTA banner,
   background shapes, and shared responsive breakpoints.
   ========================================================================== */

/* ===== RESET ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #1142AE;
  --secondary: #1A9BFC;
  --dark: #040836;
  --accent: #FEC80E;
  --orange: #FF5C00;
  --white: #ffffff;
  --bg: #FAFBFE;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #536378;
  --gray-700: #334155;
  --gray-900: #0F172A;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-pill: 100px;
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Figtree', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== BASE TYPOGRAPHY ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
  background: #3a3a3a;
}

body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.65;
}

html.menu-open body {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--gray-900);
  line-height: 1.12;
}

/* ===== SHARED KEYFRAMES ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== BACKGROUND SHAPES / PARALLAX ===== */
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-parallax {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* Scroll-driven parallax — compositor-level, zero lag */
@keyframes parallaxUp18  { to { transform: translate3d(0, -380vh, 0); } }
@keyframes parallaxUp15  { to { transform: translate3d(0, -250vh, 0); } }
@keyframes parallaxUp14  { to { transform: translate3d(0, -200vh, 0); } }
@keyframes parallaxUp125 { to { transform: translate3d(0, -125vh, 0); } }
@keyframes parallaxDn06  { to { transform: translate3d(0,  165vh, 0); } }

.bg-parallax[data-speed="1.8"]  { animation: parallaxUp18  linear both; animation-timeline: scroll(root); }
.bg-parallax[data-speed="1.5"]  { animation: parallaxUp15  linear both; animation-timeline: scroll(root); }
.bg-parallax[data-speed="1.4"]  { animation: parallaxUp14  linear both; animation-timeline: scroll(root); }
.bg-parallax[data-speed="1.25"] { animation: parallaxUp125 linear both; animation-timeline: scroll(root); }
.bg-parallax[data-speed="0.6"]  { animation: parallaxDn06  linear both; animation-timeline: scroll(root); }

.bg-shape {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Shape A: DOMINANT -- full logo in bottom-right corner */
.bg-shape--a {
  width: min(680px, 55vw);
  height: min(680px, 55vw);
  bottom: 0%;
  left: 58%;
  animation: shapeRotateA 55s linear infinite -7s;
}
.bg-shape--a svg { opacity: .20; filter: blur(15px); }

/* Shape B: Secondary -- light-blue quarter, upper-left behind content */
.bg-shape--b {
  width: min(420px, 36vw);
  height: min(420px, 36vw);
  top: 10%;
  left: 12%;
  animation: shapeRotateB 80s linear infinite reverse -10s;
}
.bg-shape--b svg { opacity: .20; filter: blur(18px); }

/* Shape C: Depth fill -- yellow, center area */
.bg-shape--c {
  width: min(200px, 15vw);
  height: min(200px, 15vw);
  top: 88%;
  left: 4%;
  animation: shapeRotateC 150s linear infinite -50s;
}
.bg-shape--c svg { opacity: .3; filter: blur(5px); }

/* Shape D: Depth fill -- blue combo, upper-right area (home only but harmless globally) */
.bg-shape--d {
  width: min(260px, 22vw);
  height: min(260px, 22vw);
  top: 29%;
  left: 15%;
  animation: shapeRotateD 38s linear infinite reverse;
}
.bg-shape--d svg { opacity: .0; filter: blur(20px); }

/* Shape E: Extra logo -- upper-right gap filler */
.bg-shape--e {
  width: min(180px, 15vw);
  height: min(180px, 15vw);
  top: 3%;
  right: 40%;
  animation: shapeRotateE 52s linear infinite -15s;
}
.bg-shape--e svg { opacity: .0; filter: blur(3px); }

/* Shape F: Extra logo -- center-left gap filler */
.bg-shape--f {
  width: min(150px, 13vw);
  height: min(150px, 13vw);
  top: 50%;
  left: 45%;
  animation: shapeRotateF 46s linear infinite reverse -20s;
}
.bg-shape--f svg { opacity: .0; filter: blur(3px); }

@keyframes shapeRotateA { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shapeRotateB { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shapeRotateC { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shapeRotateD { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shapeRotateE { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shapeRotateF { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  padding: 1rem 0;
  background: rgba(250, 251, 254, .72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-out-expo), box-shadow .4s var(--ease-out-expo), background .4s var(--ease-out-expo);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

nav.scrolled {
  border-bottom-color: rgba(226, 232, 240, .6);
  box-shadow: 0 1px 20px rgba(17, 66, 174, .04);
}

.nav-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; position: relative; perspective: 200px; }
.logo-mark svg { width: 100%; height: 100%; overflow: visible; }
.logo-q1, .logo-q2, .logo-q3 { transform-origin: 17px 17px; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.logo:hover .logo-q3 { transform: translate(1px, -3px) scale(1.03) rotate(3deg) rotateY(4deg) rotateX(-3deg); }
.logo:hover .logo-q1 { transform: translate(2px, -6px) scale(1.10) rotate(5deg) rotateY(7deg) rotateX(-5deg); }
.logo:hover .logo-q2 { transform: translate(3px, -9px) scale(1.20) rotate(8deg) rotateY(10deg) rotateX(-8deg); }
.logo-wordmark {
  height: 34px;
  width: auto;
  margin-left: -38px;
  clip-path: inset(0 0 0 29%);
}
.logo-img { height: 34px; width: auto; transition: opacity .2s; }
.logo-img--footer { height: 24px; filter: brightness(0) invert(1); opacity: .7; }
.logo-img--footer:hover { opacity: 1; }

/* Nav links (desktop) */
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; height: 100%; }
.nav-item { height: 100%; display: flex; align-items: center; }
.nav-item > a {
  display: flex; align-items: center; gap: .3rem;
  padding: .5rem .9rem; font-size: .87rem; font-weight: 600;
  color: var(--gray-500); text-decoration: none;
  border-radius: var(--radius-sm); transition: color .15s;
  font-family: var(--font-head);
}
.nav-item > a:hover, .nav-item.active > a { color: var(--gray-900); }
.nav-item > a .chev { width: 12px; height: 12px; transition: transform .2s; opacity: .5; }
.nav-item.active > a .chev { transform: rotate(180deg); opacity: .8; }

/* Nav right */
.nav-right { display: flex; align-items: center; gap: .6rem; }

/* ===== MEGAMENU ===== */
.mega-wrap {
  position: fixed; top: 62px; left: 0; right: 0;
  display: flex; justify-content: center;
  padding: .6rem 2rem 0;
  pointer-events: none; z-index: 999;
}

.mega-panel {
  max-width: 780px; width: 100%;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(17, 66, 174, .08), 0 2px 8px rgba(0, 0, 0, .04);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  pointer-events: none; overflow: hidden;
}
.mega-panel.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

.mega-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }

/* Left: items */
.mega-items { padding: 1.2rem 1.2rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .1rem; justify-content: flex-start; }

.mega-link {
  display: flex; align-items: center; gap: .8rem;
  padding: .65rem .8rem; border-radius: var(--radius-sm);
  text-decoration: none; transition: background .15s; cursor: pointer;
}
.mega-link:hover { background: var(--gray-50); }
.mega-link.active { background: var(--gray-100); }
.mega-link-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico--blue { background: #EEF4FF; color: var(--primary); }
.ico--orange { background: #FFF0EC; color: var(--orange); }
.ico--yellow { background: #FFF7D6; color: #B8960A; }
.ico--green { background: #DCFCE7; color: #16A34A; }
.ico--purple { background: #F3E8FF; color: #7C3AED; }
.mega-link h4 { font-family: var(--font-head); font-size: .85rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1px; white-space: nowrap; }
.mega-link p { font-size: .7rem; color: var(--gray-400); line-height: 1.35; white-space: nowrap; }

/* Right: preview */
.mega-preview {
  background: var(--gray-50); border-left: 1px solid var(--gray-100);
  padding: 1.2rem; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.mega-preview-inner { display: flex; flex-direction: column; }
.mega-preview-visual {
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .8rem; position: relative; overflow: hidden;
  height: 150px; transition: background .3s;
}
.mega-preview-title { font-family: var(--font-head); font-size: .85rem; font-weight: 700; color: var(--gray-900); margin-bottom: .2rem; }
.mega-preview-desc { font-size: .75rem; color: var(--gray-500); line-height: 1.45; margin-bottom: .5rem; }
.mega-preview-link { font-family: var(--font-head); font-size: .78rem; font-weight: 700; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }

/* ===== BUTTONS ===== */
.btn-ghost {
  padding: .5rem 1.1rem; font-size: .87rem; font-weight: 600;
  color: var(--gray-700); background: none; border: none;
  cursor: pointer; font-family: var(--font-head); transition: color .2s;
  text-decoration: none;
}
.btn-ghost:hover { color: var(--primary); }

.btn-cta {
  padding: .7rem 1.5rem .8rem; border-radius: var(--radius-sm);
  font-size: .87rem; font-weight: 700; border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  cursor: pointer; font-family: var(--font-head); text-decoration: none;
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
  box-shadow: 0 2px 8px rgba(17, 66, 174, .15), 0 1px 2px rgba(0, 0, 0, .04);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0, 0, 0, .08), 0 10px 24px rgba(0, 0, 0, .06); }
.btn-cta--lg { padding: .9rem 2.2rem; font-size: 1rem; border-radius: var(--radius); gap: .5rem; display: inline-flex; align-items: center; text-decoration: none; }
.btn-cta--gradient { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); }

.btn-outline {
  padding: .8rem 2rem; border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  border: 2px solid var(--gray-200); background: var(--white);
  color: var(--gray-700); cursor: pointer; font-family: var(--font-head);
  transition: color .2s, border-color .2s, transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; z-index: 1002; position: relative;
  flex-direction: column; gap: 4px;
}
.hamburger span {
  display: block; width: 20px; height: 0;
  border-top: 3px solid var(--gray-700); transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ===== MOBILE FULLSCREEN MENU ===== */
.mobile-menu {
  position: fixed; top: 62px; left: 0; right: 0; z-index: 999;
  height: calc(100dvh - 62px);
  height: calc(100vh - 62px);
  background: rgba(250, 251, 254, .72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  visibility: hidden; opacity: 0;
  transform: translateX(40px);
  transition: transform .4s var(--ease-out-expo), opacity .3s, visibility .3s;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mobile-menu.open { visibility: visible; opacity: 1; transform: translateX(0); }

.mobile-menu-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: .8rem 0 2rem;
  -webkit-overflow-scrolling: touch;
}

/* Top-level nav items */
.mm-nav-item { margin: 0 .75rem; }
.mm-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.25rem .6rem;
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  color: var(--gray-900); text-decoration: none;
  cursor: pointer;
  transition: padding .35s var(--ease-out-expo), background .35s var(--ease-out-expo), border-radius .35s var(--ease-out-expo);
  -webkit-tap-highlight-color: transparent;
}
.mm-nav-link .mm-chev {
  width: 20px; height: 20px; stroke: var(--gray-400); stroke-width: 2;
  transition: transform .35s var(--ease-out-expo); flex-shrink: 0;
}
.mm-nav-item.open {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
}
.mm-nav-item.open .mm-nav-link .mm-chev { transform: rotate(180deg); }

/* Submenu panel */
.mm-submenu {
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease-out-expo);
}
.mm-submenu > .mm-submenu-inner { overflow: hidden; min-height: 0; }
.mm-nav-item.open .mm-submenu { grid-template-rows: 1fr; }
.mm-submenu-bg { padding: 0 .6rem .5rem; }

.mm-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .7rem; border-radius: var(--radius-sm);
  text-decoration: none; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.mm-link:active { background: rgba(0, 0, 0, .06); }
.mm-link-ico {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mm-link h4 {
  font-family: var(--font-head); font-size: .88rem; font-weight: 700;
  color: var(--gray-900); margin-bottom: 1px;
}
.mm-link p { font-size: .72rem; color: var(--gray-400); line-height: 1.35; }

/* Simple links (no submenu) */
.mm-simple-link {
  display: block; padding: .9rem 2rem;
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  color: var(--gray-900); text-decoration: none;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}

/* Bottom CTA area */
.mm-footer {
  flex-shrink: 0;
  padding: 1rem 2rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: .6rem;
  background: transparent;
  position: relative;
}
.mm-footer .btn-cta { width: 100%; justify-content: center; padding: .85rem 1.5rem; font-size: .95rem; }
.mm-footer .btn-ghost { width: 100%; text-align: center; padding: .6rem 1rem; font-size: .9rem; color: var(--gray-500); }
.mobile-overlay { display: none; }

/* ===== SECTION SHARED ===== */
.section-wrap { max-width: 1260px; margin: 0 auto; padding: 4rem 2rem; position: relative; z-index: 2; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .overline {
  font-family: var(--font-head); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px;
  color: var(--secondary); margin-bottom: .8rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800; letter-spacing: -1px; margin-bottom: .8rem;
}
.section-header p {
  color: var(--gray-500); max-width: 530px; margin: 0 auto;
  font-size: 1.02rem; line-height: 1.7;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--dark), #0e2460);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  text-align: center; color: var(--white);
  position: relative; overflow: hidden;
}
.cta-grid {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  grid-auto-rows: 48px;
}
.cta-grid-cell { border-right: 1px solid rgba(255, 255, 255, .03); border-bottom: 1px solid rgba(255, 255, 255, .03); }
.cta-grid-cell.lit { background: rgba(255, 255, 255, .025); }
.cta-grid-cell.lit2 { background: rgba(26, 155, 252, .04); }
.cta-grid-cell.lit3 { background: rgba(255, 255, 255, .04); }
.cta-grid-cell.bright-border { border-color: rgba(255, 255, 255, .07); }
.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800; letter-spacing: -1px;
  margin-bottom: .8rem; color: var(--white);
}
.cta-banner p {
  font-size: 1.05rem; color: rgba(255, 255, 255, .6);
  max-width: 480px; margin: 0 auto 2rem; line-height: 1.7;
}
.cta-banner .btn-cta {
  background: var(--white); color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}
.cta-banner .btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12), 0 10px 24px rgba(0, 0, 0, .10);
}

/* ===== INTEGRATIONS LOGOS ===== */
.integrations-logos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 1.5rem;
  align-items: center;
  justify-items: center;
}
.int-logo {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease-out-expo);
  cursor: default;
}
.int-logo:hover { transform: scale(1.1); }

/* ===== FOOTER ===== */
footer {
  color: var(--gray-500);
  max-width: 1260px; margin: 0 auto;
  padding: 0 2rem 2rem; position: relative; z-index: 2;
}
.footer-separator {
  height: 2px; background: var(--gray-200);
  border-radius: 1px; opacity: .6; mix-blend-mode: multiply;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem; padding: 4rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.footer-brand p { font-size: 1rem; color: var(--gray-500); line-height: 1.6; max-width: 300px; }
.footer-col h4 {
  font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  color: var(--gray-900); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a {
  color: var(--gray-500); text-decoration: none;
  font-size: .88rem; font-weight: 500; transition: color .2s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 2rem; padding-bottom: 0.5rem; flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: .75rem; color: var(--gray-500); }
.footer-legal { display: flex; gap: 1.5rem; list-style: none; }
.footer-legal a { color: var(--gray-500); text-decoration: none; font-size: .75rem; transition: color .2s; }
.footer-legal a:hover { color: var(--primary); }

/* ===== DEMO MODAL ===== */
html.modal-open { overflow: hidden; }
html.modal-open body { overflow: hidden; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4, 8, 54, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-card {
  background: var(--white); border-radius: var(--radius-lg);
  max-width: 740px; width: 100%; position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .15);
  transform: translateY(16px); transition: transform .35s var(--ease-out-expo);
  display: grid; grid-template-columns: 1fr 260px; overflow: hidden;
}
.modal-overlay.open .modal-card { transform: translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: rgba(255, 255, 255, .7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 1;
}
.modal-close:hover { background: var(--gray-100); }

.modal-body { padding: 2.5rem; }
.modal-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; color: var(--gray-900); margin-bottom: .4rem; }
.modal-desc { font-size: .9rem; color: var(--gray-500); line-height: 1.7; margin-bottom: 1.5rem; }
.modal-form { display: flex; flex-direction: column; gap: 1rem; }
.modal-form .form-group { display: flex; flex-direction: column; gap: .4rem; }
.modal-form label { font-family: var(--font-head); font-size: .82rem; font-weight: 700; color: var(--gray-900); }
.modal-form input {
  width: 100%; padding: .75rem 1rem; font-family: var(--font-body); font-size: .92rem;
  color: var(--gray-900); background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); outline: none; transition: border-color .2s, box-shadow .2s;
}
.modal-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(17, 66, 174, .1); }
.modal-form input::placeholder { color: var(--gray-400); }
.modal-form .form-submit {
  display: block; width: 100%; text-align: center;
  padding: .85rem 0; border-radius: var(--radius); font-size: .95rem; font-weight: 700;
  font-family: var(--font-head); cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: var(--white);
  border: none; box-shadow: 0 2px 8px rgba(17, 66, 174, .15);
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo); line-height: 1;
}
.modal-form .form-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(17, 66, 174, .2); }

.modal-hint {
  font-size: .78rem; color: var(--gray-400); line-height: 1.5; text-align: center; margin-top: .3rem;
}

.modal-preview {
  background: linear-gradient(135deg, #EEF4FF, #DBEAFE);
  display: flex; align-items: center; justify-content: flex-start;
  padding: 2rem 0 2rem 1.5rem; overflow: hidden;
}
.modal-preview-offer {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none;
  display: flex; min-width: 320px;
  box-shadow: -4px 8px 32px rgba(17, 66, 174, .08);
}
.mp-sidebar {
  width: 100px; min-width: 100px;
  background: linear-gradient(160deg, var(--dark), #0e2460);
  padding: .8rem .7rem; display: flex; flex-direction: column;
  color: rgba(255, 255, 255, .9); border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.mp-sidebar-logo { width: 22px; height: 22px; margin-bottom: .8rem; opacity: .9; }
.mp-sidebar-title { font-family: var(--font-head); font-size: .58rem; font-weight: 800; color: var(--white); line-height: 1.25; margin-bottom: .3rem; }
.mp-sidebar-sub { font-size: .42rem; color: rgba(255, 255, 255, .45); line-height: 1.5; }
.mp-main { flex: 1; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .35rem; background: var(--gray-50); }
.mp-main-title { font-family: var(--font-head); font-size: .58rem; font-weight: 700; color: var(--gray-900); }
.mp-main-text { font-size: .44rem; color: var(--gray-500); line-height: 1.5; }
.mp-row { display: flex; justify-content: space-between; font-size: .44rem; padding: .15rem 0; border-bottom: 1px solid var(--gray-100); }
.mp-row-name { color: var(--gray-700); }
.mp-row-price { color: var(--gray-900); font-weight: 700; font-family: var(--font-head); }
.mp-total { display: flex; justify-content: space-between; padding: .25rem 0 0; border-top: 1.5px solid var(--gray-200); font-family: var(--font-head); font-weight: 800; font-size: .52rem; }
.mp-total-val { color: var(--primary); }

.modal-success { display: none; text-align: center; padding: 1rem 0; }
.modal-success.visible { display: block; }
.modal-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #DCFCE7; color: #16A34A;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.modal-success h3 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; margin-bottom: .4rem; }
.modal-success p { font-size: .88rem; color: var(--gray-500); line-height: 1.6; }

/* ===== SHARED FORM ELEMENTS ===== */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
  font-family: var(--font-head); font-size: .82rem; font-weight: 700;
  color: var(--gray-900);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  line-height: 1.5;
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2394A3B8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 66, 174, .1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-400); }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-check {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .82rem; color: var(--gray-500); line-height: 1.5; cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0;
  accent-color: var(--primary); cursor: pointer;
}
.form-check a { color: var(--primary); text-decoration: none; }
.form-check a:hover { text-decoration: underline; }

.form-submit {
  display: block; width: 100%; text-align: center;
  padding: .9rem 0; border-radius: var(--radius); font-size: .95rem; font-weight: 700;
  font-family: var(--font-head); cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: var(--white);
  border: none;
  box-shadow: 0 2px 8px rgba(17, 66, 174, .15);
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
  line-height: 1;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(17, 66, 174, .2); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== SPINNER ===== */
.submit-spinner { display: inline-flex; align-items: center; justify-content: center; }
.submit-spinner svg { animation: spin .8s linear infinite; stroke: var(--white); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.form-success { display: none; text-align: center; padding: 2rem; }
.form-success.visible { display: block; }
.form-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #DCFCE7; color: #16A34A;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.form-success h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .5rem; }
.form-success p { font-size: .92rem; color: var(--gray-500); line-height: 1.6; }

/* ===== RESPONSIVE — GLOBAL ===== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .modal-card { grid-template-columns: 1fr; max-width: 440px; }
  .modal-preview { display: none; }
}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .cta-banner { padding: 3rem 1.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
}

@media (max-width: 700px) {
  .section-wrap { padding: 3rem 1.2rem; }
  .section-header { margin-bottom: 2rem; }
  .section-header h2 { font-size: 1.6rem; }
  .section-header p { font-size: .92rem; }
  .modal-card { grid-template-columns: 1fr; max-width: 440px; }
  .modal-preview { display: none; }
  .modal-body { padding: 1.5rem; }
  .modal-title { font-size: 1.05rem; }
  .modal-desc { font-size: .85rem; margin-bottom: 1rem; }
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .nav-right { display: none; }
}

@media (max-width: 600px) {
  .mm-footer .btn-cta { font-size: .85rem; }
}

@media (max-width: 480px) {
  .bg-shape--b { left: 2%; }
}
