/* ==========================================================================
   legacy.css — Standalone stylesheet for the legacy morSystem website.
   Completely isolated from the new design system (no tokens, no layers).
   All Tailwind classes translated to handwritten CSS.
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

.legacy-html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legacy-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: #1e293b;
  background: #fff;
  line-height: 1.5;
}

.legacy-body main { flex: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; }

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

/* ---------- Container ---------- */
.legacy-container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px)  { .legacy-container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .legacy-container { padding-inline: 2rem; } }

/* ---------- Buttons ---------- */
.legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.legacy-btn:focus-visible {
  outline: 2px solid;
  outline-offset: 2px;
}

.legacy-btn--slate {
  background: #0f172a;
  color: #fff;
}
.legacy-btn--slate:hover { background: #334155; color: #f1f5f9; }
.legacy-btn--slate:active { background: #1e293b; color: #cbd5e1; }
.legacy-btn--slate:focus-visible { outline-color: #0f172a; }

.legacy-btn--blue {
  background: #2563eb;
  color: #fff;
}
.legacy-btn--blue:hover { background: #3b82f6; color: #f1f5f9; }
.legacy-btn--blue:active { background: #1e40af; color: #dbeafe; }
.legacy-btn--blue:focus-visible { outline-color: #2563eb; }

.legacy-btn--white {
  background: #fff;
  color: #0f172a;
}
.legacy-btn--white:hover { background: #eff6ff; }
.legacy-btn--white:active { background: #bfdbfe; color: #475569; }
.legacy-btn--white:focus-visible { outline-color: #fff; }

.legacy-btn--outline-white {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px #334155;
}
.legacy-btn--outline-white:hover { box-shadow: inset 0 0 0 1px #64748b; }
.legacy-btn--outline-white:active { box-shadow: inset 0 0 0 1px #334155; color: #94a3b8; }
.legacy-btn--outline-white:focus-visible { outline-color: #fff; }

/* ---------- Logo ---------- */
.legacy-logo {
  height: 2.5rem;
  width: auto;
}
.legacy-logo--centered {
  margin-inline: auto;
}

/* ---------- Header / Nav ---------- */
.legacy-header {
  padding-block: 2.5rem;
}

.legacy-nav {
  position: relative;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legacy-nav__left {
  display: flex;
  align-items: center;
}
@media (min-width: 768px) { .legacy-nav__left { gap: 3rem; } }

.legacy-nav__links {
  display: none;
}
@media (min-width: 768px) {
  .legacy-nav__links {
    display: flex;
    gap: 1.5rem;
  }
}

.legacy-nav-link {
  display: inline-block;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: #334155;
  text-decoration: none;
}
.legacy-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.legacy-nav__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
@media (min-width: 768px) { .legacy-nav__right { gap: 2rem; } }

/* Mobile menu */
.legacy-mobile-menu-toggle {
  margin-right: -0.25rem;
}
@media (min-width: 768px) { .legacy-mobile-menu-toggle { display: none; } }

.legacy-mobile-menu-btn {
  position: relative;
  z-index: 10;
  display: flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.legacy-mobile-menu-icon {
  width: 0.875rem;
  height: 0.875rem;
  overflow: visible;
  stroke: #334155;
}

.legacy-mobile-menu-icon__close {
  display: none;
}

.legacy-mobile-nav[hidden] { display: none; }

.legacy-mobile-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgb(148 163 184 / 0.5);
  z-index: 40;
}

.legacy-mobile-nav__panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: #0f172a;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  outline: 1px solid rgb(15 23 42 / 0.05);
  z-index: 50;
}

.legacy-mobile-nav__link {
  display: block;
  width: 100%;
  padding: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.legacy-mobile-nav__link:hover { background: #f1f5f9; border-radius: 0.5rem; }

.legacy-mobile-nav__divider {
  margin: 0.5rem;
  border: none;
  border-top: 1px solid rgb(203 213 225 / 0.4);
}

/* ---------- Footer ---------- */
.legacy-footer {
  background: #f8fafc;
}

.legacy-footer__top {
  padding-block: 4rem;
}

.legacy-footer__nav {
  margin-top: 2.5rem;
  font-size: 0.875rem;
}

.legacy-footer__nav-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-block: -0.25rem;
}

.legacy-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid rgb(148 163 184 / 0.1);
  padding-block: 2.5rem;
}
@media (min-width: 640px) {
  .legacy-footer__bottom {
    flex-direction: row-reverse;
    justify-content: space-between;
  }
}

.legacy-footer__legal-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.legacy-footer__legal-link {
  text-decoration: none;
  color: inherit;
}
.legacy-footer__legal-link:hover { text-decoration: underline; }

.legacy-footer__copyright {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #64748b;
}
@media (min-width: 640px) { .legacy-footer__copyright { margin-top: 0; } }

/* ---------- Hero ---------- */
.legacy-hero {
  padding-bottom: 4rem;
  padding-top: 5rem;
  text-align: center;
}
@media (min-width: 1024px) { .legacy-hero { padding-top: 8rem; } }

.legacy-hero__inner {
  max-width: 80rem;
}

.legacy-hero__title {
  max-width: 56rem;
  margin-inline: auto;
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #0f172a;
  line-height: 1.1;
}
@media (min-width: 640px) { .legacy-hero__title { font-size: 4.5rem; } }

.legacy-hero__highlight {
  position: relative;
  white-space: nowrap;
  color: #2563eb;
}

.legacy-hero__underline {
  position: absolute;
  left: 0;
  top: 66.7%;
  height: 0.58em;
  width: 100%;
  fill: rgb(147 197 253 / 0.7);
}

.legacy-hero__highlight-text { position: relative; }

.legacy-hero__description {
  max-width: 42rem;
  margin-inline: auto;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: #334155;
}

.legacy-hero__actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* ---------- Service Sections (Development, Upgrade, Support) ---------- */
.legacy-service-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  padding: 6rem 1.5rem;
}
@media (min-width: 640px) { .legacy-service-section { padding-block: 8rem; } }
@media (min-width: 1024px) { .legacy-service-section { overflow: visible; padding-inline: 0; } }

.legacy-service-section__bg-pattern {
  position: absolute;
  inset: 0;
  z-index: -10;
  overflow: hidden;
}

.legacy-service-section__grid-svg {
  position: absolute;
  left: max(50%, 25rem);
  top: 0;
  height: 64rem;
  width: 128rem;
  transform: translateX(-50%);
  stroke: #e5e7eb;
  mask-image: radial-gradient(64rem 64rem at top, white, transparent);
}

.legacy-service-section__grid-fill {
  overflow: visible;
  fill: #f9fafb;
}

.legacy-service-section__grid {
  max-width: 42rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem 2rem;
  padding-inline: 1.5rem;
}
@media (min-width: 640px) {
  .legacy-service-section__grid { gap: 5rem 2rem; }
}
@media (min-width: 1024px) {
  .legacy-service-section__grid {
    max-width: 80rem;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 1rem 2rem;
    padding-inline: 2rem;
  }
}

.legacy-service-section__header {
  grid-column: 1 / -1;
}
@media (min-width: 1024px) {
  .legacy-service-section__header {
    grid-column: 1 / 2;
    grid-row: 1;
    padding-right: 2rem;
    padding-top: 1rem;
  }
}

.legacy-service-section__label {
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 600;
  color: #4f46e5;
}

.legacy-service-section__title {
  margin-top: 0.5rem;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #111827;
  text-wrap: pretty;
}
@media (min-width: 640px) { .legacy-service-section__title { font-size: 3rem; } }

.legacy-service-section__image-wrapper {
  margin-left: -3rem;
  margin-top: -3rem;
  padding: 3rem;
}
@media (min-width: 1024px) {
  .legacy-service-section__image-wrapper {
    position: sticky;
    top: 1rem;
    grid-column: 2;
    grid-row: 1 / span 2;
    overflow: hidden;
  }
}

.legacy-service-section__image {
  width: 48rem;
  max-width: none;
  border-radius: 0.75rem;
  background: #111827;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  outline: 1px solid rgb(156 163 175 / 0.1);
}
@media (min-width: 640px) { .legacy-service-section__image { width: 57rem; } }

.legacy-service-section__content {
  grid-column: 1 / -1;
}
@media (min-width: 1024px) {
  .legacy-service-section__content {
    grid-column: 1 / 2;
    grid-row: 2;
    padding-right: 2rem;
  }
}

.legacy-service-section__content-text {
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #374151;
}
@media (min-width: 1024px) { .legacy-service-section__content-text { max-width: 32rem; } }

.legacy-service-section__features {
  margin-top: 2rem;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  color: #4b5563;
}

.legacy-service-section__feature {
  display: flex;
  gap: 0.75rem;
}
.legacy-service-section__feature strong {
  font-weight: 600;
  color: #111827;
}

.legacy-service-section__feature-icon {
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: #4f46e5;
}

.legacy-service-section__subtitle {
  margin-top: 4rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #111827;
}

.legacy-service-section__cta-text {
  margin-top: 1.5rem;
}
.legacy-service-section__cta-text a { text-decoration: underline; }

.legacy-service-section__cta {
  margin-top: 2rem;
  text-align: center;
}

/* ---------- Contact Form ---------- */
.legacy-contact {
  position: relative;
  isolation: isolate;
  background: #fff;
}

.legacy-contact__grid {
  max-width: 80rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .legacy-contact__grid { grid-template-columns: repeat(2, 1fr); } }

.legacy-contact__info {
  position: relative;
  padding: 6rem 1.5rem 5rem;
}
@media (min-width: 640px) { .legacy-contact__info { padding-top: 8rem; } }
@media (min-width: 1024px) {
  .legacy-contact__info {
    position: static;
    padding: 12rem 2rem;
  }
}

.legacy-contact__info-inner {
  max-width: 36rem;
  margin-inline: auto;
}
@media (min-width: 1024px) { .legacy-contact__info-inner { margin-inline: 0; max-width: 32rem; } }

.legacy-contact__info-bg {
  position: absolute;
  inset-block: 0;
  left: 0;
  z-index: -10;
  width: 100%;
  overflow: hidden;
  background: #f3f4f6;
  outline: 1px solid rgb(17 24 39 / 0.1);
}
@media (min-width: 1024px) { .legacy-contact__info-bg { width: 50%; } }

.legacy-contact__info-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: #e5e7eb;
  mask-image: radial-gradient(100% 100% at top right, white, transparent);
}

.legacy-contact__info-pattern-fill {
  overflow: visible;
  fill: #f9fafb;
}

.legacy-contact__title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #111827;
}

.legacy-contact__description {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 2;
  color: #4b5563;
}

.legacy-contact__details {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #4b5563;
}

.legacy-contact__detail {
  display: flex;
  gap: 1rem;
}
.legacy-contact__detail dt { flex-shrink: 0; }

.legacy-contact__detail-icon {
  width: 1.5rem;
  height: 1.75rem;
  color: #9ca3af;
}

.legacy-contact__email-link {
  text-decoration: none;
  color: inherit;
}
.legacy-contact__email-link:hover { color: #111827; }

/* Form */
.legacy-contact__form {
  padding: 5rem 1.5rem 6rem;
}
@media (min-width: 640px) { .legacy-contact__form { padding-bottom: 8rem; } }
@media (min-width: 1024px) { .legacy-contact__form { padding: 12rem 2rem; } }

.legacy-contact__form-inner {
  max-width: 36rem;
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .legacy-contact__form-inner {
    margin-right: 0;
    margin-left: auto;
    max-width: 32rem;
  }
}

.legacy-contact__errors {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  color: #991b1b;
  font-size: 0.875rem;
}
.legacy-contact__errors ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.legacy-contact__form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2rem;
}
@media (min-width: 640px) { .legacy-contact__form-grid { grid-template-columns: repeat(2, 1fr); } }

.legacy-form__full-width { grid-column: 1 / -1; }

.legacy-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  color: #111827;
}

.legacy-form__required { margin-left: 0.25rem; color: #dc2626; }

.legacy-form__field { margin-top: 0.625rem; }

.legacy-form__input {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #111827;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d1d5db, 0 1px 2px 0 rgb(0 0 0 / 0.05);
  font-family: inherit;
}
.legacy-form__input::placeholder { color: #9ca3af; }
.legacy-form__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #4f46e5, 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.legacy-form__textarea {
  resize: vertical;
}

.legacy-contact__form-submit {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
}

/* Success/Error messages */
.legacy-contact__success {
  padding: 5rem 1.5rem 6rem;
}
@media (min-width: 640px) { .legacy-contact__success { padding-bottom: 8rem; } }
@media (min-width: 1024px) { .legacy-contact__success { padding: 12rem 2rem; } }

.legacy-contact__success-inner {
  max-width: 36rem;
  margin-inline: auto;
}
@media (min-width: 1024px) {
  .legacy-contact__success-inner {
    margin-right: 0;
    margin-left: auto;
    max-width: 32rem;
  }
}

.legacy-contact__success-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.legacy-contact__success-text {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: #4b5563;
}

/* ---------- Static Pages ---------- */
.legacy-static-page {
  margin-bottom: 4rem;
}

.legacy-static-page__title {
  margin-bottom: 1rem;
  font-size: 1.875rem;
}

.legacy-static-page__heading-lg {
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

.legacy-static-page__heading {
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

.legacy-static-page p {
  margin-top: 0.5rem;
  line-height: 1.75;
  color: #374151;
}

.legacy-static-page a {
  color: #2563eb;
  text-decoration: underline;
}
