/* styles.css — ArsipSulteng (final, terpadu)
   - Background video/gif + diamond overlay
   - Header + marquee + header widgets (Waktu & Translate)
   - Hero, cards, banner, footer
   - Responsive & reduced-motion friendly
*/

/* ----------------- Background media & overlay ----------------- */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.98;
  outline: none;
  display: block;
}

.bg-media {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  will-change: transform, opacity, filter;
  filter: saturate(1.05) contrast(1.03) blur(0.6px);
  transform: translateZ(0);
  animation: bgSlowShift 25s linear infinite;
  opacity: 0.98;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.14));
  mix-blend-mode: normal;
}
.bg-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(225deg, rgba(0,0,0,0.02) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,0.01) 25%, transparent 25%),
    linear-gradient(315deg, rgba(0,0,0,0.01) 25%, transparent 25%);
  background-size: 120px 120px;
  background-position: 0 0, 60px 60px, 30px 30px, 90px 90px;
  mix-blend-mode: overlay;
  opacity: 0.6;
  transform: translateZ(0);
  pointer-events: none;
  animation: facetsDrift 40s linear infinite;
}

@keyframes bgSlowShift {
  0% { background-position: 50% 48%; }
  50% { background-position: 50% 52%; }
  100% { background-position: 50% 48%; }
}
@keyframes facetsDrift {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(-8px) rotate(0.2deg); opacity: 0.64; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bg-media, .bg-overlay::after { animation: none !important; transition: none !important; }
  .bg-video { display:block; }
}

/* Mobile optim */
@media (max-width: 768px) {
  .bg-media { filter: saturate(1.02) contrast(1.02) blur(0.3px); animation-duration: 45s; }
  .bg-overlay::after { background-size: 80px 80px; }
  .bg-media, .bg-overlay { -webkit-transform: translateZ(0); transform: translateZ(0); }
}

/* Ensure content above background */
main#maincontent, header.site-header, .container { position: relative; z-index: 2; }

/* ----------------- Variables & base reset ----------------- */
:root{
  --primary: #d93025;
  --accent:  #ffcf4d;
  --white:   #ffffff;
  --muted:   #6b7280;
  --card-bg: #ffffff;
  --surface: #f7f9fc;
  --container-width: 1100px;
  --radius: 12px;
  --shadow-1: 0 6px 16px rgba(16,24,40,0.06);
  --shadow-2: 0 12px 30px rgba(16,24,40,0.08);
  --card-elev: 0 18px 40px rgba(16,24,40,0.08);
  --header-bg: #d93025;
  --header-text: #fff;
}

* { box-sizing: border-box; }
html,body { height: 100%; margin: 0; font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ----------------- Skip link ----------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}
.skip-link:focus {
  left: 10px; top:10px; width:auto; height:auto;
  background: var(--white); color:#000; padding:8px 12px; border-radius:4px; box-shadow:0 2px 6px rgba(0,0,0,0.2); text-decoration:none;
}

/* ----------------- Header / marquee / brand ----------------- */
.site-header {
  width: 100%;
  position: relative;
  z-index: 3;
  background: linear-gradient(90deg, rgba(255,199,77,0.06) 0%, rgba(217,48,37,0.08) 50%, rgba(255,255,255,0) 100%);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.header-bar {
  background: var(--header-bg);
  color: var(--header-text);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  height:56px;
  padding:0 1rem;
  gap:1rem;
  overflow:hidden;
}

.brand { display:flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--header-text); }
.brand img { height:36px; width:auto; display:block; }

/* marquee */
.marquee { display:block; white-space:nowrap; overflow:hidden; width:100%; box-sizing:border-box; margin-left:.5rem; }
.marquee__inner {
  display:inline-block;
  padding-left:100%;
  animation: marquee 18s linear infinite;
  font-weight:700; font-size:1rem; line-height:56px; color: rgba(255,255,255,0.95);
  background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(255,255,255,0.06));
  padding: 6px 12px; border-radius:10px; box-shadow:0 4px 18px rgba(0,0,0,0.06);
}
@keyframes marquee { 0%{transform:translateX(0%)} 100%{transform:translateX(-100%)} }
.marquee__inner:focus, .marquee:hover .marquee__inner { animation-play-state:paused; }

/* Header widgets container (Waktu + Translate) */
.header-widgets {
  display:flex; align-items:center; gap:10px; margin-left:auto;
}
.header-widget-card {
  background: rgba(255,255,255,0.92);
  color: #0f172a;
  padding:8px 12px;
  border-radius:10px;
  box-shadow: 0 8px 20px rgba(16,24,40,0.06);
  border: 1px solid rgba(16,24,40,0.04);
  min-width:160px;
  max-width:320px;
  font-size:13px;
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-start;
  backdrop-filter: blur(4px);
}
.header-widget-time .time-label { font-weight:700; color:#111827; text-decoration:none; }
.header-widget-time .time-value { font-weight:700; color: var(--primary); font-size:15px; }
.header-widget-translate { padding:6px 8px; width:240px; max-width:30vw; }

/* responsive header */
@media (max-width: 880px) {
  .header-bar { flex-direction:column; align-items:flex-start; height:auto; padding:8px 12px; gap:8px; }
  .marquee { order:2; width:100%; }
  .header-widgets { order:3; width:100%; gap:8px; margin-left:0; display:flex; flex-direction:column; }
  .header-widget-card { width:100%; max-width:100%; }
}
@media (max-width:480px){
  .header-widget-translate { width:100%; max-width:100%; padding:6px; }
  .header-widget-card { padding:8px; font-size:13px; }
}

/* ----------------- Video embed helper (responsive) ----------------- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 12px;
}
.video-wrapper iframe { position:absolute; top:0; left:0; width:100%; height:100%; }

/* ----------------- Layout container & body baseline ----------------- */
.container { width:95%; max-width:var(--container-width); margin:0 auto; padding-left:12px; padding-right:12px; }
body { background: transparent; color:#111827; min-height:100%; display:flex; flex-direction:column; }

/* ----------------- Hero / search card ----------------- */
.hero-wrapper {
  margin-top: 6.5vh;
  display:flex; flex-direction:column; align-items:center; text-align:center;
  padding:2.25rem 1rem; background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.7));
  border-bottom:1px solid #f0f1f4; border-radius:14px;
  width:100%; max-width:calc(var(--container-width) + 24px); box-shadow:var(--shadow-1);
}
.hero-gradient-text {
  font-size:1.4rem; font-weight:800;
  background: linear-gradient(270deg, #d93025 0%, #ffcf4d 40%, #ffffff 60%, #d93025 100%);
  background-size:600% 600%; color:transparent; -webkit-background-clip:text; background-clip:text;
  animation: gradientShift 8s ease infinite; padding:0.9rem 1rem; border-radius:12px; margin-bottom:1.25rem; box-shadow:var(--shadow-1); line-height:1.15;
}
@keyframes gradientShift { 0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%} }

/* ----------------- Search form ----------------- */
.search-form { display:flex; width:92%; max-width:720px; background:var(--card-bg); border-radius:999px; box-shadow:0 6px 18px rgba(16,24,40,0.06); overflow:hidden; transition:box-shadow .22s, transform .12s; border:1px solid rgba(16,24,40,0.04); margin:0 auto; }
.search-form:focus-within { box-shadow:0 12px 36px rgba(16,24,40,0.10); transform:translateY(-2px); }
.search-input { flex:1; padding:1rem 1.4rem; font-size:1rem; border:none; outline:none; min-width:60%; background:transparent; }
.search-input::placeholder { color:#9ca3af; }
.search-button { background: linear-gradient(180deg, var(--primary), #b82a20); color:var(--white); padding:0 1.6rem; font-size:1rem; border:none; cursor:pointer; font-weight:700; display:inline-flex; align-items:center; justify-content:center; transition: transform .12s, box-shadow .12s; border-radius:999px; }
.search-button:hover, .search-button:focus { transform:translateY(-1px); box-shadow:0 8px 20px rgba(217,48,37,0.12); }
.search-button:active { transform:translateY(0); }
.search-button:focus, .search-input:focus { outline: 3px solid rgba(34,197,94,0.12); outline-offset:2px; }

/* ----------------- License / promo / latest cards (kept compact) ----------------- */
.license-section { max-width:950px; margin:3rem auto; padding:2.25rem; background:var(--card-bg); border-radius:var(--radius); box-shadow:var(--shadow-2); color:#111827; font-size:1rem; line-height:1.7; }
.license-section h4 { font-size:1.35rem; margin-bottom:1rem; color:#b91c1c; font-weight:800; text-align:center; }
.license-section ul { padding-left:1.3rem; margin-bottom:1rem; color:var(--muted); }
.promo-section { max-width:950px; margin:2rem auto; display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.promo-card { background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92)); border-radius:12px; padding:1rem 1.2rem; box-shadow:var(--shadow-1); display:flex; flex-direction:column; justify-content:space-between; }

/* Latest grid & archive card */
.latest-section { max-width:1100px; margin:2rem auto; padding-bottom:1.5rem; }
.latest-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:18px; margin-top:12px; align-items:start; }
.archive-card { background:var(--card-bg); border-radius:12px; overflow:hidden; box-shadow:var(--shadow-1); transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s; display:flex; flex-direction:column; height:100%; will-change:transform; -webkit-tap-highlight-color:transparent; }
.archive-card:focus-within { outline:3px solid rgba(217,48,37,0.08); outline-offset:2px; }
.archive-card:hover { transform: translateY(-10px); box-shadow: var(--card-elev); }

/* thumb */
.thumb-wrap { height:260px; overflow:hidden; position:relative; background:linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.02)); }
.thumb-img { width:100%; height:100%; object-fit:cover; display:block; transform-origin:center center; transition: transform .45s cubic-bezier(.2,.9,.2,1), filter .35s; will-change:transform,filter; backface-visibility:hidden; }
.archive-card:hover .thumb-img { transform: scale(1.06) translateZ(0); filter: saturate(1.03); }

.file-badge { position:absolute; top:10px; right:10px; display:inline-flex; align-items:center; gap:6px; padding:6px 8px; border-radius:8px; background: rgba(0,0,0,0.6); color:#fff; font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:0.6px; z-index:10; backdrop-filter: blur(4px); }
.file-badge-unknown { background: rgba(75,85,99,0.8); }

/* card body */
.card-body { padding:12px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card-title { margin:0; font-size:1rem; font-weight:700; color:#0f172a; line-height:1.2; }
.truncate { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.meta { color:var(--muted); font-size:13px; margin-top:6px; }
.actions { display:flex; gap:8px; margin-top:auto; align-items:center; }
.btn { display:inline-flex; align-items:center; justify-content:center; padding:8px 10px; border-radius:8px; border:1px solid rgba(16,24,40,0.04); background:transparent; color:#0f172a; font-weight:700; }
.btn-primary { background: linear-gradient(180deg,var(--primary), #b82a20); color:#fff; border-color:transparent; }
.btn-plain { background:transparent; color:#0f172a; }

/* small responsive adjustments */
@media (max-width: 992px) { .thumb-wrap { height:220px; } .latest-grid { grid-template-columns: repeat(3,1fr); gap:16px; } }
@media (max-width: 900px)  { .latest-grid { grid-template-columns: repeat(2,1fr); } .hero-gradient-text { font-size:1.15rem; padding:0.7rem 0.8rem; } .promo-section { grid-template-columns:1fr; } }
@media (max-width: 600px)  { .search-form { flex-direction:column; border-radius:14px; padding:6px; } .search-input { padding:12px 14px; border-radius:8px; width:100% } .search-button { width:100%; border-radius:8px; padding:12px; margin-top:8px } .hero-wrapper { padding:1.2rem 0.8rem; margin-top:4vh } .hero-gradient-text { font-size:1rem } .latest-grid { grid-template-columns:1fr } .thumb-wrap { height:180px } }

/* pointer coarse */
@media (pointer: coarse) {
  .archive-card:hover { transform:none; box-shadow:var(--shadow-1); }
  .archive-card .thumb-img { transition: transform .2s ease; }
}

/* ----------------- Banner cards ----------------- */
.banner-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:18px; align-items:start; }
.banner-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 10px 28px rgba(16,24,40,0.06); transition: transform .18s, box-shadow .18s; display:flex; flex-direction:column; }
.banner-card:focus-within, .banner-card:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(16,24,40,0.12); }
.banner-img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; transition: transform .45s cubic-bezier(.2,.9,.2,1); }
.banner-caption { padding:10px 12px; font-weight:700; color:#0f172a; font-size:0.95rem; background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.96)); }
@media (max-width: 899px) {
  .banner-grid { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; gap:14px; padding:8px 4px; }
  .banner-card { flex:0 0 84%; scroll-snap-align:center; max-width:84%; }
}
@media (max-width:520px) { .banner-card { flex:0 0 92%; max-width:92%; } .banner-img { aspect-ratio:3/2 } }

/* ----------------- Footer: gradient + 3-col layout ----------------- */
.site-footer.footer-hero {
  background: linear-gradient(180deg, #8b1f1f 0%, #2b3f20 100%);
  color: #fff;
  padding: 48px 0 18px;
  margin-top: 32px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
}
.footer-inner { padding: 0 12px; max-width: var(--container-width); margin: 0 auto; color:#fff; font-size:15px; }
.footer-grid { display:grid; grid-template-columns: 1fr 1fr 360px; gap:28px; align-items:start; padding:22px 0 26px; border-bottom:1px solid rgba(255,255,255,0.04); }
.footer-col { min-width:0; }
.footer-left .footer-address { color: rgba(255,255,255,0.92); line-height:1.6; margin-bottom:18px; }
.footer-left .footer-heading-small { color:#ffd99b; margin-bottom:8px; font-weight:700; }
.store-badge img { max-width:160px; height:auto; display:inline-block; }
.footer-heading { color:#fff; font-size:1rem; margin-bottom:10px; font-weight:800; }
.menu-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.menu-list li { display:flex; align-items:flex-start; gap:12px; }
.menu-list li::before { content:""; width:10px; height:10px; border-radius:50%; background: linear-gradient(180deg,#2bd04a,#0ea13a); display:inline-block; margin-top:7px; flex:0 0 10px; }
.menu-list a { color: rgba(255,255,255,0.9); text-decoration:none; font-weight:600; }
.menu-list a:hover { text-decoration:underline; color:#fff; }

/* social/contact */
.social-row { display:flex; gap:10px; margin-bottom:12px; }
.social-icon { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; background: rgba(0,0,0,0.12); border-radius:8px; color:#fff; text-decoration:none; transition: transform .12s, background .12s; border:1px solid rgba(255,255,255,0.03); }
.social-icon svg, .social-icon i { width:18px; height:18px; display:block; color:#fff; }
.social-icon:hover { transform:translateY(-3px); background: rgba(255,255,255,0.06); }
.contact-list { display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.contact-item { display:flex; gap:8px; align-items:center; color: rgba(255,255,255,0.9); font-weight:600; }
.contact-item svg { opacity:0.95; color:#fff; }
.contact-item a { color: rgba(255,255,255,0.95); text-decoration:none; }
.contact-item a:hover { text-decoration:underline; color:#fff; }

.footer-bottom { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 0 6px; font-size:13px; color: rgba(255,255,255,0.75); }
.footer-nav-links { display:flex; gap:16px; align-items:center; }
.footer-nav-links a { color: rgba(255,255,255,0.72); text-decoration:none; font-weight:600; }
.footer-nav-links a:hover { color:#fff; text-decoration:underline; }

@media (max-width:980px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-right { order:3; } }
@media (max-width:740px) { .footer-inner { padding:24px 12px } .footer-grid { grid-template-columns:1fr; gap:18px } .store-badge img { max-width:140px } .footer-bottom { flex-direction:column; align-items:center; text-align:center; gap:10px } .footer-nav-links { justify-content:center; flex-wrap:wrap; gap:10px } .menu-list { gap:8px } }

/* ----------------- Utilities & small helpers ----------------- */
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.small-muted { color:var(--muted); font-size:0.9rem; }
.center { text-align:center; }
.footer-address div { margin-bottom:4px; }

/* ----------------- Accessibility focus visuals ----------------- */
.banner-card:focus-within { outline:2px solid rgba(217,48,37,0.12); outline-offset:4px; }
.archive-card:focus-within, .banner-card:focus-within { box-shadow: 0 12px 30px rgba(16,24,40,0.08); }

/* ----------------- End of stylesheet ----------------- */
