/* ==========================================================================
   GIS BANGUNJIWO — PREMIUM MODERN PORTAL
   ========================================================================== */

:root {
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", sans-serif;
  --bg-deep: #080d0a;
  --bg-surface: #0f1813;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-accent: #34d399;
  --color-accent-glow: rgba(52, 211, 153, 0.35);
  --color-accent-hover: #10b981;
  --glass-bg: rgba(15, 25, 19, 0.65);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-hover: rgba(52, 211, 153, 0.45);
  --glass-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-deep);
  color: var(--color-text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   HERO / COVER SECTION
   ========================================================================== */

.cover {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 40px 16px;
}

/* Background Landscape Layer */
.landscape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  z-index: 0;
}

.landscape-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.0);
  filter: blur(0px) brightness(0.9);
  opacity: 1;
  transition:
    transform 2.2s var(--ease-cinematic),
    filter 1.8s ease-out,
    opacity 1.6s ease-out;
  will-change: transform, filter, opacity;
}

body.modal-open .landscape-img {
  transform: scale(1.08);
  filter: blur(6px) brightness(0.45);
}

/* Atmospheric Shade & Grid Pattern */
.cover-shade {
  position: absolute;
  inset: 0;
  background-color: transparent;
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(16, 185, 129, 0.12) 0%, rgba(8, 13, 10, 0.75) 60%, rgba(5, 8, 6, 0.95) 100%),
    linear-gradient(180deg, rgba(8, 13, 10, 0.3) 0%, rgba(8, 13, 10, 0.85) 100%),
    url("images/overlay.png");
  background-size: auto, auto, 256px 256px;
  background-repeat: no-repeat, no-repeat, repeat;
  z-index: 1;
  transition: background-color 2.0s var(--ease-cinematic);
}

/* Ambient Radial Glow */
.ambient-glow {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 380px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(52, 211, 153, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  filter: blur(40px);
}

/* Main Content Container */
.cover-content {
  position: relative;
  z-index: 2;
  width: min(880px, calc(100% - 32px));
  text-align: center;
  padding: 60px 0 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Emblem / Official Logo */
.map-emblem {
  width: 92px;
  height: 92px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  margin: 0 auto 46px;
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(15, 25, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 35px rgba(52, 211, 153, 0.25), inset 0 0 15px rgba(255, 255, 255, 0.15);
  transition:
    transform 0.9s var(--ease-cinematic) 0.3s,
    opacity 0.9s ease-out 0.3s,
    box-shadow 0.5s ease;
  will-change: transform, opacity;
}

.emblem-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.4);
  pointer-events: none;
  animation: emblem-breath 3.6s ease-in-out infinite;
}

@keyframes emblem-breath {
  0%, 100% {
    transform: scale(1);
    opacity: 0.35;
    border-color: rgba(52, 211, 153, 0.3);
  }
  50% {
    transform: scale(1.09);
    opacity: 0.85;
    border-color: rgba(52, 211, 153, 0.75);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.45);
  }
}

.emblem-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.7));
  transition: transform 0.4s var(--ease-cinematic), filter 0.4s ease;
}

.map-emblem:hover {
  transform: scale(1.06);
  box-shadow: 0 0 45px rgba(52, 211, 153, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.95);
}

.map-emblem:hover .emblem-logo {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 16px rgba(52, 211, 153, 0.65));
}

.map-emblem::after {
  content: "";
  height: 46px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.15));
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Decorative Rules / Separators */
.rule {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 20%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.25) 80%, transparent 100%);
  transform: scaleX(1);
  transform-origin: center;
  transition: transform 0.85s var(--ease-cinematic), opacity 0.85s ease-out;
  will-change: transform, opacity;
}

.rule-top {
  margin-bottom: 38px;
  transition-delay: 0.5s;
}

.rule-bottom {
  margin-bottom: 42px;
  transition-delay: 0.95s;
}

/* Typography */
.cover-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: 11px;
  text-indent: 11px;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.8s var(--ease-cinematic) 0.65s, opacity 0.8s ease-out 0.65s;
  will-change: transform, opacity;
}

.cover-subtitle {
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.8;
  color: #e2e8f0;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: 10px;
  transition: transform 0.8s var(--ease-cinematic) 0.75s, opacity 0.8s ease-out 0.75s;
  will-change: transform, opacity;
}

.cover-description {
  margin: 0 0 40px;
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 400;
  letter-spacing: 2.8px;
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: 680px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.8s var(--ease-cinematic) 0.85s, opacity 0.8s ease-out 0.85s;
  will-change: transform, opacity;
}

/* Navigation Buttons Bar (Glassmorphic Pill) */
.main-nav {
  display: inline-flex;
  align-items: stretch;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow);
  transition:
    transform 0.9s var(--ease-cinematic) 1.05s,
    opacity 0.9s ease-out 1.05s,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  will-change: transform, opacity;
}

.main-nav:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.main-nav a {
  min-width: 155px;
  padding: 17px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.8px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease-cinematic);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav a:last-child {
  border-right: 0;
}

.main-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.25) 0%, rgba(16, 185, 129, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--color-accent);
  opacity: 0;
  transform: scaleX(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 0 10px var(--color-accent);
}

.main-nav a .nav-text {
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.main-nav a:hover::before,
.main-nav a:focus-visible::before {
  opacity: 1;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.main-nav a:hover .nav-text {
  transform: translateY(-1px);
}

/* Footer Note */
.cover-footer {
  margin-top: 48px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: rgba(226, 232, 240, 0.7);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: opacity 1.0s ease-out 1.25s;
  will-change: opacity;
}

/* ==========================================================================
   IS-PRELOAD ENTRANCE STATE (Cinematic Opening)
   ========================================================================== */

body.is-preload *,
body.is-preload *::before,
body.is-preload *::after {
  animation: none !important;
  transition: none !important;
}

body.is-preload .cover-shade {
  background-color: #030604;
}

body.is-preload .landscape-img {
  transform: scale(1.12);
  filter: blur(10px) brightness(0.4);
  opacity: 0;
}

body.is-preload .ambient-glow {
  opacity: 0;
}

body.is-preload .map-emblem {
  opacity: 0;
  transform: scale(0.75) translateY(-25px);
}

body.is-preload .rule-top,
body.is-preload .rule-bottom {
  transform: scaleX(0);
  opacity: 0;
}

body.is-preload .cover-title {
  opacity: 0;
  transform: translateY(22px);
}

body.is-preload .cover-subtitle {
  opacity: 0;
  transform: translateY(18px);
}

body.is-preload .cover-description {
  opacity: 0;
  transform: translateY(18px);
}

body.is-preload .main-nav {
  opacity: 0;
  transform: translateY(25px);
}

body.is-preload .cover-footer {
  opacity: 0;
}

/* ==========================================================================
   MODAL POPUP WINDOW (Modern Glass Dialog)
   ========================================================================== */

.content-modal {
  z-index: 100;
  position: fixed;
  inset: 5vh auto auto 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 32px));
  max-height: 90vh;
  padding: 42px 42px 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(14, 22, 17, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: #fff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: auto;
}

.content-modal::backdrop {
  background: transparent;
}

.content-modal[open] {
  animation: modal-enter 0.35s var(--ease-cinematic);
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(4, 8, 6, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  display: block;
  opacity: 1;
}

/* Close Button (Circular Glass Pill) */
.close-modal {
  position: absolute;
  right: 20px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s var(--ease-cinematic);
}

.close-modal:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ff8585;
  transform: rotate(90deg) scale(1.08);
}

/* Modal Content Elements */
.modal-content {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.modal-kicker {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--color-accent);
  text-transform: uppercase;
}

.modal-content h2 {
  margin: 0 auto 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 4px;
  font-weight: 700;
  color: #ffffff;
}

.modal-image {
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d1510;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-image img {
  width: 100%;
  height: auto;
  max-height: 250px;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.modal-image:hover img {
  transform: scale(1.02);
}

.modal-description {
  font-size: 13.5px;
  line-height: 1.85;
  color: #cbd5e1;
  text-align: left;
}

.modal-description p {
  margin: 0 0 10px;
}

/* Map Grid & Interactive Cards */
.modal-links {
  margin-top: 22px;
  text-align: left;
}

.links-heading {
  margin: 12px 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #e2e8f0;
  text-transform: uppercase;
}

.map-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s var(--ease-cinematic);
  position: relative;
  overflow: hidden;
}

.map-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
  opacity: 0;
  transform: scaleY(0);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.map-card:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.45);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.map-card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.map-card-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.map-card:hover .map-card-badge {
  background: var(--color-accent);
  color: #06110a;
  transform: scale(1.05);
}

.map-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.map-card-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #f8fafc;
  transition: color 0.2s ease;
}

.map-card:hover .map-card-title {
  color: #a7f3d0;
}

.map-card-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-card-arrow {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.25s ease, color 0.25s ease;
}

.map-card:hover .map-card-arrow {
  transform: translateX(4px);
  color: var(--color-accent);
}

/* ==========================================================================
   SOCIAL MEDIA CARDS (Tab Contact)
   ========================================================================== */

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: #fff;
  transition: all 0.25s var(--ease-cinematic);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease;
}

.social-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.social-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}

.social-link {
  font-size: 10.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-arrow {
  font-size: 15px;
  color: var(--color-text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Specific Social Platforms */
.social-card.instagram:hover {
  background: rgba(225, 48, 108, 0.12);
  border-color: rgba(225, 48, 108, 0.5);
  box-shadow: 0 8px 25px rgba(225, 48, 108, 0.25);
  transform: translateY(-2px);
}
.social-card.instagram:hover .social-icon {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  transform: scale(1.05);
}

.social-card.facebook:hover {
  background: rgba(24, 119, 242, 0.12);
  border-color: rgba(24, 119, 242, 0.5);
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.25);
  transform: translateY(-2px);
}
.social-card.facebook:hover .social-icon {
  background: #1877f2;
  color: #fff;
  transform: scale(1.05);
}

.social-card.website:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
  transform: translateY(-2px);
}
.social-card.website:hover .social-icon {
  background: #10b981;
  color: #06110a;
  transform: scale(1.05);
}

.social-card.whatsapp:hover {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.25);
  transform: translateY(-2px);
}
.social-card.whatsapp:hover .social-icon {
  background: #25d366;
  color: #fff;
  transform: scale(1.05);
}

.social-card:hover .social-arrow {
  transform: translate(2px, -2px);
  color: #fff;
}

.modal-error {
  padding: 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 13px;
  border-radius: 8px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */

@media (max-width: 768px) {
  .cover {
    padding: 30px 12px;
  }
  .cover-content {
    padding: 40px 0 30px;
    width: 100%;
  }
  .map-emblem {
    width: 76px;
    height: 76px;
    margin-bottom: 34px;
  }
  .emblem-logo {
    width: 48px;
    height: 48px;
  }
  .map-emblem::after {
    height: 34px;
  }
  .rule-top {
    margin-bottom: 30px;
  }
  .cover-title {
    font-size: 26px;
    letter-spacing: 7px;
    text-indent: 7px;
  }
  .cover-subtitle {
    font-size: 9px;
    letter-spacing: 2.5px;
  }
  .cover-description {
    font-size: 8.5px;
    letter-spacing: 1.8px;
    margin-bottom: 32px;
  }
  .rule-bottom {
    margin-bottom: 32px;
  }
  .main-nav {
    width: 100%;
    max-width: 440px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 12px;
  }
  .main-nav a {
    min-width: 0;
    padding: 16px 12px;
    font-size: 10px;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav a:nth-child(2) {
    border-right: 0;
  }
  .main-nav a:nth-child(3),
  .main-nav a:nth-child(4) {
    border-bottom: 0;
  }
  .cover-footer {
    margin-top: 36px;
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .content-modal {
    top: 3vh;
    padding: 34px 20px 26px;
    border-radius: 14px;
    max-height: 94vh;
  }
  .modal-content h2 {
    font-size: 17px;
    letter-spacing: 2.5px;
  }
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .map-emblem {
    width: 68px;
    height: 68px;
    margin-bottom: 28px;
  }
  .emblem-logo {
    width: 42px;
    height: 42px;
  }
  .map-emblem::after {
    height: 28px;
  }
  .cover-title {
    font-size: 23px;
    letter-spacing: 5px;
    text-indent: 5px;
  }
  .main-nav a {
    padding: 14px 8px;
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .map-card {
    padding: 12px 14px;
    gap: 12px;
  }
  .map-card-badge {
    width: 34px;
    height: 34px;
  }
  .map-card-title {
    font-size: 12.5px;
  }
}

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