:root {
  color-scheme: dark;
  --bg: #0b0f18;
  --bg-2: #101420;
  --panel: rgba(18, 22, 33, 0.88);
  --border: rgba(108, 121, 153, 0.22);
  --text: #f2f4ff;
  --muted: #8b93aa;
  --accent: #7d5df0;
  --accent-2: #4eb3ff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --cta-start: #58c7d8;
  --cta-end: #6a58f2;
  --radius-xl: 22px;
  --sidebar-width: 288px;
  --header-height: 64px;
  --content-max: 1440px;
  --container-pad: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(78, 179, 255, 0.16), transparent 32%),
    radial-gradient(circle at 70% 10%, rgba(125, 93, 240, 0.18), transparent 36%),
    linear-gradient(180deg, #0b0f18 0%, #10141f 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

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

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid rgba(140, 152, 184, 0.15);
  background: rgba(10, 14, 24, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: var(--content-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  height: 34px;
  width: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--text);
  white-space: nowrap;
}

.desktop-nav a,
.desktop-nav span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-size: 0.94rem;
  font-weight: 600;
  color: rgba(242, 244, 255, 0.96);
}

.desktop-nav a:hover {
  color: var(--accent-2);
}

.nav-active {
  padding: 0 16px;
  border: 1px solid rgba(125, 93, 240, 0.8);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 29, 47, 0.98), rgba(15, 19, 34, 0.98));
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 24px rgba(125, 93, 240, 0.16);
}

.mobile-filter-bar {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px var(--container-pad);
  border-bottom: 1px solid rgba(140, 152, 184, 0.15);
  background: rgba(10, 14, 24, 0.88);
  backdrop-filter: blur(18px);
}

.mobile-filter-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
}

.mobile-filter-icon,
.sidebar-icon,
.search-field svg,
.modal-close svg,
.doc-icon,
.plus-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.plus-icon {
  width: 24px;
  height: 24px;
}

.mobile-filter-icon {
  color: var(--accent);
}

.mobile-category-select {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(17, 21, 33, 0.88);
  border: 1px solid rgba(140, 152, 184, 0.16);
  border-radius: 12px;
  outline: none;
}

.layout {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: 28px 20px;
  border-right: 1px solid rgba(140, 152, 184, 0.15);
  background: rgba(11, 15, 24, 0.58);
  backdrop-filter: blur(16px);
  overflow: auto;
}

.sidebar-head {
  margin-bottom: 24px;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sidebar-title-row h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1;
}

.sidebar-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sidebar-icon {
  color: var(--accent);
}

.category-filters {
  display: grid;
  gap: 8px;
}

.filter-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.filter-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.03);
}

.filter-button.is-active {
  background: linear-gradient(135deg, rgba(88, 199, 216, 0.95), rgba(106, 88, 242, 0.95));
  box-shadow:
    0 18px 34px rgba(88, 199, 216, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: translateY(-1px);
  color: #000;
}

.filter-button.is-active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
  transform: translateX(-120%);
  animation: filterSheen 2.6s ease-in-out infinite;
  pointer-events: none;
}

.filter-label {
  font-weight: 700;
  font-size: 1rem;
}

.filter-count,
.section-count {
  min-width: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.filter-button:not(.is-active) .filter-count {
  border: 1px solid rgba(140, 152, 184, 0.2);
  color: rgba(242, 244, 255, 0.88);
  background: rgba(15, 20, 32, 0.8);
}

.filter-button.is-active .filter-count {
  color: #f8f7ff;
  background: rgba(255, 255, 255, 0.16);
}

.content {
  min-width: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 38px 28px 36px;
  border-bottom: 1px solid rgba(140, 152, 184, 0.15);
  background:
    linear-gradient(135deg, rgba(14, 18, 31, 0.72), rgba(19, 23, 36, 0.92)),
    radial-gradient(circle at 0 0, rgba(78, 179, 255, 0.16), transparent 42%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding-top: 6px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #b7c2ff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-text {
  margin: 0;
  max-width: 860px;
  color: #93a0bf;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.45;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
}

.hero-glow-a {
  width: 260px;
  height: 260px;
  right: -70px;
  top: -40px;
  background: radial-gradient(circle, rgba(125, 93, 240, 0.24), transparent 68%);
}

.hero-glow-b {
  width: 180px;
  height: 180px;
  right: 230px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(78, 179, 255, 0.16), transparent 68%);
}

.catalogue-panel {
  padding: 32px 28px 72px;
}

.search-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 30px;
}

.search-field {
  width: min(100%, 690px);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(140, 152, 184, 0.16);
  border-radius: 12px;
  background: rgba(17, 21, 33, 0.82);
}

.search-field svg {
  color: rgba(147, 160, 191, 0.95);
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-field input::placeholder {
  color: #8190b0;
}

.sections {
  display: grid;
  gap: 36px;
}

.category-section {
  scroll-margin-top: 96px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-count {
  color: rgba(242, 244, 255, 0.96);
  background: rgba(27, 34, 50, 0.9);
  border: 1px solid rgba(140, 152, 184, 0.18);
}

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

.form-card,
.order-card {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid rgba(140, 152, 184, 0.15);
  border-radius: var(--radius-xl);
  background: rgba(17, 21, 33, 0.92);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
  animation: cardEnter 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--card-delay, 0ms);
}

.card-action {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.form-card:hover,
.order-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 93, 240, 0.4);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.form-card::before,
.order-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(125, 93, 240, 0.12), rgba(78, 179, 255, 0.08));
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.form-card:hover::before,
.order-card:hover::before {
  opacity: 1;
}

.card-action:hover .card-image {
  transform: scale(1.03);
}

.card-media {
  position: relative;
  height: 194px;
  overflow: hidden;
  background: #11161f;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.2));
  opacity: 0.85;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.form-card:hover .card-media::after,
.order-card:hover .card-media::after {
  opacity: 0.55;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.placeholder {
  background: linear-gradient(135deg, rgba(78, 179, 255, 0.12), rgba(125, 93, 240, 0.15));
}

.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(31, 36, 49, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 18px;
}

.card-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent);
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.card-description {
  margin: 0;
  color: #9ca7bf;
  line-height: 1.45;
}

.card-button {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #6b74f0);
  color: white;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    filter 180ms ease;
}

.card-action:hover .card-button,
.card-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(88, 199, 216, 0.16);
  background: linear-gradient(90deg, var(--cta-start), var(--cta-end));
  filter: saturate(1.08);
}

.order-card {
  border-color: rgba(125, 93, 240, 0.44);
  background:
    radial-gradient(circle at 50% 18%, rgba(125, 93, 240, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(36, 26, 73, 0.88), rgba(23, 18, 42, 0.96));
}

.order-card .card-action {
  justify-content: flex-start;
  padding: 24px 18px 18px;
  text-align: center;
}

.order-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 8px auto 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(125, 93, 240, 0.18);
  color: #b7aaff;
}

.order-card .card-body {
  flex: 1;
  padding: 0 4px 0;
}

.order-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.order-description {
  margin: 0;
  color: #9ba5c0;
  line-height: 1.5;
}

.order-card .card-button {
  margin-top: auto;
}

.empty-state {
  padding: 42px 20px;
  border-radius: 18px;
  border: 1px dashed rgba(140, 152, 184, 0.22);
  background: rgba(17, 21, 33, 0.6);
  color: #93a0bf;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

.modal-actions {
  position: absolute;
  top: 14px;
  right: 68px;
  z-index: 2;
}

.modal-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 29, 43, 0.9);
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.modal-fullscreen:hover {
  transform: translateY(-1px);
  background: rgba(36, 42, 60, 0.95);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
}

.modal-fullscreen svg {
  width: 18px;
  height: 18px;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 32px));
  height: min(88vh, 900px);
  margin: 6vh auto 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(140, 152, 184, 0.2);
  border-radius: 24px;
  background: #0d1220;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 29, 43, 0.9);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.modal-head {
  padding: 30px 28px 22px;
  border-bottom: 1px solid rgba(140, 152, 184, 0.12);
}

.modal-kicker {
  margin: 0 0 10px;
  color: #b7aaff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

#modal-title {
  margin: 0 0 10px;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

#modal-description {
  margin: 0;
  color: #96a2bf;
  max-width: 860px;
  line-height: 1.5;
}

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 16px;
}

.modal.is-fullscreen .modal-dialog {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
}

.modal.is-fullscreen .modal-body {
  padding: 0;
}

.modal.is-fullscreen .fillout-frame {
  border-radius: 0;
}

.fillout-frame {
  flex: 1;
  min-height: 0;
  padding: 16px;
}

.fillout-frame {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.fillout-note {
  height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(140, 152, 184, 0.12);
  background: linear-gradient(180deg, rgba(18, 22, 33, 0.95), rgba(12, 16, 26, 0.98));
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.fillout-note-card {
  max-width: 560px;
}

.fillout-note-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.fillout-note-card p {
  margin: 0;
  color: #98a4c0;
  line-height: 1.55;
}

.button-link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6b74f0);
  color: white;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(88, 199, 216, 0.16);
  background: linear-gradient(90deg, var(--cta-start), var(--cta-end));
  filter: saturate(1.08);
}

@media (max-width: 1240px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  :root {
    --container-pad: 16px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-filter-bar {
    display: flex;
  }

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

  .sidebar {
    display: none;
  }

  .hero {
    padding: 28px 20px 28px;
  }

  .catalogue-panel {
    padding: 24px 16px 56px;
  }

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

  .form-card,
  .order-card {
    min-height: 350px;
  }

  .modal-actions {
  position: absolute;
  top: 14px;
  right: 68px;
  z-index: 2;
}

.modal-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 29, 43, 0.9);
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.modal-fullscreen:hover {
  transform: translateY(-1px);
  background: rgba(36, 42, 60, 0.95);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
}

.modal-fullscreen svg {
  width: 18px;
  height: 18px;
}

.modal-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    margin: 8px auto 0;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .brand-logo {
    height: 30px;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero,
  .catalogue-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mobile-filter-bar {
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .modal-head {
    padding: 24px 18px 18px;
  }

  .modal-body {
  flex: 1;
  min-height: 0;
  padding: 16px;
}

.modal.is-fullscreen .modal-dialog {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
}

.modal.is-fullscreen .modal-body {
  padding: 0;
}

.modal.is-fullscreen .fillout-frame {
  border-radius: 0;
}

.fillout-frame {
    padding: 12px;
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes filterSheen {
  0% {
    transform: translateX(-120%);
  }
  65% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

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