* {
  box-sizing: border-box;
}

:root {
  --text: #ffffff;
  --muted: rgba(255,255,255,.74);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  height: 100vh;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #07111f;
  overflow: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -4;
  background-image:
    linear-gradient(180deg, rgba(3, 17, 32, .16) 0%, rgba(3, 13, 25, .28) 58%, rgba(2, 9, 18, .50) 100%),
    url("assets/background.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #07111f;
}

/* Background lama berbasis CSS dinonaktifkan karena sekarang memakai foto. */
.page-bg > * {
  display: none;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 36%, transparent 0%, transparent 34%, rgba(2, 10, 19, .08) 72%, rgba(2, 8, 16, .24) 100%),
    linear-gradient(90deg, rgba(2, 11, 21, .18), transparent 19%, transparent 78%, rgba(2, 9, 18, .06));
  pointer-events: none;
}

.page-shell {
  width: min(1460px, calc(100% - 52px));
  margin: 0 auto;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 0 10px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255,255,255,.92);
}

.grid-icon {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 5px;
  padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,.36);
}

.grid-icon i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.brand-copy {
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: .32em;
}

.clock-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 306px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  color: rgba(255,255,255,.94);
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}

.clock-svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clock-card {
  font-size: 14px;
}

.clock-card strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  line-height: 1;
}

.hero {
  text-align: center;
  padding-top: 0;
}

.eyebrow {
  font-size: 15px;
  letter-spacing: .46em;
  font-weight: 500;
  color: rgba(255,255,255,.91);
}

h1 {
  margin: 6px 0 2px;
  font-size: clamp(48px, 5vw, 76px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 800;
  text-shadow: 0 12px 46px rgba(0,0,0,.25);
}

.lead {
  margin: 8px 0 0;
  font-size: clamp(15px, 1.5vw, 20px);
  color: rgba(255,255,255,.75);
}

.tagline {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: .35em;
  font-weight: 600;
  color: rgba(255,255,255,.88);
}

.tagline span {
  margin: 0 12px;
  opacity: .55;
}

.apps-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.app-card {
  --card-rgb: 26, 96, 206;
  position: relative;
  min-height: 0;
  height: clamp(245px, 31vh, 300px);
  padding: 20px 24px 18px;
  display: flex;
  flex-direction: column;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(var(--card-rgb), .72), rgba(var(--card-rgb), .40)),
    rgba(7, 19, 34, .45);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow:
    0 22px 60px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.15);
  transition:
    transform .24s ease,
    box-shadow .24s ease,
    border-color .24s ease;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.19), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 32%);
  pointer-events: none;
}

.app-card:hover,
.app-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(255,255,255,.50);
  box-shadow:
    0 30px 90px rgba(0,0,0,.33),
    0 0 44px rgba(var(--card-rgb), .18),
    inset 0 1px 0 rgba(255,255,255,.2);
  outline: none;
}

.app-blue   { --card-rgb: 18, 100, 215; }
.app-green  { --card-rgb: 0, 135, 124; }
.app-purple { --card-rgb: 93, 62, 186; }
.app-orange { --card-rgb: 177, 89, 47; }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.app-icon {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 12px 30px rgba(0,0,0,.18);
}

.icon-blue   { background: linear-gradient(145deg, #3692ff, #0a67da); }
.icon-green  { background: linear-gradient(145deg, #25d2ac, #0b9d7d); }
.icon-purple { background: linear-gradient(145deg, #9c57ff, #6c2ee2); }
.icon-orange { background: linear-gradient(145deg, #ff9a49, #f0642a); }

.app-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-blue .app-icon svg path,
.app-blue .app-icon svg circle {
  fill: #fff;
  stroke: none;
}

.app-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 700;
  font-size: 14px;
}

.app-card h2 {
  margin: 14px 0 5px;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.app-card p {
  margin: 0;
  color: rgba(255,255,255,.79);
  line-height: 1.48;
  font-size: 14px;
}

.open-row {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 29px;
  background: rgba(255,255,255,.14);
  transition: transform .2s ease, background .2s ease;
}

.app-card:hover .arrow {
  transform: translateX(4px);
  background: rgba(255,255,255,.22);
}

.search-panel {
  width: min(640px, 100%);
  margin: 14px auto 0;
}

.search-box {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.30);
  background: rgba(8, 18, 31, .44);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 12px 30px rgba(0,0,0,.10);
}

.search-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: rgba(255,255,255,.96);
  stroke-width: 2;
  stroke-linecap: round;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.search-box input::placeholder {
  color: rgba(255,255,255,.67);
}

.search-box kbd {
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.90);
  font: 600 13px/1 Inter, sans-serif;
}

.empty-state {
  display: none;
  text-align: center;
  margin-top: 12px;
  color: rgba(255,255,255,.72);
}

.benefits {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(8,15,26,.56);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 58px rgba(0,0,0,.22);
}

.benefits article {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
}

.benefits article + article {
  border-left: 1px solid rgba(255,255,255,.18);
}

.benefit-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.benefit-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefits strong,
.benefits span {
  display: block;
}

.benefits strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.benefits span {
  color: rgba(255,255,255,.59);
  font-size: 12px;
}

footer {
  margin-top: auto;
  padding: 8px 10px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  color: rgba(255,255,255,.64);
  font-size: 11px;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
  letter-spacing: .28em;
  line-height: 1.6;
}


@media (min-width: 1121px) {
  .page-shell {
    justify-content: space-between;
  }

  main {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero {
    flex: 0 0 auto;
  }

  .apps-grid {
    flex: 0 0 auto;
  }

  .search-panel,
  .benefits {
    flex: 0 0 auto;
  }

  footer {
    flex: 0 0 auto;
  }
}

@media (max-width: 1120px) {
  .page-shell {
    width: min(960px, calc(100% - 36px));
  }

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

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

  .benefits article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.18);
  }

  .benefits article:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,.18);
  }

  .frame-left {
    display: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 580px);
    padding-top: 16px;
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .brand-copy {
    font-size: 8px;
    letter-spacing: .20em;
  }

  .clock-card {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 10px;
  }

  .clock-card strong {
    font-size: 18px;
  }

  .clock-svg {
    width: 25px;
    height: 25px;
  }

  .hero {
    padding-top: 22px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: .34em;
  }

  h1 {
    font-size: 49px;
    margin-top: 11px;
  }

  .lead {
    font-size: 14px;
  }

  .tagline {
    font-size: 9px;
    letter-spacing: .18em;
    line-height: 1.7;
  }

  .tagline span {
    margin: 0 5px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .app-card {
    min-height: 238px;
    padding: 22px;
  }

  .app-icon {
    width: 64px;
    height: 64px;
    border-radius: 17px;
  }

  .app-icon svg {
    width: 34px;
    height: 34px;
  }

  .app-card h2 {
    font-size: 25px;
    margin-top: 17px;
  }

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

  .benefits article + article,
  .benefits article:nth-child(3),
  .benefits article:nth-child(4) {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.18);
  }

  footer {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .footer-center,
  .footer-right {
    text-align: center;
  }
}

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


/* V4: desktop tetap satu layar, tablet/mobile boleh scroll */
@media (max-width: 1120px), (max-height: 760px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

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

@media (max-width: 720px) {
  html,
  body {
    min-height: 100%;
    height: auto;
  }

  body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .page-bg {
    position: fixed;
  }

  .page-shell {
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 28px;
  }

  main {
    overflow: visible !important;
  }

  .apps-grid,
  .search-panel,
  .benefits,
  footer {
    flex-shrink: 0;
  }
}


/* Penyesuaian crop background pada layar sempit */
@media (max-width: 720px) {
  .page-bg {
    background-position: 52% center;
  }
}
