/* ======================================================================
   STYLE PUBLIK - Flat + Modern + Elegant School Website
   Mobile-first. Palet: biru tua, biru, biru muda, putih.
   ====================================================================== */
:root {
    --navy: #0a2a66;
    --navy-2: #123a85;
    --blue: #1d6fe0;
    --blue-dark: #1558b8;
    --sky: #dbeafe;
    --sky-2: #eff6ff;
    --white: #ffffff;
    --ink: #0f1f3d;
    --muted: #4a5b78;
    --ok: #0f7a56;
    --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.pub {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--navy);
    overflow-x: hidden;
    line-height: 1.5;
}

/* ---------- Background animasi (CSS only, ringan) ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.bg .c, .bg .sq { position: absolute; display: block; will-change: transform; }
.bg .c { border-radius: 50%; }

.c1 { width: 280px; height: 280px; left: -90px;  top: -80px;   background: rgba(59, 140, 240, .28); animation: float-a 14s ease-in-out infinite; }
.c2 { width: 180px; height: 180px; right: -50px; top: 14%;     background: rgba(147, 197, 253, .20); animation: float-b 11s ease-in-out infinite; }
.c3 { width: 340px; height: 340px; left: -120px; bottom: -120px; background: rgba(29, 111, 224, .30); animation: float-b 17s ease-in-out infinite; }
.c4 { width: 120px; height: 120px; right: 12%;   bottom: 12%;  background: rgba(219, 234, 254, .14); animation: float-a 9s ease-in-out infinite; }
.c5 { width: 70px;  height: 70px;  left: 18%;    top: 26%;     background: rgba(219, 234, 254, .16); animation: float-b 8s ease-in-out infinite; }
.c6 { width: 220px; height: 220px; right: -90px; bottom: -70px; background: rgba(59, 140, 240, .22); animation: float-a 15s ease-in-out infinite; }

.sq { border: 3px solid rgba(219, 234, 254, .18); border-radius: 10px; }
.sq1 { width: 64px; height: 64px; left: 8%;  bottom: 20%; animation: spin-slow 28s linear infinite; }
.sq2 { width: 44px; height: 44px; right: 20%; top: 8%;    animation: spin-slow 22s linear infinite reverse; }
.sq3 { width: 90px; height: 90px; right: 6%;  top: 52%;   animation: spin-slow 34s linear infinite; }

@keyframes float-a { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(22px, 30px, 0); } }
@keyframes float-b { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(-26px, -24px, 0); } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .bg .c, .bg .sq { animation: none; }
}

/* ---------- Layout ---------- */
.wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.card {
    width: 100%;
    max-width: 720px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 18px 30px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(4, 18, 48, .35);
}

.logo { margin-bottom: 14px; }
.logo img {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: 96px;
    max-height: 96px;
    object-fit: contain;
}
.logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-size: 2.2rem;
    font-weight: 800;
}

.title {
    margin: 0 0 6px;
    font-size: clamp(1.35rem, 6vw, 2.3rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--navy);
    overflow-wrap: anywhere;
}
.school {
    margin: 0 0 22px;
    font-size: clamp(1rem, 4.4vw, 1.5rem);
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
}

/* ---------- Countdown ---------- */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto 8px;
    max-width: 560px;
}
.cd-box {
    background: var(--sky-2);
    border: 2px solid var(--sky);
    border-radius: 16px;
    padding: 12px 2px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.cd-num {
    font-size: clamp(1.6rem, 9vw, 3.1rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}
.cd-lbl {
    margin-top: 4px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}
.cd-status { margin: 10px 0 0; font-weight: 700; color: var(--blue-dark); }

.when { margin: 22px 0 6px; }
.when-label { margin: 0; font-size: .95rem; color: var(--muted); }
.when-value { margin: 4px 0 0; font-size: clamp(1.1rem, 5vw, 1.55rem); font-weight: 800; color: var(--navy); }

.info {
    margin: 16px auto 0;
    max-width: 520px;
    font-size: 1.02rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

/* ---------- Setelah pengumuman dibuka ---------- */
.badge-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #dcf5ea;
    color: var(--ok);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.school-top { margin-bottom: 10px; font-size: clamp(.95rem, 4vw, 1.2rem); }
.title-open { font-size: clamp(1.4rem, 6.4vw, 2.4rem); margin-bottom: 4px; }
.info-open { color: var(--ink); font-size: 1.1rem; }

.actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 26px auto 0;
    max-width: 560px;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 64px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 3px solid transparent;
    font: inherit;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 4px solid #93c5fd; outline-offset: 2px; }
.btn-ico { font-size: 1.3em; line-height: 1; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: var(--navy-2); }

.notice {
    margin: 22px auto 0;
    max-width: 520px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff4d6;
    color: #7a5200;
    font-weight: 600;
}

.foot {
    margin: 18px 0 0;
    font-size: .85rem;
    color: rgba(219, 234, 254, .85);
    text-align: center;
}

/* ---------- Layar kecil (360px) ---------- */
@media (max-width: 380px) {
    .card { padding: 24px 12px 26px; }
    .countdown { gap: 6px; }
    .cd-lbl { font-size: .66rem; letter-spacing: .04em; }
}

/* ---------- Tablet ke atas ---------- */
@media (min-width: 640px) {
    .card { padding: 42px 40px 44px; }
    .logo img { max-width: 120px; max-height: 120px; }
    .actions { grid-template-columns: 1fr 1fr; }
    .countdown { gap: 14px; }
    .cd-box { padding: 18px 4px 14px; }
    .cd-lbl { font-size: .8rem; }
}

@media (min-width: 1024px) {
    .card { max-width: 780px; }
}
