@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-extrabold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --docs-topbar-height: 76px;
  --upnify-pink: #ff2d6a;
  --upnify-coral: #ff7949;
  --upnify-navy: #081c35;
  --upnify-turquoise: #6ecac9;
  --upnify-lilac: #b88bf8;
  --upnify-mint: #9edac7;
  --upnify-neutral: #efefef;
  --upnify-border: #d9dee7;
  --upnify-muted: #536274;
  --upnify-background: #fcfbfc;
  --upnify-shadow: 0 16px 40px rgb(8 28 53 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--upnify-background);
  color: var(--upnify-navy);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: #0d4e76;
}

a:hover {
  color: #073752;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--upnify-pink);
  outline-offset: 3px;
}

.docs-topbar {
  align-items: center;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--upnify-border);
  display: flex;
  justify-content: space-between;
  min-height: var(--docs-topbar-height);
  padding: 12px clamp(20px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  color: var(--upnify-navy);
  display: inline-flex;
  font-weight: 800;
  gap: 12px;
  text-decoration: none;
}

.brand:hover {
  color: var(--upnify-navy);
}

.brand img {
  height: 34px;
  width: auto;
}

.brand span {
  border-left: 1px solid var(--upnify-border);
  padding-left: 12px;
}

.docs-topbar__actions {
  align-items: center;
  display: flex;
  gap: 16px;
}

.docs-topbar__title,
.docs-sidebar__module {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-nav-toggle {
  background: var(--upnify-navy);
  border: 0;
  border-radius: 8px;
  color: #fff;
  display: none;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 14px;
}

.docs-home {
  padding-bottom: 72px;
}

.docs-hero {
  background: linear-gradient(120deg, #fff4f7, #fff7f2 58%, #f6ffff);
  border: 1px solid #ffd9e4;
  border-radius: 28px;
  isolation: isolate;
  margin-top: clamp(28px, 6vw, 72px);
  overflow: hidden;
  padding: clamp(32px, 6vw, 76px);
  position: relative;
  width: 100%;
}

.docs-hero::after {
  background: url("img/documentation-api-upnify.webp") right center / contain no-repeat;
  content: "";
  inset: 0 2% 0 auto;
  pointer-events: none;
  position: absolute;
  width: min(48%, 560px);
  z-index: 0;
}

.docs-hero > * {
  position: relative;
  z-index: 1;
}

.docs-kicker {
  color: #a11444;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.docs-hero h1,
.module-intro h1,
.endpoint-detail h1 {
  color: #FF2D6A;
  font-size: clamp(2.1rem, 5vw, 4.1rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  max-width: 760px;
}

.docs-hero p:not(.docs-kicker),
.module-intro > p {
  color: var(--upnify-muted);
  font-size: 1.1rem;
  max-width: 680px;
}

.docs-button {
  background: var(--upnify-navy);
  border: 0;
  color: #fff;
  font-weight: 700;
  margin-top: 10px;
  min-height: 46px;
  padding: 11px 20px;
}

.docs-button:hover {
  background: #122e52;
  color: #fff;
}

.docs-module-section {
  margin-top: 72px;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2,
.docs-section h2,
.endpoint-detail__section h2,
.docs-context h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.docs-search-label {
  color: var(--upnify-navy);
  display: grid;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 6px;
  max-width: 300px;
  width: 100%;
}

.docs-search-label--wide {
  margin-bottom: 32px;
  max-width: 440px;
}

.docs-search-label .form-control {
  border-color: #b9c3d1;
  min-height: 44px;
}

.module-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-card {
  background: #fff;
  border: 1px solid var(--upnify-border);
  border-radius: 18px;
  box-shadow: 0 2px 0 transparent;
  color: var(--upnify-navy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  padding: 24px;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

a.module-card:hover {
  box-shadow: var(--upnify-shadow);
  color: var(--upnify-navy);
  transform: translateY(-3px);
}

.module-card h2 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 8px 0;
}

.module-card__heading {
  align-items: center;
  display: flex;
  gap: 12px;
}

.module-card__logo {
  height: 48px;
  object-fit: contain;
  width: 48px;
}

.module-card p {
  color: var(--upnify-muted);
  font-size: 0.9rem;
}

.module-card__eyebrow {
  color: var(--upnify-coral);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.module-card--turquoise .module-card__eyebrow {
  color: #117775;
}

.module-card--lilac .module-card__eyebrow {
  color: #6646a4;
}

.module-card--mint .module-card__eyebrow {
  color: #227560;
}

.module-card--pink .module-card__eyebrow {
  color: #a11444;
}

.docs-badge {
  align-self: flex-start;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
}

.docs-badge--available {
  background: #d9f2ec;
  color: #075743;
}

.docs-badge--pending {
  background: var(--upnify-neutral);
  color: #475569;
}

.docs-badge--technical {
  background: #e3f3f3;
  color: #0b615f;
}

.docs-shell {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(0, 240px);
  justify-content: center;
  margin: 0 auto;
  max-width: 1800px;
  min-height: calc(100vh - var(--docs-topbar-height));
  width: 100%;
}

.docs-sidebar {
  align-self: start;
  background: #fff;
  border-right: 1px solid var(--upnify-border);
  max-height: calc(100vh - var(--docs-topbar-height));
  overflow-y: auto;
  padding: 34px 24px;
  position: sticky;
  top: var(--docs-topbar-height);
}

.docs-sidebar__back {
  color: var(--upnify-muted);
  display: inline-block;
  font-size: 0.82rem;
  margin-bottom: 32px;
}

.docs-sidebar__module {
  color: var(--upnify-pink);
  margin-bottom: 12px;
}

.docs-sidebar nav {
  display: grid;
  gap: 4px;
}

.docs-sidebar nav a {
  border-radius: 7px;
  color: var(--upnify-navy);
  font-size: 0.86rem;
  padding: 7px 9px;
  text-decoration: none;
}

.docs-sidebar nav a:hover {
  background: #fff0f4;
  color: var(--upnify-navy);
}

.docs-sidebar nav a.is-active,
.docs-sidebar nav a[aria-current="location"] {
  background: #fff0f4;
  border-left: 3px solid var(--upnify-pink);
  color: var(--upnify-navy);
  font-weight: 800;
  padding-left: 6px;
}

.docs-main {
  min-width: 0;
  padding: clamp(32px, 5vw, 68px);
}

.docs-breadcrumb {
  color: var(--upnify-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  gap: 7px;
  margin-bottom: 28px;
}

.docs-section {
  border-top: 1px solid var(--upnify-border);
  margin-top: 42px;
  padding-top: 34px;
  scroll-margin-top: 95px;
}

.docs-prose {
  font-size: 0.95rem;
  max-width: 720px;
}

.docs-prose h2,
.docs-prose h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 24px;
}

.docs-prose code,
.endpoint-address code,
.endpoint-row code,
.docs-table code {
  background: #f3f5f8;
  border-radius: 4px;
  color: var(--upnify-navy);
  padding: 1px 4px;
}

.endpoint-list {
  border: 1px solid var(--upnify-border);
  border-radius: 12px;
  overflow: hidden;
}

.endpoint-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--upnify-border);
  color: var(--upnify-navy);
  display: grid;
  gap: 10px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  padding: 13px 16px;
  text-decoration: none;
}

.endpoint-row:last-child {
  border-bottom: 0;
}

.endpoint-row:hover {
  background: #fff7f9;
  color: var(--upnify-navy);
}

.endpoint-row small {
  color: var(--upnify-muted);
  display: block;
  font-size: 0.75rem;
  margin-top: 3px;
}

.method-badge {
  color: #fff;
  justify-content: center;
  min-width: 54px;
}

.method-badge--get {
  background: #075743;
}

.method-badge--post {
  background: #0d4e76;
}

.method-badge--put,
.method-badge--patch {
  background: #73511e;
}

.method-badge--delete {
  background: #9e1c3c;
}

.endpoint-detail h1 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

.endpoint-detail__heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.endpoint-address {
  align-items: center;
  background: var(--upnify-navy);
  border-radius: 12px;
  color: #fff;
  display: flex;
  gap: 12px;
  margin: 20px 0 30px;
  overflow-x: auto;
  padding: 14px;
}

.endpoint-address code {
  background: transparent;
  color: #fff;
  padding: 0;
  white-space: nowrap;
}

.endpoint-detail__section {
  border-top: 1px solid var(--upnify-border);
  margin-top: 32px;
  padding-top: 28px;
}

.docs-table th {
  color: var(--upnify-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

pre {
  background: var(--upnify-navy);
  border-radius: 12px;
  color: #f8fbff;
  overflow-x: auto;
  padding: 18px;
}

.docs-code-panel {
  border: 1px solid var(--upnify-border);
  border-radius: 14px;
  margin-top: 18px;
  overflow: hidden;
}

.docs-code-panel__header {
  align-items: center;
  background: #f3f5f8;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 14px;
}

.docs-code-panel__header h3 {
  font-size: 1rem;
  margin: 0;
}

.docs-code-panel__actions,
.docs-code-panel__language {
  align-items: center;
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 8px;
}

.docs-code-panel__language select {
  background: #fff;
  border: 1px solid #aeb9c7;
  border-radius: 6px;
  color: var(--upnify-navy);
  font: inherit;
  min-height: 34px;
  padding: 4px 28px 4px 8px;
}

.docs-code-panel__copy {
  background: var(--upnify-navy);
  border: 0;
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 10px;
}

.docs-code-panel__copy:hover {
  background: #0d4e76;
}

.docs-code-panel pre {
  border-radius: 0;
  margin: 0;
}

.docs-code-panel__status {
  color: var(--upnify-muted);
  font-size: 0.78rem;
  margin: 0;
  min-height: 1.4rem;
  padding: 6px 14px;
}

.docs-muted {
  color: var(--upnify-muted);
}

.docs-context {
  border-left: 1px solid var(--upnify-border);
  padding: 70px 20px;
}

.docs-context h2 {
  font-size: 0.95rem;
}

.docs-context a {
  color: var(--upnify-muted);
  display: block;
  font-size: 0.8rem;
  margin: 8px 0;
  text-decoration: none;
}

[data-search-item][hidden] {
  display: none;
}

@media (max-width: 1200px) {
  .docs-shell {
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  }

  .docs-context {
    display: none;
  }
}

@media (max-width: 760px) {
  .docs-hero::after {
    opacity: 0.2;
    width: 100%;
  }

  .docs-topbar {
    min-height: 64px;
    padding: 10px 18px;
  }

  .brand img {
    height: 28px;
  }

  .brand span,
  .docs-topbar__title {
    display: none;
  }

  .docs-nav-toggle {
    display: inline-block;
  }

  .docs-shell {
    display: block;
  }

  .docs-sidebar {
    border-bottom: 1px solid var(--upnify-border);
    border-right: 0;
    display: none;
    max-height: none;
    overflow-y: visible;
    padding: 22px 20px;
    position: static;
    top: auto;
  }

  .docs-sidebar.is-open {
    display: block;
  }

  .docs-main {
    padding: 34px 20px;
  }

  .section-heading,
  .endpoint-detail__heading,
  .docs-code-panel__header,
  .docs-code-panel__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-code-panel__actions,
  .docs-code-panel__language,
  .docs-code-panel__language select,
  .docs-code-panel__copy {
    width: 100%;
  }

  .docs-search-label {
    max-width: none;
  }

  .endpoint-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .endpoint-row .docs-badge--technical {
    grid-column: 2;
  }
}

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