:root {
  --bpk-red: #b10016;
  --bpk-red-dark: #62000b;
  --bpk-gold: #f2c45b;
  --ink: #fff7ed;
  --muted: rgba(255, 255, 255, 0.72);
  --glass: rgba(255, 255, 255, 0.13);
  --stroke: rgba(255, 255, 255, 0.22);
  --shadow: 0 22px 54px rgba(15, 23, 42, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #170006;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(54, 0, 7, 0.97) 0%, rgba(92, 0, 12, 0.88) 42%, rgba(10, 20, 42, 0.74) 100%),
    url("gambar 5.jpg") center / cover no-repeat;
  transform: scale(1.04);
  z-index: -4;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.2), transparent 27%),
    radial-gradient(circle at 82% 2%, rgba(242, 196, 91, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.32));
  z-index: -3;
}

.scene,
.grid-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.grid-glow {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 82%, transparent);
}

.orb {
  position: absolute;
  width: 30vw;
  aspect-ratio: 1;
  min-width: 230px;
  border-radius: 999px;
  filter: blur(38px);
  opacity: 0.42;
  animation: floatOrb 18s ease-in-out infinite;
}

.orb-red {
  background: #ff2445;
  left: -8vw;
  top: 17vh;
}

.orb-gold {
  background: #f2c45b;
  right: 8vw;
  top: -16vh;
  animation-delay: -6s;
}

.orb-blue {
  background: #1d4ed8;
  right: -13vw;
  bottom: 3vh;
  animation-delay: -11s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(34px, -28px, 0) scale(1.08); }
}

.portal-shell {
  width: min(1360px, calc(100% - 28px));
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 14px 0 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 9px 12px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.brand span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand strong {
  font-size: clamp(11px, 1.35vw, 14px);
  letter-spacing: 0.14em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff8dc;
  background: rgba(98, 0, 11, 0.42);
  border: 1px solid rgba(242, 196, 91, 0.28);
  font-size: 12px;
  font-weight: 800;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 11px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.portal-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(610px, 1.58fr);
  gap: 12px;
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.hero-copy,
.hero-card,
.portal-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-copy {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.8vw, 34px);
  border-radius: 28px;
}

.hero-copy::before,
.portal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% 20%, rgba(242, 196, 91, 0.26), transparent 28%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 35%);
}

.eyebrow,
.micro-label,
.category {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 900;
}

.eyebrow {
  position: relative;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff7d1;
  background: rgba(242, 196, 91, 0.18);
  border: 1px solid rgba(242, 196, 91, 0.28);
  font-size: 10px;
}

.hero h1 {
  position: relative;
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 4.5vw, 62px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.hero p {
  position: relative;
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(12px, 1.2vw, 15px);
  line-height: 1.58;
}

.hero-actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.search-box svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  fill: none;
  stroke: #b10016;
  stroke-width: 2;
  stroke-linecap: round;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 13px;
}

.search-box input::placeholder {
  color: #64748b;
}

.ghost-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border-radius: 24px;
}

.seal-frame {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding: 7px;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.seal-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.micro-label {
  color: #ffd875;
  font-size: 9px;
}

.hero-card h2,
.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.04em;
}

.hero-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mini-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-stats div {
  padding: 11px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.mini-stats strong {
  display: block;
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
}

.mini-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.portal-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 14px;
  border-radius: 28px;
}

.section-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-pill {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff7d1;
  background: rgba(242, 196, 91, 0.16);
  border: 1px solid rgba(242, 196, 91, 0.26);
  font-size: 11px;
  font-weight: 900;
}

.filters {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 10px;
}

.filters button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.filters button:hover,
.filters button.active {
  transform: translateY(-1px);
  background: #ffffff;
  color: var(--bpk-red-dark);
}

.grid {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 10px;
}

.card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 8px 10px;
  padding: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  border-radius: 21px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 44%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.08));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(0);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: cardIn 0.52s both;
  animation-delay: var(--delay);
}

@supports not (background: color-mix(in srgb, red 20%, transparent)) {
  .card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  }
}

.card[hidden] {
  display: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.card-shine {
  position: absolute;
  inset: -88% -40% auto;
  height: 80px;
  transform: rotate(16deg) translateY(-90px);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transition: transform 0.55s ease;
}

.card:hover {
  border-color: rgba(242, 196, 91, 0.56);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.27);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px);
}

.card:hover .card-shine {
  transform: rotate(16deg) translateY(185px);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.category {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  max-width: calc(100% - 18px);
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff7d1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 7.5px;
  white-space: nowrap;
}

.icon {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 86%, white), var(--accent));
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@supports not (background: color-mix(in srgb, red 20%, white)) {
  .icon { background: var(--accent); }
}

.icon svg {
  width: 28px;
  height: 28px;
}

.initials {
  font-weight: 900;
  letter-spacing: 0.03em;
}

.text,
.open-link {
  position: relative;
  z-index: 1;
}

.text {
  min-width: 0;
  padding-top: 13px;
}

.text h3 {
  margin: 0 0 5px;
  font-size: clamp(14px, 1.35vw, 17px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
}

.open-link strong {
  color: #ffd875;
  font-size: 14px;
}

.empty-state {
  position: relative;
  align-self: center;
  margin-top: 10px;
  padding: 20px;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.2;
}

@media (max-width: 1060px) {
  .portal-main {
    grid-template-columns: minmax(280px, 0.72fr) minmax(560px, 1.6fr);
  }

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

@media (max-height: 760px) {
  .portal-shell {
    width: min(1380px, calc(100% - 20px));
    padding: 8px 0 7px;
    gap: 8px;
  }

  .top-nav {
    min-height: 54px;
    padding: 7px 10px;
    border-radius: 18px;
  }

  .brand img {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand small,
  .nav-status,
  .hero p,
  footer {
    font-size: 10.5px;
  }

  .portal-main,
  .hero {
    gap: 8px;
  }

  .hero-copy {
    padding: 16px;
    border-radius: 22px;
  }

  .eyebrow {
    margin-bottom: 8px;
    padding: 6px 9px;
    font-size: 8.5px;
  }

  .hero h1 {
    font-size: clamp(25px, 3.8vw, 44px);
  }

  .hero p {
    margin-top: 10px;
    line-height: 1.45;
  }

  .search-box,
  .ghost-button {
    min-height: 42px;
    border-radius: 14px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-card {
    padding: 10px;
    border-radius: 20px;
  }

  .seal-frame {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }

  .hero-card h2,
  .section-head h2 {
    font-size: 19px;
  }

  .hero-card p {
    font-size: 10.5px;
  }

  .mini-stats div {
    padding: 8px 10px;
    border-radius: 15px;
  }

  .mini-stats strong {
    font-size: 18px;
  }

  .mini-stats span {
    font-size: 10px;
  }

  .portal-panel {
    padding: 10px;
    border-radius: 22px;
  }

  .section-head {
    margin-bottom: 7px;
  }

  .filters {
    gap: 5px;
    margin-bottom: 7px;
  }

  .filters button,
  .result-pill {
    padding: 6px 8px;
    font-size: 9.5px;
  }

  .grid {
    gap: 7px;
  }

  .card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 6px 8px;
    padding: 9px;
    border-radius: 17px;
  }

  .category {
    top: 7px;
    right: 7px;
    padding: 3px 6px;
    font-size: 6.8px;
  }

  .icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .icon svg {
    width: 24px;
    height: 24px;
  }

  .text {
    padding-top: 10px;
  }

  .text h3 {
    font-size: 13.5px;
    margin-bottom: 3px;
  }

  .text p,
  .open-link {
    font-size: 9.5px;
  }

  .open-link {
    padding-top: 6px;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .portal-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .portal-main {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card,
  .portal-panel {
    border-radius: 24px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(126px, auto);
  }
}

@media (max-width: 620px) {
  .portal-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .top-nav {
    align-items: flex-start;
  }

  .brand img {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .brand strong {
    white-space: normal;
    letter-spacing: 0.08em;
  }

  .nav-status {
    display: none;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    width: 100%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(122px, auto);
  }

  .card {
    min-height: 122px;
  }
}

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