/* Media KMTEDI: burgundy/navy primary, amber/orange accents. */
:root {
  --brand-burgundy: #250014;
  --brand-navy: #000113;
  --brand-amber: #FFB42B;
  --brand-orange: #E46527;
  --night: var(--brand-navy);
  --maroon: var(--brand-burgundy);
  --wine: var(--brand-burgundy);
  --coral: var(--brand-orange);
  --orange: var(--brand-orange);
  --yellow: var(--brand-amber);
  --gold: var(--brand-amber);
  --red: #963611;
  --cream: #FFF9EF;
  --pink: #FFF9EF;
  --muted: #EADCE4;
  --green: #15733E;
  --line: rgba(255, 249, 239, .35);
  --bg: var(--brand-navy);
  --panel: var(--brand-burgundy);
}

::selection { background: var(--yellow); color: var(--night); }
body::before { display: none; }

/* TOPBAR */
.topbar { background: var(--night); backdrop-filter: none; border-bottom: 1px solid var(--line); }
.brand-logo { display: block; object-fit: contain; flex-shrink: 0; }
.brand { gap: 10px; color: var(--cream); font-weight: 700; }
.navlinks a { color: var(--cream); opacity: 1; font-weight: 700; }
.navlinks a:hover { color: var(--yellow); }
.btn-nav-verify { border: 1.5px solid var(--yellow); color: var(--yellow) !important; background: rgba(255, 180, 43, 0.12); font-weight: 700; }
.btn-nav-verify:hover { background: var(--yellow); color: var(--night) !important; }

/* HERO (Dark Burgundy Background) */
.hero { background: var(--maroon); }
.hero-grid { position: relative; z-index: 1; }
.hero-title em { color: var(--cream); }
.hero-lead { color: var(--cream); opacity: 1; font-size: 16.5px; font-weight: 500; }
.hero-card {
  border-radius: 3px 48px 3px 3px;
  box-shadow: 12px 12px 0 var(--night);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.hero-card:active {
  cursor: grabbing;
}
.hero-card::after { background: linear-gradient(180deg, transparent 35%, rgba(0, 1, 19, .92)); }
.hero-card img {
  filter: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-art-label strong { color: var(--cream); }
.hero-art-label span { color: var(--yellow); font-weight: 700; }
.media-art { pointer-events: none; user-select: none; object-fit: contain; height: auto; }
.hero-petals { position: absolute; width: clamp(180px, 24vw, 350px); right: 0; top: 60px; opacity: .5; }
.hero-spark { position: absolute; width: 125px; top: -45px; left: -48px; z-index: 3; }

/* MARQUEE RIBBON */
.marquee { background: var(--brand-orange); color: var(--brand-navy); font-weight: 700; border-top: 1px solid rgba(0, 1, 19, .25); border-bottom: 1px solid rgba(0, 1, 19, .25); }

/* 01 / INFO: KENALI ACARANYA (Light / Warm Cream Section) */
.about { background: var(--cream); color: var(--night); }
.about .section-kicker h2 { color: var(--maroon); }
.about .section-kicker .number { color: var(--orange); font-weight: 700; }
.about-statement { color: var(--night); }
.about-statement span { color: var(--orange); font-weight: 700; }
.about-info { border-top: 2px solid var(--maroon); color: #5C3A44; }
.about-info strong { color: var(--maroon); }
.about .pill { border-color: rgba(37, 0, 20, .3); color: var(--maroon); background: transparent; font-weight: 700; }
.pill { color: var(--cream); border-color: var(--line); }

/* 02 / CALON: OREN (Vibrant Orange Background) */
.candidates { background: var(--brand-orange); color: var(--brand-navy); }
.candidates .section-kicker h2 { color: var(--brand-navy); }
.candidates .section-kicker .number { color: var(--brand-burgundy); font-weight: 700; font-size: 12px; }
.candidate-intro { color: var(--brand-navy); font-weight: 600; font-size: 16px; opacity: 1; }
.candidate-card { background: var(--brand-navy); border: 2px solid rgba(255, 249, 239, .35); box-shadow: 10px 10px 0 var(--brand-burgundy); }
.candidate-card:hover { transform: translateY(-4px); box-shadow: 14px 14px 0 var(--brand-burgundy); border-color: var(--yellow); }
.candidate-image { background: var(--brand-burgundy); }
.candidate-image::after { background: linear-gradient(150deg, transparent 45%, rgba(0, 1, 19, .75)); }
.candidate-image img, .candidate-card:hover .candidate-image img { filter: none; }
.candidate-no { color: var(--brand-amber); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.candidate-name { color: var(--cream); font-weight: 700; }
.candidate-tag { background: var(--brand-amber); color: var(--brand-navy); font-weight: 700; padding: 4px 8px; border-radius: 2px; }
.candidate-click-hint { color: var(--brand-amber); font-weight: 700; opacity: 1; font-size: 10px; }
.candidate-actions { border-top-color: rgba(255, 249, 239, .3); }
.btn-card-profile { background: rgba(255, 249, 239, .15); border: 1.5px solid var(--cream); color: var(--cream); font-weight: 700; }
.btn-card-profile:hover { background: var(--cream); color: var(--brand-navy); border-color: var(--cream); }
.btn-card-vote { background: var(--brand-amber); color: var(--brand-navy); font-weight: 700; }
.btn-card-vote:hover { background: var(--cream); color: var(--brand-navy); }
.candidate-carousel-nav { display: none; }

/* 03 / TIMELINE: MERAH (Deep Burgundy Red Background) */
.timeline { background: var(--brand-burgundy); color: var(--cream); }
.timeline .section-kicker h2 { color: var(--cream); }
.timeline .section-kicker .number { color: var(--brand-amber); font-weight: 700; font-size: 12px; }
.timeline-list { border-top: 1.5px solid var(--line); }
.time-row { border-bottom: 1.5px solid var(--line); }
.time-no { color: var(--brand-amber); font-weight: 700; }
.time-row h3 { color: var(--cream); font-weight: 700; }
.time-row p { color: var(--cream); opacity: 1; font-size: 15px; font-weight: 500; }
.time-date { background: var(--brand-amber); color: var(--brand-navy); font-weight: 700; padding: 5px 12px; border-radius: 2px; font-size: 11px; text-align: center; }
.time-row:hover { background: rgba(255, 180, 43, .12); }

/* 04 / STATUS BILIK SUARA: BIRU GELAP (Dark Navy Background) */
.vote { background: var(--brand-navy); color: var(--cream); }
.vote .section-kicker {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin-bottom: 24px !important;
}
.vote .section-kicker h2 { color: var(--cream); }
.vote .section-kicker .number { color: var(--brand-amber); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; }
.vote-copy { color: var(--cream); opacity: 1; font-size: 20px; font-weight: 500; }
.vote .btn-primary { background: var(--brand-amber); color: var(--brand-navy); font-weight: 700; }
.vote .btn-primary:hover { background: var(--cream); color: var(--brand-navy); }
.status-box { background: var(--brand-amber); color: var(--brand-navy); border: 0; padding: 28px 26px; border-radius: 4px; box-shadow: 10px 10px 0 var(--brand-burgundy); }
.status-box small { color: var(--brand-navy); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.status-box strong { color: var(--brand-navy); font-weight: 700; }
.countdown-grid { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin: 12px 0 14px; }
.countdown-item { display: flex; flex-direction: column; align-items: center; min-width: 0; flex: 1; text-align: center; }
.countdown-num { font: 400 clamp(42px, 5.5vw, 68px) var(--display); line-height: 0.88; color: var(--brand-navy); font-variant-numeric: tabular-nums; font-weight: 700; }
.countdown-tag { font: 700 10px var(--mono); color: var(--brand-burgundy); font-weight: 700; letter-spacing: 0.06em; margin-top: 6px; }
.countdown-sep { font: 400 clamp(32px, 4.5vw, 52px) var(--display); color: var(--brand-burgundy); line-height: 0.88; font-weight: 700; opacity: 0.6; align-self: center; margin-bottom: 14px; }

/* FOOTER */
.footer { background: var(--brand-navy); border-top: 1.5px solid var(--line); color: var(--cream); opacity: 1; align-items: center; }
.footer span { color: var(--cream); font-weight: 700; font-size: 12px; opacity: 1; }
.footer-brand, .admin-brand { display: flex; align-items: center; gap: 14px; }

/* MODALS */
.modal-backdrop {
  background: rgba(0, 1, 19, .88);
  padding: 24px 20px;
  box-sizing: border-box;
}
.modal, .confirm-box {
  box-shadow: 6px 6px 0 var(--orange);
  box-sizing: border-box;
}
.confirm-box {
  width: min(440px, calc(100vw - 36px)) !important;
  max-width: calc(100vw - 36px) !important;
  padding: 28px 24px !important;
  border-radius: 3px;
  margin: auto;
}
.confirm-box h2 {
  font-size: clamp(24px, 5.5vw, 32px) !important;
  margin: 6px 0 10px !important;
  line-height: 1 !important;
}
.confirm-box p, #noticeMessage {
  font-size: 13.5px !important;
  line-height: 1.55 !important;
}
.modal-visual::after { background: linear-gradient(180deg, transparent 35%, rgba(0, 1, 19, .85)); }
.modal-content p, .modal-slide ul, .admin-note { color: #644C58; }
.modal-close {
  background: transparent !important;
  color: var(--brand-burgundy) !important;
  border: 1.5px solid rgba(37, 0, 20, 0.22) !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 300 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}
.modal-close:hover {
  background: rgba(37, 0, 20, 0.08) !important;
  border-color: var(--brand-burgundy) !important;
  color: var(--brand-orange) !important;
  transform: rotate(90deg);
}
.email-input-group input { min-width: 0; }
.email-input-group:focus-within { outline: 2px solid var(--maroon); outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.modal :focus-visible, .confirm-box :focus-visible, .status-box :focus-visible { outline-color: var(--maroon); }
.btn, .btn-nav-verify, .btn-card-profile, .btn-card-vote, .slide-btn { min-height: 44px; }
.hero-dot { height: 24px; background: transparent; position: relative; }
.hero-dot::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; top: 10px; background: var(--line); }
.hero-dot.active { background: transparent; }
.hero-dot.active::before { background: var(--yellow); }

/* ADMIN PAGE */
.admin-page { --red: var(--orange); }
.admin-page .top { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.admin-page .admin-brand > .brand-logo { width: 56px; height: 56px; }
.admin-page .top h1 { font-size: clamp(38px, 5vw, 56px); }
.admin-page .panel { border-color: var(--line); }
.admin-page .btn { background: var(--gold); color: var(--night); font-weight: 700; }
.admin-page .btn.alt { background: transparent; border-color: var(--line); color: var(--cream); font-weight: 700; }
.admin-page .btn.danger { background: var(--orange); color: var(--night); font-weight: 700; }
.admin-page .input { border-color: var(--line); background: var(--night); color: var(--cream); }
.admin-page input[type="datetime-local"] { color-scheme: dark; }
.admin-page .modal-box { --red: #963611; }
.admin-page .modal-box :focus-visible { outline-color: var(--maroon); }
.admin-page .admin-tab { min-height: 44px; font-weight: 700; }
.schedule-grid { background: var(--night); padding: 18px; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.schedule-grid > div { min-width: 0; }
.schedule-grid input { min-width: 0; }

@media (max-width: 820px) {
  /* HERO MOBILE CLEANUP */
  .hero { padding-top: 110px !important; padding-bottom: 45px !important; }
  .hero-spark, .hero-petals { display: none !important; /* Remove overlapping decorative stickers on mobile */ }
  .hero-sticker { display: none !important; /* Remove overlapping round badge that clashes with the card */ }
  .hero-title { font-size: clamp(52px, 13vw, 86px) !important; margin: 12px 0 16px !important; }
  .hero-lead { font-size: 15px !important; line-height: 1.55 !important; }
  .hero-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 20px !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 13px 18px !important;
    font-size: 11px !important;
  }
  .hero-visual { margin-top: 24px !important; min-height: auto !important; }
  .hero-card {
    height: 310px !important;
    border-radius: 4px 36px 4px 4px !important;
    box-shadow: 8px 8px 0 var(--night) !important;
  }
  .hero-card::after {
    background: linear-gradient(180deg, rgba(0, 1, 19, 0.1) 0%, rgba(0, 1, 19, 0.75) 50%, rgba(0, 1, 19, 0.95) 100%) !important;
  }
  .hero-art-label {
    bottom: 14px !important;
    left: 16px !important;
    right: 16px !important;
  }
  .hero-art-label strong {
    font-size: 26px !important;
    line-height: 1 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9) !important;
  }
  .hero-art-label span {
    font-size: 11px !important;
  }

  /* CANDIDATES MOBILE HORIZONTAL CAROUSEL */
  .candidates { overflow-x: clip; padding: 60px 0 !important; }
  .candidate-grid {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 14px !important;
    margin-inline: -4vw !important;
    padding-inline: 4vw !important;
    padding-bottom: 10px !important;
    scrollbar-width: none !important;
  }
  .candidate-grid::-webkit-scrollbar {
    display: none !important;
  }
  .candidate-card {
    flex: 0 0 min(80vw, 320px) !important;
    width: min(80vw, 320px) !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal !important;
    padding: 12px !important;
    box-shadow: 6px 6px 0 var(--brand-burgundy) !important;
  }
  .candidate-image {
    height: 250px !important;
  }
  .candidate-name {
    font-size: 24px !important;
  }
  .candidate-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding-top: 10px !important;
  }
  .btn-card-profile, .btn-card-vote {
    padding: 10px 6px !important;
    font-size: 10.5px !important;
  }
  .candidate-carousel-nav {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }
  .cand-dot {
    border: 0 !important;
    width: 28px !important;
    height: 4px !important;
    padding: 0 !important;
    background: rgba(0, 1, 19, .3) !important;
    border-radius: 2px !important;
    transition: 0.25s !important;
    cursor: pointer !important;
  }
  .cand-dot.active {
    background: var(--night) !important;
    width: 52px !important;
  }

  /* TIMELINE MOBILE: STRUCTURED GRID AREAS WITHOUT BROKEN/CLUMPED BADGES */
  .timeline { padding: 60px 0 !important; }
  .timeline-list { border-top: 1.5px solid var(--line) !important; }
  .time-row {
    display: grid !important;
    grid-template-columns: 44px 1fr auto !important;
    grid-template-areas:
      "num title date"
      "num desc desc" !important;
    column-gap: 12px !important;
    row-gap: 4px !important;
    align-items: baseline !important;
    padding: 18px 0 !important;
    border-bottom: 1.5px solid var(--line) !important;
  }
  .time-no {
    grid-area: num !important;
    font-size: 32px !important;
    line-height: 1 !important;
    align-self: start !important;
    margin-top: 2px !important;
  }
  .time-row h3 {
    grid-area: title !important;
    font-size: 20px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  .time-date {
    grid-area: date !important;
    white-space: nowrap !important;
    padding: 4px 10px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    width: fit-content !important;
    justify-self: end !important;
  }
  .time-row p {
    grid-area: desc !important;
    margin: 2px 0 0 !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    color: var(--cream) !important;
    opacity: 0.95 !important;
  }

  /* BILIK SUARA MOBILE */
  .vote { padding: 60px 0 !important; }
  .vote-copy {
    font-size: 16.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 18px !important;
  }
  .vote .btn-primary {
    width: 100% !important;
    justify-content: center !important;
  }
  .status-box {
    margin-top: 10px !important;
    padding: 20px 16px !important;
  }
  .status-box strong {
    font-size: 44px !important;
    line-height: 0.9 !important;
  }

  .footer { align-items: flex-start; padding: 24px 5vw !important; }
}

@media (max-width: 480px) {
  .topbar { padding: 10px 4vw; gap: 12px; }
  .brand { font-size: 14px; gap: 7px; }
  .brand-logo { width: 32px; height: 34px; }
  .btn-nav-verify { font-size: 9px; padding: 8px; letter-spacing: 0; max-width: 155px; text-align: left; }
  .navlinks { gap: 0; min-width: 0; }
  .user-pill { flex-wrap: wrap; justify-content: flex-end; max-width: 180px; padding: 4px 7px; gap: 4px; }
  .user-greeting { font-size: 9px; overflow-wrap: anywhere; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { padding: 14px 16px; }
  .hero-card { height: 360px; border-top-right-radius: 36px; }
  .hero-art-label { left: 18px; right: 18px; }
  .hero-art-label strong { font-size: 32px; max-width: 200px; }
  .section-kicker { gap: 12px; }
  .section-kicker h2 { font-size: 52px; }
  .section-kicker .number { font-size: 9px; }
  .status-box { padding: 22px 18px; }
  .countdown-num { font-size: 42px; }
  .modal-backdrop { padding: 24px 20px !important; }
  .confirm-box {
    width: min(330px, 84vw) !important;
    max-width: 84vw !important;
    padding: 22px 18px !important;
    box-shadow: 4px 4px 0 var(--orange) !important;
    box-sizing: border-box !important;
    margin: auto !important;
  }
  .confirm-box h2 {
    font-size: clamp(20px, 5.5vw, 24px) !important;
    margin: 4px 0 8px !important;
    line-height: 1 !important;
  }
  .confirm-box .eyebrow {
    font-size: 9px !important;
    margin-bottom: 4px !important;
  }
  #noticeMessage {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }
  .confirm-actions {
    display: flex !important;
    gap: 8px !important;
    padding-top: 12px !important;
  }
  .confirm-actions .btn {
    padding: 9px 12px !important;
    font-size: 10px !important;
    min-height: 38px !important;
    flex: 1 !important;
    justify-content: center !important;
  }
  .email-input-group input { padding: 12px 9px; font-size: 12px; }
  .email-input-group .email-suffix { padding: 12px 8px; font-size: 10px; }
  .modal {
    width: min(400px, calc(100vw - 36px)) !important;
    max-width: calc(100vw - 36px) !important;
    box-shadow: 5px 5px 0 var(--coral) !important;
  }
  .modal-content { padding: 24px 18px; }
  .modal-content h2 { font-size: 38px; }
  .admin-page .panel { padding: 18px; }
  .schedule-grid { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  #clearScheduleBtn, #saveScheduleBtn { flex: 1; padding-inline: 12px; }
  .admin-page .actions { flex-wrap: wrap; }
  .admin-page .row { gap: 12px; flex-wrap: wrap; }
  .admin-page .top h1 { font-size: 36px; }
  .admin-page .admin-brand > .brand-logo { width: 44px; height: 44px; }
}

/* 03 / ALUR: TATA CARA PEMILIHAN (Burgundy Section) */
.timeline-intro { max-width: 640px; margin: -10px 0 36px; font-size: 16.5px; line-height: 1.5; color: var(--cream); opacity: .9; font-weight: 500; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 2px solid var(--brand-amber); }
.howto-step { padding: 24px 22px 28px 0; border-right: 1px solid rgba(255, 249, 239, .2); }
.howto-step + .howto-step { padding-left: 22px; }
.howto-step:last-child { border-right: 0; }
.howto-no { display: block; font: 400 44px/1 var(--display); color: var(--brand-amber); margin-bottom: 18px; }
.howto-step h3 { font: 400 24px/1.05 var(--display); text-transform: uppercase; color: var(--cream); margin: 0 0 10px; }
.howto-step p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--cream); opacity: .88; }
.howto-step b { color: var(--brand-amber); }
.howto-foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 249, 239, .2); }
.howto-btn { background: var(--brand-amber); color: var(--brand-navy); border: 0; min-height: 48px; padding: 0 26px; cursor: pointer; font-weight: 700; font-family: 'Space Mono', monospace; letter-spacing: .05em; text-transform: uppercase; transition: .2s; }
.howto-btn:hover { background: var(--cream); color: var(--brand-navy); transform: translateY(-2px); }
.howto-btn:focus-visible { outline: 3px solid var(--brand-amber); outline-offset: 3px; }
.howto-note { font-size: 13px; color: var(--cream); opacity: .75; }
@media (max-width: 1080px) {
  .howto-steps { grid-template-columns: repeat(2, 1fr); }
  .howto-step, .howto-step + .howto-step { padding: 22px 20px 24px 0; border-right: 0; border-bottom: 1px solid rgba(255, 249, 239, .2); }
  .howto-step:nth-child(even) { padding-left: 20px; border-left: 1px solid rgba(255, 249, 239, .2); }
}
@media (max-width: 640px) {
  .timeline-intro { font-size: 15px; margin-bottom: 24px; }
  .howto-steps { grid-template-columns: 1fr; }
  .howto-step, .howto-step + .howto-step, .howto-step:nth-child(even) { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 20px 0; border-left: 0; border-bottom: 1px solid rgba(255, 249, 239, .2); }
  .howto-no { grid-row: span 2; font-size: 34px; margin: 0; }
  .howto-step h3 { font-size: 21px; margin-bottom: 6px; }
  .howto-step:last-child { border-bottom: 0; }
  .howto-foot { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 10px; }
  .howto-btn { width: 100%; text-align: center; }
}

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