/**
 * Stylesheet Portal SIMPEL DPMPTSP Kota Pekanbaru
 * Desain: 404 / Maintenance Frameless Civic Card Standard
 * Heading: Switzer Typography (Indian Type Foundry / Fontshare)
 * Responsif: Horizontal 3-Card Grid pada Desktop
 * Efek: Ambient Color Blur Gradient (Tanpa Garis Atas)
 * 100% Self-Hosted & Zero External CDN Dependency
 */

/* ========================================================
   SWITZER WEBFONT (UNTUK HEADINGS & JUDUL KARTU)
   ======================================================== */
@font-face {
    font-family: 'Switzer';
    src: url('../fonts/switzer/Switzer-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/switzer/Switzer-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/switzer/Switzer-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/switzer/Switzer-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Switzer';
    src: url('../fonts/switzer/Switzer-Extrabold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ========================================================
   GEIST SANS WEBFONT (FALLBACK)
   ======================================================== */
@font-face {
    font-family: 'Geist Sans';
    src: url('../fonts/geist/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Sans';
    src: url('../fonts/geist/Geist-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Sans';
    src: url('../fonts/geist/Geist-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #061d52;
    --navy: #083795;
    --blue: #0b3fa5;
    --blue-hover: #082d77;
    --blue-soft: rgba(11, 63, 165, 0.08);
    --blue-border: rgba(11, 63, 165, 0.18);
    --orange: #f56600;
    --orange-hover: #d95500;
    --orange-soft: #fff1e7;
    --orange-border: rgba(245, 102, 0, 0.24);
    --slate: #475569;
    --slate-soft: #f1f5f9;
    --slate-border: rgba(71, 85, 105, 0.22);
    --soft: #F5F7FD;
    --surface: #ffffff;
    --muted: #64748b;
    --text: #1e293b;
    --line: #e2e8f0;
    --font-heading: "Switzer", "Geist Sans", "Uncut Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-main: "Uncut Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    margin: 0;
    padding: 20px 24px 32px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: var(--soft);
    color: var(--text);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

/* ========================================================
   AMBIENT PEKANBARU LIGHTING CANVAS
   ======================================================== */
.bg-ambient-canvas {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.25s ease-out;
}

.bg-watermark {
    position: absolute;
    inset: -5%;
    background-image: url('../img/hero-mpp-pekanbaru-v2.webp');
    background-size: cover;
    background-position: center top;
    opacity: 0.055;
    filter: blur(1.5px) grayscale(40%);
    transform: translateZ(0);
}

.bg-ambient-blue {
    position: absolute;
    top: -120px;
    left: -100px;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 63, 165, 0.12) 0%, rgba(11, 63, 165, 0) 70%);
}

.bg-ambient-orange {
    position: absolute;
    bottom: -150px;
    right: -100px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 102, 0, 0.09) 0%, rgba(245, 102, 0, 0) 70%);
}

/* ========================================================
   HEADER BAGIAN ATAS (LOGO PEMKO & DPMPTSP)
   ======================================================== */
.portal-header {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 920px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0 8px;
    animation: contentFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portal-header .brand-header {
    margin-bottom: 0;
}

/* ========================================================
   PORTAL MAIN WRAPPER (MATCHES 404 FRAMING)
   ======================================================== */
.portal-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 920px;
    text-align: center;
    margin: auto 0;
    padding: 24px 0;
    animation: contentFadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes contentFadeUp {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes footerFadeUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================
   BRAND LOGOS (HEADER BAGIAN ATAS — HALUS & FRAMELESS)
   ======================================================== */
.brand-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.brand-logo-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
}

.brand-logo-item img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Microanimation Halus: Logo Pemko Pekanbaru */
.logo-pku:hover img {
    transform: translateY(-2px) scale(1.035);
    filter: drop-shadow(0 4px 10px rgba(6, 29, 82, 0.14));
}

/* Microanimation Halus: Logo DPMPTSP */
.logo-dpmptsp:hover img {
    transform: translateY(-2px) scale(1.035);
    filter: drop-shadow(0 4px 10px rgba(11, 63, 165, 0.16));
}

.brand-logo-item:active img {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.12s;
}

.brand-sep {
    width: 1px;
    height: 24px;
    background: rgba(6, 29, 82, 0.16);
    display: inline-block;
    border-radius: 1px;
    transition: height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.3s ease;
}

.brand-header:hover .brand-sep {
    height: 27px;
    background: rgba(11, 63, 165, 0.35);
}

/* ========================================================
   HEADINGS (DENGAN SWITZER TYPOGRAPHY)
   ======================================================== */
.status-title {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 4.2vw, 2.55rem);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.025em;
    margin: 0 0 10px;
    line-height: 1.18;
    text-wrap: balance;
}

.status-title span {
    color: var(--orange);
}

.status-lead {
    font-size: 0.98rem;
    line-height: 1.62;
    color: #4a5670;
    margin: 0 auto 34px;
    max-width: 540px;
    text-wrap: pretty;
}

/* ========================================================
   THE 3 APPLICATION CARDS (HORIZONTAL ON DESKTOP)
   ======================================================== */
.app-cards-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 28px;
    align-items: stretch;
}

.app-choice-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px 20px 20px;
    border-radius: 20px;
    border: 1px solid rgba(6, 29, 82, 0.11);
    box-shadow: 0 4px 20px -4px rgba(6, 29, 82, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-decoration: none;
    color: inherit;
    text-align: left;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.25s ease,
                box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* ========================================================
   AMBIENT COLOR BLUR GRADIENT (KONSEP BLUR GRADASI WARNA)
   ======================================================== */
.app-choice-card::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -20px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(34px);
    opacity: 0.45;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Card 1: SIMPEL 3 (SIP AMAN) — Blue Blur Gradient */
.card-simpel3 {
    background: radial-gradient(circle at 85% 0%, rgba(11, 63, 165, 0.08) 0%, transparent 60%), rgba(255, 255, 255, 0.94);
}

.card-simpel3::before {
    background: radial-gradient(circle, rgba(11, 63, 165, 0.70) 0%, rgba(37, 99, 235, 0.40) 50%, transparent 75%);
}

.card-simpel3:hover {
    border-color: rgba(11, 63, 165, 0.38);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px rgba(11, 63, 165, 0.22), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.card-simpel3:hover::before {
    opacity: 0.85;
    transform: scale(1.22) translate(-6px, 8px);
}

/* Card 2: SIMPEL 2 — Slate / Navy Blur Gradient */
.card-simpel2 {
    background: radial-gradient(circle at 85% 0%, rgba(71, 85, 105, 0.07) 0%, transparent 60%), rgba(255, 255, 255, 0.94);
}

.card-simpel2::before {
    background: radial-gradient(circle, rgba(71, 85, 105, 0.60) 0%, rgba(100, 116, 139, 0.35) 50%, transparent 75%);
}

.card-simpel2:hover {
    border-color: rgba(71, 85, 105, 0.38);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px rgba(71, 85, 105, 0.20), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.card-simpel2:hover::before {
    opacity: 0.85;
    transform: scale(1.22) translate(-6px, 8px);
}

/* Card 3: E-SURAT (SIAS) — Orange Blur Gradient */
.card-surat {
    background: radial-gradient(circle at 85% 0%, rgba(245, 102, 0, 0.08) 0%, transparent 60%), rgba(255, 255, 255, 0.94);
}

.card-surat::before {
    background: radial-gradient(circle, rgba(245, 102, 0, 0.70) 0%, rgba(234, 88, 12, 0.40) 50%, transparent 75%);
}

.card-surat:hover {
    border-color: rgba(245, 102, 0, 0.38);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px rgba(245, 102, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.card-surat:hover::before {
    opacity: 0.85;
    transform: scale(1.22) translate(-6px, 8px);
}

.app-choice-card:active {
    transform: translateY(0) scale(0.99);
}

/* Pastikan seluruh konten kartu berada di atas layer blur glow */
.card-logo-direct,
.card-app-title,
.card-app-subtitle,
.card-app-desc,
.card-action-bar {
    position: relative;
    z-index: 1;
}

/* Card Direct Logo (Frameless / Tanpa Kotak Card) */
.card-logo-direct {
    display: flex;
    align-items: center;
    height: 48px;
    margin-bottom: 16px;
}

.app-logo-img {
    max-height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.35s ease;
}

.app-choice-card:hover .app-logo-img {
    transform: translateY(-2px) scale(1.035);
    filter: drop-shadow(0 4px 12px rgba(6, 29, 82, 0.10));
}

/* Card Text Content (Switzer untuk Judul Kartu) */
.card-app-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin-bottom: 4px;
}

.card-app-subtitle {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.35;
    margin-bottom: 12px;
}

.card-app-desc {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #475569;
    margin: 0 0 22px;
    flex-grow: 1;
}

/* Card Bottom Action Bar */
.card-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    margin-top: auto;
}

.card-action-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    transition: color 0.2s ease;
}

.card-simpel3:hover .card-action-text { color: var(--blue); }
.card-simpel2:hover .card-action-text { color: var(--slate); }
.card-surat:hover .card-action-text { color: var(--orange); }

.card-arrow-pill {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(6, 29, 82, 0.05);
    border: 1px solid rgba(6, 29, 82, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ink);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease;
}

.card-arrow-pill svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.25s ease;
}

.card-simpel3:hover .card-arrow-pill {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
    transform: translateX(4px) scale(1.08);
}

.card-simpel2:hover .card-arrow-pill {
    background: var(--slate);
    border-color: var(--slate);
    color: #ffffff;
    transform: translateX(4px) scale(1.08);
}

.card-surat:hover .card-arrow-pill {
    background: var(--orange);
    border-color: var(--orange);
    color: #ffffff;
    transform: translateX(4px) scale(1.08);
}

/* ========================================================
   FOOTER (EXACT 404 FOOTER STYLE WITH UPDATED PROSE)
   ======================================================== */
.maintenance-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #64748b;
    margin-top: 32px;
    animation: footerFadeUp 0.65s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 8px;
    font-size: 0.78rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease;
}

.footer-links a:hover {
    color: var(--blue);
    text-decoration: underline;
}

/* ========================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ======================================================== */
@media (max-width: 860px) {
    .portal-wrap {
        max-width: 540px;
    }

    .app-cards-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .app-choice-card {
        padding: 22px 20px 18px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 16px 16px 24px;
    }

    .portal-header {
        padding: 8px 0 6px;
    }

    .portal-wrap {
        padding: 16px 0;
    }

    .status-title {
        font-size: 1.75rem;
    }

    .status-lead {
        font-size: 0.90rem;
        margin-bottom: 24px;
    }

    .brand-header {
        gap: 8px;
    }

    .brand-logo-item img {
        height: 32px;
    }

    .brand-sep {
        height: 20px;
    }

    .card-logo-direct {
        height: 40px;
        margin-bottom: 12px;
    }

    .app-logo-img {
        max-height: 38px;
    }

    .card-app-title {
        font-size: 1.15rem;
    }

    .card-app-subtitle {
        font-size: 0.78rem;
    }

    .card-app-desc {
        font-size: 0.80rem;
    }

    .maintenance-footer {
        font-size: 0.76rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .portal-wrap,
    .maintenance-footer {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .brand-logo-item img,
    .app-logo-img {
        transform: none !important;
    }
    .app-choice-card::before {
        display: none !important;
    }
}
