@font-face {
  font-family: "Gaps Rounded";
  src: url("./fonts/huninn/Huninn-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --page: #0c1220;
  --panel: #141e30;
  --ink: #f1f5fc;
  --muted: #a2aec3;
  --line: #2c384d;
  --accent: #8de5d2;
  --active: #203c40;
  --focus: #e5a635;
  color-scheme: dark;
  font-family: "Gaps Rounded", "Microsoft JhengHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  padding-bottom: 36px;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
}

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

button {
  color: inherit;
  font: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 14px;
  transform: translateY(-180%);
  border-radius: 6px;
  background: var(--ink);
  color: var(--page);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  border-radius: 3px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  background: var(--accent);
  color: var(--page);
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
}

.brand-name {
  font-size: 19px;
  letter-spacing: 0.01em;
}

.brand-name > span {
  font-weight: 400;
}

.demo-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: right;
}

.page-shell {
  width: min(1380px, 100%);
  margin-inline: auto;
  padding: 24px 4vw 0;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
}

.category-nav button {
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.category-nav button:hover {
  color: var(--ink);
}

.category-nav button[aria-pressed="true"] {
  background: var(--active);
  color: var(--accent);
}

.catalog {
  display: grid;
  gap: 24px;
}

.service-group {
  min-width: 0;
}

.service-group > h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

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

.service-card {
  display: grid;
  min-width: 0;
  min-height: 108px;
  grid-template-columns: 25px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

a.service-card {
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

a.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: #17243a;
}

.service-card h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.service-icon,
.card-action {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

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

.card-action {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.is-planned,
.is-unavailable {
  background: transparent;
  color: var(--muted);
}

.is-planned {
  grid-template-columns: 25px minmax(0, 1fr);
}

.is-planned .service-icon,
.is-unavailable .service-icon {
  color: var(--muted);
}

.is-unavailable {
  grid-template-columns: 25px minmax(0, 1fr) auto;
}

.card-status {
  color: var(--muted);
  font-size: 12px;
}

.card-lock {
  width: 16px;
  height: 16px;
  justify-self: center;
  color: var(--muted);
  opacity: 0.8;
}

.catalog-status {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.7;
}

.catalog-error {
  color: var(--ink);
}

.catalog-empty {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.upcoming-services {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.upcoming-services > summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  list-style: none;
}

.upcoming-services > summary::-webkit-details-marker {
  display: none;
}

.upcoming-services > summary::marker {
  content: "";
}

.upcoming-count {
  font-size: 12px;
}

.disclosure-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 160ms ease;
}

.upcoming-services[open] > summary .disclosure-chevron {
  transform: rotate(180deg);
}

.upcoming-catalog {
  padding: 12px 0 20px;
}

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

@media (min-width: 1450px) {
  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
  }

  .demo-note {
    width: 100%;
    text-align: left;
  }

  .page-shell {
    padding: 20px;
  }

  .category-nav {
    gap: 2px;
  }

  .category-nav button {
    padding-inline: 12px;
  }

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

@media (max-width: 390px) {
  .page-shell {
    padding: 16px;
  }

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

  .service-card {
    min-height: 94px;
    padding: 18px;
  }
}

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

@media (forced-colors: active) {
  .category-nav button,
  .service-card,
  .upcoming-services,
  .brand-mark {
    border: 1px solid CanvasText;
  }

  .category-nav button[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
}
