/* ============================================================
   sumdekjoe.com — design system
   Palette: rainforest green / hibiscus red / turmeric gold
   Type: Bricolage Grotesque (display) + Figtree (body)
          + Noto Sans SC fallback for Chinese
   ============================================================ */

:root {
  --ink: #23233a;          /* near-black with a navy undertone — body text */
  --navy: #202070;         /* BERSAMA navy — headings, links, primary buttons */
  --navy-deep: #161650;    /* hero / footer */
  --paper: #f7f7f3;        /* neutral modern off-white background */
  --card: #ffffff;
  --hijau: #202070;
  --hijau-dark: #161650;
  --bunga: #B3122F;        /* error states only */
  --kunyit: #EEBD00;       /* BERSAMA gold — accents, highlights, hover */
  --mist: #e4e4dc;         /* neutral borders */
  --muted: #62626f;        /* secondary text */
  --radius: 14px;
  --maxw: 1100px;
  --font-display: "Poppins", "Noto Sans SC", sans-serif;
  --font-body: "Figtree", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; display: block; }
a { color: var(--hijau); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--kunyit);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- signature: songket band ---------- */
.songket {
  height: 14px;
  background:
    repeating-linear-gradient(135deg,
      var(--navy) 0 10px,
      var(--kunyit) 10px 13px,
      var(--navy) 13px 23px,
      #FFFDF4 23px 26px);
  border: none;
}
.songket--thin { height: 6px; }

/* ---------- header / nav ---------- */
header.site {
  background: var(--kunyit);
  border-bottom: 3px solid var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  color: var(--navy);
}
.brand-badge {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  background: var(--navy);
  color: var(--kunyit);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-radius: 10px;
  border-bottom: 3px solid var(--kunyit);
}
.brand-name {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--navy);
  opacity: 0.75;
  text-transform: uppercase;
}
.brand:hover { text-decoration: none; }


nav.main { margin-left: auto; }
nav.main ul {
  display: flex;
  gap: 0.2rem;
  list-style: none;
  align-items: center;
}
nav.main a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
nav.main a:hover { background: rgba(255, 255, 255, 0.35); text-decoration: none; }
nav.main a.active { color: var(--navy); border-bottom-color: var(--navy); border-radius: 8px 8px 0 0; }

/* language switcher */
.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--navy);
}
.lang-switch button.on { background: var(--navy); color: var(--kunyit); }

/* mobile nav */
.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1.5px solid var(--navy);
  background: transparent;
  color: var(--navy);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  nav.main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--kunyit);
    border-bottom: 3px solid var(--navy);
    padding: 0.6rem 1.2rem 1rem;
  }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; align-items: stretch; gap: 0; }
  nav.main a { padding: 0.7rem 0.5rem; border-bottom: none; }
  nav.main a.active { background: rgba(255,255,255,0.45); border-radius: 8px; }
  .lang-switch { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero {
  background: var(--navy-deep);
  color: #FFFDF4;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4.5rem 1.2rem 3.5rem;
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--kunyit);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero h1 .accent { color: var(--kunyit); }
.hero .sub {
  margin-top: 1.2rem;
  max-width: 52ch;
  font-size: 1.1rem;
  color: #d8d8ef;
}
.hero .cta-row { margin-top: 2rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* trilingual rotating greeting */
.greet {
  display: inline-block;
  min-width: 9ch;
}
.greet span { display: none; }
.greet span.show { display: inline; animation: fadeUp 0.5s ease; }
.greet--gold span.show { color: var(--kunyit); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.07); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-accent { background: var(--kunyit); color: var(--navy); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }

/* ---------- sections ---------- */
main { min-height: 55vh; }
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.2rem 1.2rem;
}
.section > h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.section > .lede { color: var(--muted); max-width: 60ch; margin-bottom: 2rem; }

/* ---------- cards ---------- */
.grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(32, 32, 112, 0.25);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.card p { color: var(--muted); font-size: 0.95rem; }
.card .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: #eceafa;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.7rem;
}
.card .tag--red { color: var(--navy); background: #f5e6ac; }
.card .tag--gold { color: #7a6200; background: #f7ecc2; }

/* ---------- forms ---------- */
form.stack { display: grid; gap: 1rem; max-width: 640px; }
label { font-weight: 700; font-size: 0.92rem; display: grid; gap: 0.35rem; }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--mist);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  outline: none;
}
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); }

.notice {
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  display: none;
}
.notice.show { display: block; }
.notice.ok { background: #eceafa; border: 1px solid var(--navy); color: var(--navy); }
.notice.err { background: #fbe7ec; border: 1px solid var(--bunga); color: #8f1130; }
.notice code, .status-id {
  font-family: var(--font-mono);
  background: #fff;
  border: 1px dashed var(--navy);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  user-select: all;
}

/* status timeline */
.timeline { list-style: none; margin-top: 1rem; }
.timeline li {
  border-left: 3px solid var(--navy);
  padding: 0.2rem 0 0.9rem 1rem;
  position: relative;
}
.timeline li::before {
  content: "";
  width: 11px; height: 11px;
  background: var(--kunyit);
  border: 2px solid var(--navy);
  border-radius: 50%;
  position: absolute;
  left: -7px; top: 6px;
}
.timeline time { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); display: block; }

.status-pill {
  display: inline-block;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.status-pill[data-s="received"] { background: #f7ecc2; color: #7a6200; }
.status-pill[data-s="in_progress"] { background: #e2ecfa; color: #1c4e89; }
.status-pill[data-s="resolved"] { background: #eceafa; color: var(--navy); }
.status-pill[data-s="closed"] { background: #e2e2e2; color: #666; }

/* ---------- prose (about / stand / posts) ---------- */
.prose { max-width: 70ch; }
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.8rem 0 0.5rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem 1.3rem; }
.prose blockquote {
  border-left: 4px solid var(--navy);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.2rem 0;
}

/* ---------- footer ---------- */
footer.site {
  background: var(--navy-deep);
  color: #d8d8ef;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.2rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}
footer.site a { color: var(--kunyit); }


/* ---------- animated street scene (hero) ---------- */
.street {
  position: relative;
  height: 110px;
  background: linear-gradient(#fbfbf8, #f2f2ec);
  overflow: hidden;
  border-top: 3px solid var(--kunyit);
}
.street svg { position: absolute; bottom: 8px; height: 84px; width: auto; }
.walker  { animation: cross 26s linear infinite; }
.walker2 { animation: cross 34s linear infinite; animation-delay: -14s; }
.rider   { animation: cross 13s linear infinite; animation-delay: -5s; }
.hawker  { animation: cross 48s linear infinite; animation-delay: -30s; }
.elder   { animation: cross 58s linear infinite; animation-delay: -8s; }
.wheel   { animation: cross 42s linear infinite; animation-delay: -24s; }
.cars    { animation: cross 30s linear infinite; animation-delay: -18s; }
.worker  { animation: cross 38s linear infinite; animation-delay: -34s; }
.factory { right: 12px; bottom: 8px; }
.smoke {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(32, 32, 112, 0.35);
  animation: puff 5s ease-out infinite;
}
.smoke:nth-child(2) { animation-delay: 1.6s; }
.smoke:nth-child(3) { animation-delay: 3.2s; }
@keyframes puff {
  0%   { opacity: 0.7; transform: translate(0, 0) scale(0.6); }
  100% { opacity: 0;   transform: translate(-14px, -46px) scale(2.2); }
}
.pothole {
  position: absolute;
  bottom: 0;
  height: 7px;
  border-radius: 8px 8px 0 0;
  background: #000;
  opacity: 0.55;
}
@keyframes cross {
  from { transform: translateX(-140px); }
  to   { transform: translateX(calc(100vw + 140px)); }
}
.street .road {
  position: absolute; bottom: 0; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(90deg, var(--navy-deep) 0 40px, var(--kunyit) 40px 64px);
}
@media (prefers-reduced-motion: reduce) {
  .walker, .walker2, .rider, .hawker, .elder, .wheel, .cars, .worker, .smoke { animation: none; }
  .walker { transform: translateX(6vw); }
  .walker2 { transform: translateX(20vw); }
  .rider { transform: translateX(34vw); }
  .hawker { transform: translateX(48vw); }
  .elder { transform: translateX(60vw); }
  .wheel { transform: translateX(70vw); }
  .cars { transform: translateX(78vw); }
  .worker { transform: translateX(12vw); }
}

/* ---------- social row ---------- */
.social-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.social-row a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--card); color: var(--navy);
  border: 1.5px solid var(--mist);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 700; font-size: 0.9rem;
}
.social-row a:hover { background: var(--navy); color: var(--kunyit); border-color: var(--navy); text-decoration: none; }
footer .social-row a {
  background: transparent; color: var(--kunyit); border-color: var(--kunyit);
}
footer .social-row a:hover { background: var(--kunyit); color: var(--navy); }

/* ---------- footer contact ---------- */
.footer-contact { font-size: 0.88rem; line-height: 1.7; max-width: 34ch; }
.footer-contact a { color: var(--kunyit); }


/* ---------- footer newsletter ---------- */
.footer-news { max-width: 300px; font-size: 0.9rem; }
.news-form { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.news-form input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.92rem;
}
.news-form input::placeholder { color: #b9b9d6; }
.news-form input:focus { border-color: var(--kunyit); outline: none; }
.news-form .btn { padding: 0.55rem 1rem; font-size: 0.9rem; }
.footer-news .notice { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
.footer-news .notice.ok { background: rgba(238, 189, 0, 0.15); border-color: var(--kunyit); color: var(--kunyit); }
