/* ==========================================================================
   LANDING YAYASAN BERKAH INSAN SEMESTA
   Palet & font sama dengan dashboard /absen: navy (teks), biru langit
   (interaktif), lime/olive dari lengkungan logo sebagai satu-satunya aksen.
   Tema terang saja: logo dan foto dapur hidup di atas latar terang.
   Dial: ENERGY 3 · RHYTHM 3 · MOTION 3 (hero masuk berurutan, section muncul
   saat di-scroll, ganti hari menu bergeser). Semua mati di reduced-motion.
   ========================================================================== */

:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-2: #eef1ea;
  --border: #dfe3da;
  --ink: #21304b;
  --ink-2: #45536b;
  --muted: #5b6678;
  --blue: #1a6aa0;
  --blue-hover: #155884;
  --lime: #c3d14f;
  --olive: #52680f;
  --olive-line: #8a9a1c;

  --radius: 14px;
  --radius-lg: 24px;
  --wrap: 1120px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 247, 242, 0.94);
  border-bottom: 1px solid var(--border);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2);
  padding: 10px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav .nav__staff { color: var(--ink); border: 1.5px solid var(--ink); margin-left: 8px; }
.nav .nav__staff:hover { background: var(--ink); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn:active { transform: translateY(1px); }
.is-disabled { opacity: 0.5; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero__kicker { font-weight: 700; color: var(--olive); margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; max-width: 14ch; text-wrap: balance; }
.hero__lead { margin-top: 22px; font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat { order: 1; }
.rings { order: 2; width: 100%; max-width: 440px; height: auto; margin-top: -8px; overflow: visible; }
.ring { fill: none; stroke-linecap: round; }
.ring--1 { stroke: var(--lime); stroke-width: 22; }
.ring--2 { stroke: var(--olive-line); stroke-width: 14; }
.ring--3 { stroke: var(--blue); stroke-width: 9; }
.stat__num { display: block; font-size: clamp(64px, 9vw, 112px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat__label { display: block; margin-top: 10px; font-weight: 600; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .ring { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.2s cubic-bezier(.2,.7,.2,1) forwards; }
  .ring--2 { animation-delay: .15s; }
  .ring--3 { animation-delay: .3s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- Doors ---------- */
.doors { padding: 24px 0 88px; }
.doors__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.door {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--lime); color: var(--ink); text-decoration: none;
  border-radius: var(--radius-lg); padding: 36px;
  min-height: 320px;
}
.door__eyebrow { font-weight: 700; font-size: 15px; }
.door h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; }
.door p { font-size: 17px; max-width: 34ch; }
.door__cta { margin-top: auto; font-weight: 800; font-size: 17px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

.door-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.door-row {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 28px; text-decoration: none; min-height: 96px;
}
.door-row + .door-row { border-top: 1px solid var(--border); }
.door-row__text { display: flex; flex-direction: column; gap: 4px; }
.door-row strong { font-size: 19px; font-weight: 800; }
.door-row__text span { color: var(--ink-2); }
a.door-row:hover strong { color: var(--blue); }
.chev { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.soon {
  flex: none; font-size: 13px; font-weight: 700; color: var(--ink-2);
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.door .soon { position: absolute; top: 24px; right: 24px; background: rgba(255,255,255,.6); border-color: transparent; color: var(--ink); }

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2, .team h2, .place h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.section-head p, .team__intro p { margin-top: 10px; color: var(--ink-2); font-size: 17px; max-width: 48ch; }

/* ---------- Menu harian (dari caption Instagram) ---------- */
.menu { padding: 88px 0; background: var(--surface); border-block: 1px solid var(--border); }
.menu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.menu__photo {
  display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface-2);
}
.menu__photo img { width: 100%; height: 100%; object-fit: cover; }
.menu__kicker { font-weight: 700; color: var(--olive); margin-bottom: 10px; }
.menu h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.menu__dishes { list-style: none; margin: 24px 0 0; padding: 0; }
.menu__dishes li {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: 19px; font-weight: 600;
}
.menu__dishes li:first-child { border-top: 1px solid var(--border); }
.menu__dishes .menu__note { font-weight: 500; color: var(--ink-2); font-size: 16px; }
.menu__week { margin-top: 28px; }
.menu__week-label { font-weight: 700; font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.menu__days { display: flex; flex-wrap: wrap; gap: 8px; }
.menu__days { position: relative; }
.menu__days .chip { position: relative; z-index: 1; padding: 0 14px; min-width: 56px; transition: color 200ms ease, border-color 200ms ease; }
/* Pil gelap yang bergeser ke hari aktif (diposisikan landing.js). */
.menu__days.has-pill .chip.is-active { background: transparent; border-color: transparent; }
.menu__days-pill {
  position: absolute; top: 0; left: 0; height: 44px; border-radius: 999px;
  background: var(--ink); pointer-events: none;
  transition: transform 380ms cubic-bezier(.3,.8,.2,1), width 380ms cubic-bezier(.3,.8,.2,1);
}
.menu__photo { touch-action: pan-y; }
.menu__photo img { will-change: transform, opacity; }
.menu__days .chip[disabled] { opacity: .45; cursor: default; }
.menu__fallback { margin-top: 16px; color: var(--ink-2); }
.menu__fallback a { color: var(--blue); font-weight: 600; }

/* ---------- Video (Reels) ---------- */
.videos { padding: 88px 0; }
.videos__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.video {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 9 / 16; border-radius: var(--radius); background: var(--surface-2);
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
a.video:hover img { transform: scale(1.03); }
.video__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(33, 48, 75, 0.75); display: grid; place-items: center;
}
.video__play svg { width: 18px; height: 18px; fill: #fff; margin-left: 3px; }
.video__date {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 13px; font-weight: 700;
}
.videos__fallback { color: var(--ink-2); }
.videos__fallback a { color: var(--blue); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .video img { transition: none; } }

/* ---------- Team ---------- */
.team { padding: 96px 0; }
.team__grid { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 56px; align-items: start; }
.team__intro { position: sticky; top: 100px; }
.kitchen-pick { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--ink);
}
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.person {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px;
}
.person--lead { padding: 20px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); font-weight: 800; font-size: 18px;
}
.person--lead .avatar { width: 64px; height: 64px; background: var(--lime); font-size: 20px; }
.avatar--photo { overflow: hidden; background: var(--surface-2); }
.person--lead .avatar--photo { width: 72px; height: 72px; background: var(--surface-2); }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; }
.person strong { display: block; font-size: 17px; }
.person em { font-style: normal; color: var(--olive); font-weight: 700; font-size: 15px; }

/* ---------- Place ---------- */
.place { padding: 88px 0 104px; background: var(--ink); color: #fff; }
.place__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: stretch; }
.place dl { margin: 28px 0 0; display: grid; gap: 20px; }
.place dt { font-size: 14px; font-weight: 700; color: var(--lime); }
.place dd { margin: 4px 0 0; font-size: 18px; }
.place dd a { color: #fff; text-underline-offset: 4px; }
.place__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn--outline-light { border: 1.5px solid #fff; color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--ink); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #d4e06a; }
.place__map { min-height: 340px; border-radius: var(--radius-lg); overflow: hidden; background: #2b3a57; }
.place__map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 40px; background: var(--surface); }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
.footer__bgn { display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: 15px; }
.footer__copy { color: var(--muted); font-size: 14px; }
.footer__copy a { color: var(--blue); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero__grid, .doors__grid, .team__grid, .place__grid, .menu__grid { grid-template-columns: 1fr; }
  .team__intro { position: static; }
  .menu__grid { gap: 28px; }
  .menu__photo { max-width: 520px; }
  .footer__inner { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 600px) {
  .nav a:not(.nav__staff) { display: none; }
  .brand__name { font-size: 15px; }
  .door { padding: 28px 24px; min-height: 280px; }
  .door-row { padding: 20px; }
  .people { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { flex: 1 1 100%; }
  /* Video digeser ke samping di HP, bukan ditumpuk. */
  .videos__row {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px;
  }
  .video { scroll-snap-align: start; }
}
a.door { transition: transform 150ms ease; }
a.door:hover { transform: translateY(-2px); }
a.door:hover .door__cta { text-decoration-thickness: 3px; }
@media (prefers-reduced-motion: reduce) { a.door { transition: none; } a.door:hover { transform: none; } }

/* ---------- Motion ---------- */
a.video { transition: transform 250ms ease, box-shadow 250ms ease; }
a.video:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(33, 48, 75, 0.18); }
.video__play { transition: transform 250ms ease; }
a.video:hover .video__play { transform: scale(1.12); }
.chev { transition: transform 200ms ease; }
a.door-row:hover .chev { transform: translateX(4px); }
.person { transition: transform 200ms ease, border-color 200ms ease; }
.person:hover { transform: translateY(-2px); border-color: var(--olive-line); }

/* Skeleton berkilau selama feed dimuat. */
.video.is-loading, .menu[aria-busy="true"] .menu__photo {
  background: linear-gradient(100deg, var(--surface-2) 30%, #f7f9f3 50%, var(--surface-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero masuk berurutan saat halaman dibuka. */
  .hero__copy > * { animation: rise 700ms cubic-bezier(.2,.7,.2,1) both; }
  .hero__copy > :nth-child(2) { animation-delay: 80ms; }
  .hero__copy > :nth-child(3) { animation-delay: 160ms; }
  .hero__copy > :nth-child(4) { animation-delay: 240ms; }
  .stat { animation: rise 700ms 200ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }

  /* Muncul saat di-scroll (kelas dipasang landing.js). */
  .reveal { opacity: 0; transform: translateY(28px); }
  .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--d, 0ms);
  }
}
@media (prefers-reduced-motion: reduce) {
  a.video, .video__play, .chev, .person, .menu__days-pill, .menu__days .chip { transition: none; }
  a.video:hover, .person:hover { transform: none; }
  .video.is-loading, .menu[aria-busy="true"] .menu__photo { animation: none; }
}

/* ---------- Pop up masuk staf ---------- */
.staff-login {
  border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  width: min(400px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(33, 48, 75, 0.25);
}
.staff-login::backdrop { background: rgba(33, 48, 75, 0.55); }
.staff-login__form { display: grid; gap: 16px; padding: 28px 24px 24px; }
.staff-login__form h2 { font-size: 22px; margin: 0; }
.staff-login__form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.staff-login__form input {
  font: inherit; color: var(--ink); background: var(--surface); min-height: 48px; padding: 0 14px;
  border: 1.5px solid #7f8a9b; border-radius: 12px; width: 100%;
}
.staff-login__form input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.staff-login__error { margin: 0; color: #b42318; font-size: 15px; }
.staff-login__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.staff-login__actions .btn { flex: 1 1 120px; cursor: pointer; font-family: inherit; }
.staff-login__actions .btn--primary { border: 0; }
.staff-login__actions .btn--ghost { background: transparent; }
.staff-login__actions .btn:disabled { opacity: 0.6; cursor: progress; }
