:root {
  --mg-bg: #0b1118;
  --mg-bg-soft: #121a24;
  --mg-text: #f4f7fa;
  --mg-muted: #9aa8b6;
  --mg-accent: #ff6b2b;
  --mg-accent-hover: #e85a1c;
  --mg-line: rgba(255, 255, 255, 0.08);
  --mg-font: "Inter", "Segoe UI", system-ui, sans-serif;
  --mg-typewriter: "Special Elite", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.mg-landing {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--mg-text);
  background: var(--mg-bg);
  font-family: var(--mg-font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

.mg-landing-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: #fff;
  color: #000;
}

.mg-landing-skip:focus {
  left: 12px;
  top: 12px;
}

.mg-landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(255, 107, 43, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(83, 104, 114, 0.18), transparent 50%),
    linear-gradient(165deg, #0b1118 0%, #0f1620 45%, #0b1118 100%);
}

.mg-landing-lines {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.mg-landing-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 48px);
  padding-top: max(20px, env(safe-area-inset-top, 0));
}

.mg-landing-brand img {
  display: block;
  height: 36px;
  width: auto;
}

.mg-landing-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mg-landing-nav-link {
  color: var(--mg-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 4px;
}

.mg-landing-nav-link:hover {
  color: var(--mg-accent);
}

.mg-landing-nav-btn,
.mg-landing-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mg-landing-nav-btn,
.mg-landing-btn-primary {
  background: var(--mg-accent);
  color: #fff;
}

.mg-landing-nav-btn:hover,
.mg-landing-btn-primary:hover {
  background: var(--mg-accent-hover);
}

.mg-landing-btn-ghost {
  background: transparent;
  color: var(--mg-text);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.mg-landing-btn-ghost:hover {
  border-color: var(--mg-accent);
  color: var(--mg-accent);
}

.mg-landing-btn-block {
  width: 100%;
}

.mg-landing-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 160px);
  min-height: calc(100dvh - 160px);
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  padding: 24px clamp(20px, 4vw, 48px) 120px;
}

.mg-landing-copy {
  max-width: 640px;
  margin-left: auto;
  padding-right: clamp(0px, 8vw, 80px);
}

.mg-landing-eyebrow {
  margin: 0 0 16px;
  color: var(--mg-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mg-landing-headline {
  margin: 0;
  font-family: var(--mg-typewriter);
  font-size: clamp(1.35rem, 4.5vw, 2.35rem);
  font-weight: 400;
  line-height: 1.45;
  min-height: 5.5em;
  white-space: pre-line;
}

.mg-typewriter-text {
  white-space: pre-line;
}

.mg-typewriter-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: var(--mg-accent);
  animation: mg-landing-blink 0.95s step-end infinite;
}

.mg-typewriter.is-done .mg-typewriter-cursor {
  opacity: 0.75;
}

@keyframes mg-landing-blink {
  50% { opacity: 0; }
}

.mg-landing-lead {
  margin: 0 0 28px;
  color: var(--mg-muted);
  font-size: clamp(15px, 2.2vw, 17px);
  max-width: 52ch;
}

.mg-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mg-landing-logo-mark {
  position: fixed;
  left: clamp(12px, 3vw, 40px);
  bottom: clamp(120px, 22vh, 260px);
  z-index: 2;
  pointer-events: none;
  max-width: min(52vw, 420px);
  opacity: 0.95;
}

.mg-landing-logo-mark img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(255, 107, 43, 0.25));
}

.mg-landing-footer {
  position: relative;
  z-index: 2;
  padding: 16px clamp(20px, 4vw, 48px) max(20px, env(safe-area-inset-bottom, 0));
  color: var(--mg-muted);
  font-size: 12px;
}

.mg-landing-footer p {
  margin: 0;
}

.mg-landing-footer-link,
.mg-landing-footer-link:visited {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mg-landing-footer-link:hover,
.mg-landing-footer-link:focus-visible {
  color: #fff;
}

.mg-landing-muted {
  color: #5c6b7a;
  font-size: 14px;
}

/* Modal */
.mg-landing-modal[hidden] {
  display: none;
}

.mg-landing-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.mg-landing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(4px);
}

.mg-landing-modal-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #1c2830;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.mg-landing-modal-head {
  flex-shrink: 0;
}

.mg-landing-modal-panel h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.mg-landing-modal-lead {
  margin: 0 0 16px;
  color: #5c6b7a;
  font-size: 14px;
}

.mg-landing-form {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.mg-landing-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eef2f5;
  color: #1c2830;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mg-landing-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #5c6b7a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mg-landing-field input,
.mg-landing-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dde4ea;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}

.mg-landing-field-check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-transform: none;
  font-size: 14px;
  font-weight: 500;
  color: #1c2830;
}

.mg-landing-field-check input {
  width: auto;
  margin-top: 3px;
}

.mg-landing-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.mg-landing-form-status {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.mg-landing-form-status.is-error {
  background: #fdeaea;
  color: #962b2b;
}

.mg-landing-form-status.is-success {
  background: #e7f6ed;
  color: #175b34;
}

@media (min-width: 900px) {
  .mg-landing-main {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }

  .mg-landing-copy {
    margin-left: auto;
    margin-right: clamp(80px, 12vw, 180px);
  }

  .mg-landing-logo-mark {
    max-width: min(38vw, 520px);
  }
}

@media (max-width: 640px) {
  .mg-landing-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mg-landing-nav {
    width: 100%;
    justify-content: space-between;
  }

  .mg-landing-copy {
    margin-left: 0;
    padding-right: 0;
    padding-bottom: 48px;
  }

  .mg-landing-logo-mark {
    max-width: 70vw;
    bottom: clamp(100px, 18vh, 200px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-typewriter-cursor {
    animation: none;
  }
}

body.mg-landing.mg-privacy-modal-open {
  overflow: hidden;
}

.mg-landing .mg-privacy-modal[hidden] {
  display: none;
}

.mg-landing .mg-privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.mg-landing .mg-privacy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.78);
  backdrop-filter: blur(4px);
}

.mg-landing .mg-privacy-modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1c2830;
  border-radius: 14px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
}

.mg-landing .mg-privacy-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eef2f5;
  color: #1c2830;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mg-landing .mg-privacy-modal-title {
  margin: 0;
  padding: 24px 56px 0 28px;
  font-size: 1.45rem;
}

.mg-landing .mg-privacy-modal-lead {
  margin: 8px 0 0;
  padding: 0 28px 16px;
  color: #5c6b7a;
  font-size: 14px;
  border-bottom: 1px solid #e2e8ee;
}

.mg-landing .mg-privacy-modal-body {
  overflow: auto;
  padding: 20px 28px 28px;
  font-size: 14px;
  line-height: 1.55;
}

.mg-landing .mg-privacy-modal-body .mg-h2,
.mg-landing .mg-privacy-modal-body .mg-h3 {
  margin-top: 1.4em;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1c2830;
}

.mg-landing .mg-privacy-modal-body .mg-h3 {
  font-size: 0.95rem;
  margin-top: 1em;
}
