/* =========================================================================
   PORTAL (halaman depan) — selaras dengan desain halaman login
   ========================================================================= */

@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../fonts/Poppins-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../fonts/Poppins-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../fonts/Poppins-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('../fonts/Poppins-Bold.woff2') format('woff2'); }

:root {
  --pt-bg: #f4f6fb;
  --pt-card: #ffffff;
  --pt-text: #1e2a44;
  --pt-muted: #64708a;
  --pt-border: #e6e9f2;
  --pt-brand: #5b6cff;
  --pt-brand-2: #8b5cf6;
  --pt-shadow: 0 1px 2px rgba(30, 42, 68, .04), 0 8px 24px rgba(30, 42, 68, .07);
}
html.theme-dark {
  --pt-bg: #0f1526;
  --pt-card: #182035;
  --pt-text: #e7eaf3;
  --pt-muted: #9aa4bd;
  --pt-border: #263050;
  --pt-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

.pt-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--pt-text);
  background: var(--pt-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Lewati ke menu: hanya tampak saat difokus keyboard */
.pt-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--pt-card);
  color: var(--pt-brand);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--pt-shadow);
  transition: top .15s;
}
.pt-skip:focus { top: 12px; }

/* ---------- Hero ---------- */
.pt-hero {
  position: relative;
  overflow: hidden;
  padding: calc(40px + env(safe-area-inset-top)) 24px 72px;
  text-align: center;
  color: #fff;
  background: linear-gradient(150deg, #4f5cf0 0%, var(--pt-brand) 40%, var(--pt-brand-2) 100%);
}
.pt-hero::before,
.pt-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  pointer-events: none;
}
.pt-hero::before { width: 260px; height: 260px; top: -110px; right: -80px; }
.pt-hero::after  { width: 180px; height: 180px; bottom: -90px; left: -60px; }

.pt-hero-inner { position: relative; max-width: 560px; margin: 0 auto; }

.pt-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 20, 80, .25);
}
.pt-logo img { width: 68px; height: 68px; object-fit: contain; }

.pt-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
}
.pt-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.pt-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  opacity: .9;
}

/* ---------- Menu ---------- */
.pt-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 520px;
  margin: -44px auto 0;
  padding: 0 16px 24px;
  position: relative;
}

.pt-section-title {
  margin: 0 0 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--pt-card);
  box-shadow: var(--pt-shadow);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.pt-menu { display: grid; gap: 12px; }

.pt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--pt-border);
  border-radius: 16px;
  background: var(--pt-card);
  color: var(--pt-text);
  text-decoration: none;
  box-shadow: var(--pt-shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pt-card:hover {
  border-color: rgba(91, 108, 255, .45);
  box-shadow: 0 12px 28px rgba(91, 108, 255, .16);
  transform: translateY(-2px);
}
.pt-card:active { transform: scale(.98); }
.pt-card:focus-visible { outline: 3px solid rgba(91, 108, 255, .5); outline-offset: 2px; }

.pt-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
}
.pt-icon--indigo { background: rgba(91, 108, 255, .12); color: #4f5cf0; }
.pt-icon--amber  { background: rgba(245, 158, 11, .14); color: #c27803; }
.pt-icon--green  { background: rgba(16, 185, 129, .14); color: #0e9f6e; }
html.theme-dark .pt-icon--indigo { color: #9aa5ff; }
html.theme-dark .pt-icon--amber  { color: #fbbf24; }
html.theme-dark .pt-icon--green  { color: #34d399; }

.pt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-card-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.pt-card-desc  { font-size: 13px; line-height: 1.45; color: var(--pt-muted); }

.pt-chevron { flex: 0 0 auto; font-size: 24px; color: var(--pt-muted); }

/* Tombol pasang aplikasi (muncul otomatis jika perangkat mendukung) */
.pt-install {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 1.5px dashed rgba(91, 108, 255, .5);
  border-radius: 14px;
  background: transparent;
  color: var(--pt-brand);
  font: 600 14px/1 'Poppins', sans-serif;
  cursor: pointer;
}
.pt-install[hidden] { display: none; }
html.theme-dark .pt-install { color: #9aa5ff; }

/* ---------- Footer ---------- */
.pt-footer {
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  font-size: 12px;
  text-align: center;
  color: var(--pt-muted);
}

/* ---------- Layar lebar ---------- */
@media (min-width: 768px) {
  .pt-hero { padding: 64px 24px 96px; }
  .pt-title { font-size: 28px; }
  .pt-sub { font-size: 15px; }
  .pt-main { max-width: 960px; margin-top: -56px; }
  .pt-section-title { max-width: 360px; margin: 0 auto 16px; }
  .pt-menu { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .pt-card {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }
  .pt-icon { flex-basis: 64px; width: 64px; height: 64px; font-size: 28px; border-radius: 18px; }
  .pt-chevron { display: none; }
  .pt-install { max-width: 360px; margin: 24px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-card, .pt-skip { transition: none; }
  .pt-card:hover, .pt-card:active { transform: none; }
}
