/* Jaikopi: shared styles for index.html and jaikopi-menu.html */

:root {
  --meja: #28271f;
  --meja-2: #2d2c23;
  --meja-3: #37362b;
  --kuning: #f8c300;
  --kuning-tua: #d9a900;
  --arang: #231f20;
  --kertas: #f4f1e6;
  --kertas-2: #e3e0d4;
  --kertas-3: #d2cfc2;
  --teks: #f5f3ea;
  --teks-redup: #bdb9a6;
  --garis-gelap: rgba(245, 243, 234, 0.14);
  --garis-nota: rgba(35, 31, 32, 0.16);
  --tinta-redup: #5d5850;

  --f-sans: "Archivo", system-ui, sans-serif;
  --f-script: "Kaushan Script", cursive;

  --pad: clamp(16px, 4vw, 40px);
  --maks: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 6px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--meja);
  color: var(--teks);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
/* the tilted under-sheets of the slips may poke past the screen edge; clip (unlike hidden) keeps position: sticky working */
main, .kaki { overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--kuning); color: var(--arang); }
:focus-visible { outline: 3px solid var(--kuning); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--meja-3) var(--meja); }

.wadah { width: 100%; max-width: var(--maks); margin-inline: auto; padding-inline: var(--pad); }

.lewati {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--kuning); color: var(--arang); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.lewati:focus { top: 12px; }

/* ---------- Display type ---------- */

.judul {
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.judul em { font-style: normal; color: var(--kuning); }
.judul-1 { font-size: clamp(2.9rem, 7.4vw, 5.75rem); }
.judul-2 { font-size: clamp(2.1rem, 4.8vw, 3.75rem); }
.judul-3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.02; }

.tagline {
  font-family: var(--f-script);
  color: var(--kuning);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.1;
  transform: rotate(-3deg);
  transform-origin: left;
  display: inline-block;
}

.lede { max-width: 34rem; color: var(--teks); font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); }
.redup { color: var(--teks-redup); }

/* ---------- Buttons ---------- */

.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border-radius: var(--r);
  font-weight: 700; font-size: 1rem; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.tombol svg { width: 20px; height: 20px; flex: none; }
.tombol:active { transform: translateY(1px); }
.tombol-utama { background: var(--kuning); color: var(--arang); }
.tombol-utama:hover { background: #ffd22e; }
.tombol-garis { border-color: var(--garis-gelap); color: var(--teks); background: transparent; }
.tombol-garis:hover { border-color: var(--kuning); color: var(--kuning); }
.tombol-arang { background: var(--arang); color: var(--kuning); }
.tombol-arang:hover { background: #000; }
.tombol-kecil { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }

.tautan {
  font-weight: 700; color: var(--teks); text-decoration: underline;
  text-decoration-color: var(--kuning); text-decoration-thickness: 2px; text-underline-offset: 5px;
  display: inline-flex; align-items: center; min-height: 44px;
}
.tautan:hover { color: var(--kuning); }

/* ---------- Top bar ---------- */

.atas {
  position: sticky; top: 0; z-index: 50;
  background: var(--meja);
  border-bottom: 1px solid var(--garis-gelap);
}
.atas .wadah { display: flex; align-items: center; gap: 16px; height: var(--nav-h); }
.merek { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 44px; }
.merek img { width: 34px; height: auto; }
.merek span { font-weight: 900; font-variation-settings: "wdth" 115; font-size: 1.25rem; letter-spacing: 0.02em; }
.atas-nav { display: flex; align-items: center; gap: 4px; }
.atas-nav a:not(.tombol) {
  text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r);
}
.atas-nav a:not(.tombol):hover { color: var(--kuning); }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--teks-redup); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teks-redup); flex: none; }
.status[data-buka="ya"] { color: var(--teks); }
.status[data-buka="ya"]::before { background: #7ed957; }

@media (max-width: 720px) {
  .sembunyi-hp, .atas-nav .sembunyi-hp { display: none; }
  .atas .status { display: none; }
}

/* ---------- Nota (the order slip) ---------- */

.nota {
  position: relative;
  background: var(--kertas);
  color: var(--arang);
  border-radius: 2px;
  font-variation-settings: "wdth" 90;
  --baris: 2.75rem;
}
/* the pad underneath: depth from stacked sheets only.
   A rotated .nota is its own stacking context, so the paper colour lives on the
   children and the sheets (z-index -1) stay behind them. */
.nota.bertumpuk { background: transparent; }
.nota.bertumpuk .nota-isi { background: var(--kertas); border-radius: 0 0 2px 2px; }
.nota.bertumpuk::before, .nota.bertumpuk::after {
  content: ""; position: absolute; inset: 0; border-radius: 2px; z-index: -1;
}
.nota.bertumpuk::before { background: var(--kertas-2); transform: translate(10px, 10px) rotate(2.2deg); }
.nota.bertumpuk::after { background: var(--kertas-3); transform: translate(18px, 20px) rotate(4deg); }

.nota-kepala {
  background: var(--kuning);
  padding: 14px 20px 12px;
  display: flex; align-items: center; gap: 12px;
  /* perforated top edge */
  -webkit-mask: radial-gradient(circle 5px at 9px 0, transparent 98%, #000) -9px 0 / 18px 100% repeat-x;
          mask: radial-gradient(circle 5px at 9px 0, transparent 98%, #000) -9px 0 / 18px 100% repeat-x;
}
.nota-kepala img { width: 30px; }
.nota-kepala .nama { font-weight: 900; font-variation-settings: "wdth" 115; font-size: 1.125rem; line-height: 1; }
.nota-kepala .jenis { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.nota-kepala .no { margin-left: auto; font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.nota-isi { padding: 6px 20px 20px; }

.nota-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 14px; padding: 12px 0 10px; border-bottom: 2px solid var(--arang); font-size: 0.8125rem; }
.nota-meta div { display: flex; gap: 6px; align-items: baseline; }
.nota-meta dt { color: var(--tinta-redup); font-weight: 600; }
.nota-meta dd { margin: 0; font-weight: 800; }

.nota-kolom, .nota-baris {
  display: grid; grid-template-columns: 3.4rem 1fr auto; gap: 10px; align-items: center;
}
.nota-kolom { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tinta-redup); padding: 8px 0 4px; }
.nota-kolom span:last-child, .nota-baris .harga { text-align: right; }

.nota-baris {
  min-height: var(--baris);
  border-bottom: 1px solid var(--garis-nota);
  font-size: 0.9375rem;
}
.nota-baris .jam { font-size: 0.8125rem; font-weight: 600; color: var(--tinta-redup); font-variant-numeric: tabular-nums; }
.nota-baris .item { font-weight: 700; line-height: 1.2; }
.nota-baris .item small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--tinta-redup); }
.nota-baris .harga { font-weight: 700; font-variant-numeric: tabular-nums; }

.nota-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px solid var(--arang); margin-top: 6px; padding-top: 12px;
  font-weight: 900; font-variation-settings: "wdth" 110; text-transform: uppercase;
}
.nota-total .angka { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.cap {
  display: table; margin: 16px 0 0 auto; position: relative;
  border: 3px solid var(--arang); background: var(--kuning); color: var(--arang);
  padding: 6px 12px 5px; transform: rotate(-9deg);
  font-weight: 900; font-variation-settings: "wdth" 120; text-transform: uppercase; font-size: 0.875rem; line-height: 1.1; text-align: center;
}
.cap small { display: block; font-size: 0.6875rem; font-weight: 700; }

.nota-catatan { font-size: 0.8125rem; color: var(--teks-redup); margin-top: 28px; }

/* ---------- Footer ---------- */

.kaki { border-top: 1px solid var(--garis-gelap); padding-block: 40px 48px; font-size: 0.9375rem; }
.kaki .wadah { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.kaki ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.kaki a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }
.kaki a:hover { color: var(--kuning); }
.kaki svg { width: 18px; height: 18px; }

/* ---------- Motion: slips and prints land on the table ----------
   Content is hidden only once JS has flagged the page (.js, set in <head>);
   .muncul-semua is a safety net that reveals everything if the script never runs. */
@media (prefers-reduced-motion: no-preference) {
  .js :is([data-muncul], .pembuka > *, .bab-pembuka, .asal figure,
          .acara-atas > *, .panel-acara > p, .foto-acara figure, .nota-reservasi, .papan-atas, .nota-harga,
          .datang .wadah > div:first-child, .jadwal, .bagian-atas, .kartu) {
    opacity: 0; translate: 0 22px; rotate: -1.5deg;
    transition: opacity 0.6s var(--ease), translate 0.9s var(--ease), rotate 1.1s var(--ease);
    transition-delay: var(--tunda, 0ms);
  }
  /* the hero slip drops in from a little higher, still turning */
  .js .nota-lekat .nota { opacity: 0; translate: 0 -28px; rotate: -6deg; transition: opacity 0.6s var(--ease), translate 1s var(--ease), rotate 1.3s var(--ease); transition-delay: 0.25s; }
  /* prints settle from a slight zoom */
  .js :is(.foto-acara figure, .asal figure, .kartu figure) img { scale: 1.07; transition: scale 1.4s var(--ease); transition-delay: var(--tunda, 0ms); }
  .asal figure, .kartu figure { overflow: hidden; border-radius: 2px; }

  /* :is() takes its heaviest argument's specificity, so the revealed state repeats the same list plus .masuk */
  .js :is([data-muncul], .pembuka > *, .bab-pembuka, .asal figure,
          .acara-atas > *, .panel-acara > p, .foto-acara figure, .nota-reservasi, .papan-atas, .nota-harga,
          .datang .wadah > div:first-child, .jadwal, .bagian-atas, .kartu).masuk,
  .js .nota-lekat .nota.masuk,
  .muncul-semua :is([data-muncul], .pembuka > *, .nota-lekat .nota, .bab-pembuka, .asal figure,
          .acara-atas > *, .panel-acara > p, .foto-acara figure, .nota-reservasi, .papan-atas, .nota-harga,
          .datang .wadah > div:first-child, .jadwal, .bagian-atas, .kartu) { opacity: 1; translate: 0 0; rotate: 0deg; }
  .js :is(.foto-acara figure.masuk, .asal figure.masuk, .kartu.masuk figure) img,
  .muncul-semua :is(.foto-acara figure, .asal figure, .kartu figure) img { scale: 1; }

  @media (hover: hover) {
    .js .foto-acara figure.masuk:hover img { scale: 1.035; transition-delay: 0ms; }
  }

  /* menu feedback: the price chip gives under the thumb, the slip's total flashes yellow */
  @keyframes tekan { 40% { scale: 0.9; } }
  .tambah.tekan { animation: tekan 0.26s var(--ease); }
}
@keyframes denyut { from { background-color: var(--kuning); } to { background-color: transparent; } }
.bar-nota.denyut .ringkas strong { animation: denyut 0.8s ease-out; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
