/**
 * @file
 * MX2 landing site theme styles (ported from the approved design source).
 */

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

:root {
  --navy:     #0A2846;
  --app-blue: #0A4696;
  --yellow:   #FAE600;
  --yellow-dk:#D4C300;
  --bg:       #F0F0FA;
  --white:    #FFFFFF;
  --muted:    #5A6478;
  --border:   #D0D5EC;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  color: var(--navy);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  /* Match the Figma rendering: default (subpixel) smoothing renders Barlow
     noticeably heavier/bulkier on macOS/Retina than the antialiased preview.
     These make on-screen weight match the design without altering any
     font-size or font-weight value. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--yellow);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 62px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 16px;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  display: block;
}

.nav-logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--white);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.nav-logo-text .dot { color: rgba(255,255,255,0.35); margin: 0 5px; }
.nav-logo-text .mx2 { color: var(--yellow); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  letter-spacing: 0.02em;
  border-radius: 3px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.07); }

.nav-cta { margin-left: auto; flex-shrink: 0; }

.nav-cta a {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.18s;
}

.nav-cta a:hover { background: var(--yellow-dk); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── SHARED ── */
.section { padding: 96px 24px; }
.section-inner { max-width: 1140px; margin: 0 auto; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--app-blue);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 3px;
  margin-bottom: 20px;
}

.section-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.0;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}

/* ── HERO ── */
#hero {
  background: var(--navy);
  padding: 88px 24px 104px;
}

.hero-inner { max-width: 1140px; margin: 0 auto; }

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--yellow);
}

.hero-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(90px, 20vw, 200px);
  line-height: 0.88;
  color: var(--yellow);
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.hero-subhead {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,0.68);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 64px;
}

.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 48px;
  gap: 32px;
}

.stat-figure {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(38px, 5vw, 56px);
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

/* ── THE GAP ── */
#gap { background: var(--bg); }

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.col-header {
  padding: 16px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.col-header.industry { background: #E0E1EC; color: var(--muted); border-right: 1px solid var(--border); }
.col-header.mm { background: var(--app-blue); color: var(--yellow); }

.comp-cell {
  padding: 24px 28px;
  font-size: 15px;
  line-height: 1.65;
  border-top: 1px solid var(--border);
}

.comp-cell.industry { background: var(--white); color: var(--muted); border-right: 1px solid var(--border); }
.comp-cell.mm { background: #EDF0FA; color: var(--navy); font-weight: 500; }
.comp-cell em { font-style: italic; font-size: 13px; color: #8090A8; display: block; margin-top: 6px; }

/* ── PULL QUOTE ── */
.pull-quote-section { background: var(--app-blue); padding: 80px 24px; }
.pull-quote-inner { max-width: 800px; margin: 0 auto; }

blockquote {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.38;
  color: var(--white);
  font-style: italic;
  margin-bottom: 24px;
  padding-left: 24px;
  position: relative;
}

blockquote::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--yellow);
  border-radius: 2px;
}

.quote-attr {
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── PLATFORM ── */
#platform { background: var(--white); }

.products-grid {
  display: grid;
  /* Exactly two equal columns (2x2 for the four products), not auto-fit —
     avoids a 3-across row with an empty trailing cell. Collapses to 1 column
     on narrow screens via the responsive rule below. */
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.product-card { background: var(--white); padding: 32px 28px; transition: background 0.18s; }
.product-card:hover { background: var(--bg); }

.product-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-name::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 1px;
  flex-shrink: 0;
}

.product-desc { font-size: 14px; color: var(--muted); line-height: 1.65; }
.products-intro { font-size: 17px; color: var(--navy); line-height: 1.6; max-width: 700px; margin-bottom: 32px; }

/* ── CONTEXT ── */
#context { background: var(--bg); }

.context-body { font-size: 17px; line-height: 1.8; color: var(--navy); max-width: 700px; margin-bottom: 48px; }
.context-body p + p { margin-top: 18px; }

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.status-table th {
  text-align: left;
  padding: 14px 20px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  background: var(--navy);
}

.status-table td { padding: 16px 20px; border-top: 1px solid var(--border); line-height: 1.5; vertical-align: top; }
.status-table td:first-child { font-weight: 700; color: var(--app-blue); width: 220px; background: #F7F7FC; font-size: 14px; }

/* ── 2027 ── */
#next { background: var(--navy); }
#next .section-label { color: var(--yellow); border-bottom-color: rgba(250,230,0,0.3); }
#next .section-headline { color: var(--white); }

.next-body { font-size: 17px; line-height: 1.8; color: rgba(255,255,255,0.65); max-width: 660px; margin-bottom: 48px; }
.next-body p + p { margin-top: 18px; }

.callout-card { background: var(--yellow); border-radius: 4px; padding: 40px 44px; max-width: 700px; }
.callout-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); margin-bottom: 10px; }
.callout-card h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 32px; color: var(--navy); margin-bottom: 16px; line-height: 1.05; }
.callout-card p { font-size: 15px; line-height: 1.65; color: var(--navy); margin-bottom: 10px; }
.callout-warning { margin-top: 22px; padding-top: 20px; border-top: 2px solid rgba(10,40,70,0.18); font-size: 15px; font-weight: 700; color: var(--navy); }

/* ── FORM ── */
#access {
  background: var(--bg);
  padding: 96px 24px;
}

#access .section-label { color: var(--app-blue); border-bottom-color: var(--yellow); }
#access .section-headline { color: var(--navy); margin-bottom: 12px; }

.form-subhead {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.65;
}

.access-form {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.18s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230A2846' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--app-blue);
  box-shadow: 0 0 0 3px rgba(10,70,150,0.1);
}

.form-field textarea { resize: vertical; min-height: 100px; }

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--navy);
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.18s, transform 0.12s;
  align-self: flex-start;
}

.form-submit:hover { background: var(--yellow-dk); }
.form-submit:active { transform: scale(0.98); }

.form-submit svg { flex-shrink: 0; }

.form-disclaimer {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.form-success {
  display: none;
  background: var(--navy);
  color: var(--white);
  border-radius: 4px;
  padding: 32px 36px;
  max-width: 620px;
}

.form-success h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: var(--yellow);
  margin-bottom: 10px;
}

.form-success p { font-size: 15px; color: rgba(255,255,255,0.75); }

/* ── SUCCESS / STATUS BANNER (top of page, on-brand) ── */
.mx2-message-banner {
  /* Full-width confirmation bar at the very top of the page, above the sticky
     nav. Not sticky itself, so it scrolls away naturally as the user reads on. */
  position: relative;
  z-index: 101;
  background: var(--yellow);
  border-bottom: 3px solid var(--navy);
  animation: mx2BannerDrop 0.4s ease;
}

@keyframes mx2BannerDrop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .mx2-message-banner { animation: none; }
}

.mx2-message-banner__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Error variant: red bar for a failed send. */
.mx2-message-banner--error {
  background: #C0392B;
  border-bottom-color: #7A2018;
}

.mx2-message-banner--error .mx2-message-banner__text {
  color: #FFFFFF;
}

.mx2-message-banner--error .mx2-message-banner__close {
  color: #FFFFFF;
}

.mx2-message-banner__text {
  margin: 0;
  padding: 0;
  color: #0A0A0A;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(17px, 2.2vw, 22px);
  letter-spacing: 0.01em;
  line-height: 1.25;
}

/* ── SUBMIT BUTTON LOADING STATE (disable + spinner) ── */
.form-submit.is-loading,
.form-submit[disabled] {
  cursor: wait;
  opacity: 0.85;
  pointer-events: none;
}

/* Spinner is a real element the JS inserts next to the submit input, since an
   <input> can hold neither pseudo-elements nor an animated background. */
.mx2-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  vertical-align: middle;
  border: 2px solid rgba(10, 40, 70, 0.25);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: mx2Spin 0.6s linear infinite;
}

@keyframes mx2Spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mx2-spinner { animation-duration: 1.6s; }
}

/* ── INLINE FORM ERRORS (on-brand) ── */
.form-item--error input,
.form-item--error textarea,
input.error,
textarea.error {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.form-item--error-message,
.messages--error {
  margin-top: 6px;
  color: #C0392B;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.mx2-message-banner__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #0A0A0A;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.mx2-message-banner__close:hover { opacity: 1; }

@media (max-width: 820px) {
  .mx2-message-banner__inner { padding: 13px 20px; }
}

/* ── FOOTER ── */
footer {
  background: var(--navy);
  border-top: 3px solid var(--yellow);
  padding: 36px 24px;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--white);
}

.footer-brand img { width: 28px; height: 28px; }
.footer-brand .mx2 { color: var(--yellow); }
.footer-meta { font-size: 13px; color: rgba(255,255,255,0.38); }

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 65px; left: 0; right: 0;
    background: var(--navy);
    border-bottom: 3px solid var(--yellow);
    padding: 10px 0 16px;
    z-index: 99;
  }
  .nav-links.open a { padding: 13px 24px; font-size: 15px; }
  .nav-toggle { display: flex; }

  .section { padding: 60px 20px; }
  #hero { padding: 64px 20px 80px; }
  .pull-quote-section { padding: 56px 20px; }
  #access { padding: 60px 20px; }

  .stat-bar { grid-template-columns: 1fr 1fr; gap: 36px 24px; }

  .comparison-grid { grid-template-columns: 1fr; }
  .col-header.industry { border-right: none; }
  .comp-cell.industry { border-right: none; }
  .comp-cell.mm { border-top: 3px solid var(--app-blue); }

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

  .callout-card { padding: 28px 24px; }

  .status-table td:first-child { width: 130px; }

  .form-row { grid-template-columns: 1fr; }
}

/* Hero entrance */
.hero-inner > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.55s ease forwards;
}
.hero-eyebrow  { animation-delay: 0.15s; }
.hero-headline { animation-delay: 0.28s; }
.hero-subhead  { animation-delay: 0.4s; }
.stat-bar      { animation-delay: 0.52s; }

@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-inner > * { animation: none; opacity: 1; transform: none; }
}
