/* MMU Connect - shared foundation: tokens, layout, nav, buttons, forms, cards, toast, modal, footer */

:root {
  --bg: #050b1f;
  --bg2: #0a1736;
  --card: #0e1d42;
  --line: rgba(255, 255, 255, .1);
  --green: #22e58b;
  --blue: #2f7bff;
  --gold: #d7b56d;
  --rose: #bc7183;
  --text: #fff;
  --muted: #a9b6d3;
  --danger: #ff5d73;
  --r: 18px;
  --grad: linear-gradient(135deg, var(--green), var(--gold));
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { color: var(--muted); }

.container { width: min(1140px, 92%); margin-inline: auto; }
.section { padding: 84px 0; }
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head p { margin-top: 10px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--green);
  color: #04101f;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 8px; }

::selection { background: rgba(215, 181, 109, .3); color: #fff; }

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

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 11, 31, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
}
.logo svg { width: 34px; height: 34px; }
.logo b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: #fff; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #04101f;
  box-shadow: 0 8px 24px rgba(34, 229, 139, .28);
}
.btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: var(--line);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Cards and badges */
.card {
  background: linear-gradient(160deg, var(--card), #0a1636);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
}
.grid { display: grid; gap: 20px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: rgba(34, 229, 139, .14);
  color: var(--green);
  border: 1px solid rgba(34, 229, 139, .3);
}
.badge-blue {
  background: rgba(47, 123, 255, .14);
  color: #7fb0ff;
  border-color: rgba(47, 123, 255, .35);
}
.demo-note {
  background: rgba(255, 193, 7, .1);
  border: 1px solid rgba(255, 193, 7, .35);
  color: #ffd866;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .9rem;
}

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%;
  background: #081330;
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
}
.field input:focus, .field select:focus { border-color: var(--green); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: .84rem; min-height: 1.1em; }
.pw { position: relative; }
.pw input { padding-right: 70px; }
.pw button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  padding: 8px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.check input {
  margin-top: 5px;
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}

/* Toast and modal */
#toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 10px;
  z-index: 200;
}
.toast {
  background: #10224d;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 340px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  animation: tin .3s ease;
}
.toast.error { border-left-color: var(--danger); }
@keyframes tin {
  from { opacity: 0; transform: translateY(10px); }
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, .75);
  display: none;
  place-items: center;
  z-index: 150;
  padding: 16px;
}
.modal.open { display: grid; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  max-width: 440px;
  width: 100%;
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, .03);
}
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--green); font-size: 1.3rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 28px;
  background: #040918;
}
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; padding: 0; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: #fff; }
.copy { margin-top: 24px; font-size: .85rem; }

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