/* Apex-domain portfolio. Kept independent from the app themes so the MUJ-I
   identity stays stable as individual products evolve. */

:root {
  color-scheme: dark;
  --bg: #090e14;
  --surface: #111923;
  --surface-raised: #16212d;
  --surface-soft: #0d141d;
  --line: #243344;
  --line-strong: #38516a;
  --text: #f4f7fa;
  --muted: #9aabba;
  --brand: #1d76d2;
  --brand-hover: #3786d8;
  --on-brand: #ffffff;
  --vaulta: #9b87f5;
  --medbud: #168dca;
  --devdeck: #4479df;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f7fa;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-soft: #edf3f8;
    --line: #d9e3ec;
    --line-strong: #b7c9da;
    --text: #102234;
    --muted: #5d7185;
    --brand: #0f61b6;
    --brand-hover: #0b56a3;
    --on-brand: #ffffff;
    --shadow: 0 24px 65px rgba(29, 61, 91, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--brand);
  font-size: 0.95rem;
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav .nav-cta {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(36px, 7vw, 86px);
  align-items: center;
  padding: clamp(72px, 10vw, 124px) 0 84px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--brand);
  color: var(--on-brand);
}

.button-primary:hover {
  background: var(--brand-hover);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

.hero-panel {
  position: relative;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 74px;
  height: 5px;
  border-radius: 0 0 0 6px;
  background: var(--brand);
  content: "";
}

.app-stack {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
}

.app-stack img {
  width: 72px;
  height: 72px;
  border: 4px solid var(--surface);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.app-stack img + img {
  margin-inline-start: -18px;
}

.panel-label {
  margin-bottom: 22px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
}

.quick-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.quick-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.quick-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.section {
  padding: 82px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading h2,
.support h2 {
  max-width: 680px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.section-heading > p {
  margin-bottom: 2px;
  color: var(--muted);
}

.compact-heading {
  grid-template-columns: 1fr;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 520px;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.app-card::before {
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  content: "";
}

.app-card-vaulta::before {
  background: var(--vaulta);
}

.app-card-medbud::before {
  background: var(--medbud);
}

.app-card-devdeck::before {
  background: var(--devdeck);
}

.app-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.app-logo {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 21px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.availability {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-kind {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-card h3 {
  margin-bottom: 14px;
  font-size: 2rem;
  letter-spacing: -0.025em;
  line-height: 1;
}

.app-description {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.96rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.text-link,
.store-link {
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link {
  color: var(--brand);
}

.text-link span {
  display: inline-block;
  transition: transform 160ms ease;
}

.text-link:hover span {
  transform: translateX(3px);
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.store-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.store-link:hover {
  color: var(--text);
}

.principles {
  padding-bottom: 76px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.principle-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
}

.principle-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
}

.principle-grid h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.principle-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  margin: 8px 0 82px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.support > div {
  max-width: 720px;
}

.support h2 {
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
}

.support p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.support p a {
  color: var(--text);
  font-weight: 700;
}

.support .button {
  flex: 0 0 auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 4px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 560px;
  }

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

  .app-card {
    min-height: 0;
  }

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

@media (max-width: 680px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    min-height: 68px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav > a:not(.nav-cta) {
    display: none;
  }

  .hero {
    gap: 42px;
    padding: 66px 0 64px;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .app-card,
  .principle-grid article {
    padding: 20px;
  }

  .card-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .support {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 64px;
  }

  .support .button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
