/**
 * Hokorian State visual system.
 */

:root {
  --hs-focus: #ffdd00;
  --hs-navy: #0d003a;
  --hs-navy-2: #17005b;
  --hs-radius-sm: 8px;
  --hs-radius-md: 14px;
  --hs-radius-lg: 22px;
  --hs-radius-xl: 30px;
  --hs-shadow-card: 0 14px 36px rgba(13, 0, 58, .10);
  --hs-shadow-card-hover: 0 20px 48px rgba(13, 0, 58, .18);
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

a {
  text-underline-offset: .18em;
  text-decoration-thickness: .08em;
}

a:hover {
  text-decoration-thickness: .14em;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--hs-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #111827 !important;
}

.hs-skip-link {
  position: absolute;
  left: .75rem;
  top: .75rem;
  z-index: 100000;
  transform: translateY(-250%);
  background: var(--hs-focus);
  color: #111827;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}

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

.hs-header {
  background:
    radial-gradient(circle at 88% 18%, rgba(80,58,168,.44) 0, rgba(80,58,168,0) 26rem),
    linear-gradient(135deg, var(--hs-navy), var(--hs-navy-2));
  color: #fff;
}

.hs-header a,
.hs-footer a {
  color: inherit;
}

.hs-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.hs-brand img {
  width: 3.1rem;
  height: auto;
  filter: invert(1);
}

.hs-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.hs-brand-name {
  font-family: var(--wp--preset--font-family--roboto-condensed);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.035em;
}

.hs-brand-slogan {
  color: rgba(255,255,255,.78);
  font-size: var(--wp--preset--font-size--small);
}

.hs-topbar {
  border-bottom: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.86);
}

.hs-starfield {
  position: relative;
  overflow: hidden;
}

.hs-starfield::before,
.hs-starfield::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background-image: url("../brand/hokstar-rotated.svg");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .12;
}

.hs-starfield::before {
  width: 9rem;
  height: 9rem;
  right: 7%;
  top: 14%;
}

.hs-starfield::after {
  width: 4.5rem;
  height: 4.5rem;
  left: 8%;
  bottom: 18%;
  opacity: .08;
}

.hs-card,
.hs-topic-card,
.hs-service-card,
.hs-news-card,
.hs-organisation-card,
.hs-record-card,
.hs-spotlight-card {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--hs-radius-lg);
  background: #fff;
  box-shadow: var(--hs-shadow-card);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.hs-card:hover,
.hs-topic-card:hover,
.hs-service-card:hover,
.hs-news-card:hover,
.hs-organisation-card:hover,
.hs-record-card:hover,
.hs-spotlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hs-shadow-card-hover);
  border-color: color-mix(in srgb, var(--wp--preset--color--navy) 28%, var(--wp--preset--color--border));
}

.hs-topic-card,
.hs-service-card,
.hs-news-card,
.hs-organisation-card,
.hs-record-card {
  padding: var(--wp--preset--spacing--40);
}

.hs-topic-card {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.hs-topic-card::after {
  content: "";
  position: absolute;
  width: 4rem;
  height: 4rem;
  right: 1rem;
  bottom: 1rem;
  background: url("../brand/hokstar-rotated.svg") center/contain no-repeat;
  opacity: .07;
}

.hs-topic-icon {
  width: 3.6rem;
  height: 3.6rem;
  display: inline-grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 18px;
  background: var(--wp--preset--color--surface-purple);
  color: var(--wp--preset--color--navy);
}

.hs-topic-icon img {
  width: 2rem;
  height: 2rem;
}

.hs-service-card {
  border-left: 8px solid var(--wp--preset--color--blue);
}

.hs-organisation-card {
  border-left: 8px solid var(--wp--preset--color--purple);
}

.hs-record-card {
  border-left: 8px solid var(--wp--preset--color--gold);
}

.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  letter-spacing: .02em;
}

.hs-meta {
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
}

.hs-notice,
.is-style-state-notice {
  border-left: 8px solid var(--wp--preset--color--blue);
  border-radius: var(--hs-radius-md);
  background: var(--wp--preset--color--surface-blue);
  padding: var(--wp--preset--spacing--40);
}

.hs-warning,
.is-style-state-warning {
  border-left-color: var(--wp--preset--color--orange);
  background: #fff7ed;
}

.is-style-law-text,
.hs-law-text {
  font-family: var(--wp--preset--font-family--roboto-mono);
  line-height: 1.78;
}

.hs-metadata-panel {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--hs-radius-lg);
  background: var(--wp--preset--color--surface);
  padding: var(--wp--preset--spacing--40);
}

.hs-stripe-rule {
  height: .5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #0D003A 0 14.2%, #503AA8 14.2% 28.4%, #0EA5E9 28.4% 42.6%, #06B6D4 42.6% 56.8%, #15803D 56.8% 71%, #FFDD00 71% 85.2%, #B91C1C 85.2% 100%);
}

.hs-image-frame {
  overflow: hidden;
  border-radius: var(--hs-radius-xl);
  box-shadow: var(--hs-shadow-card);
}

.hs-image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.hs-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--wp--preset--spacing--40);
}

.hs-print-emblem {
  display: none;
}

@media print {
  .hs-header, .hs-footer, .wp-block-navigation, .wp-block-search, .wp-block-buttons {
    display: none !important;
  }
  .hs-print-emblem {
    display: block;
    width: 4rem;
    margin-bottom: 1rem;
  }
  body {
    color: #000 !important;
    background: #fff !important;
  }
  a::after {
    content: " (" attr(href) ")";
    font-size: 90%;
  }
}
