/* SIJARI Indonesia — sijari.uk
   Palette is sampled from the logo: forest leaf greens + the gold of the wordmark. */

@font-face {
  font-family: "Krona One";
  src: url("fonts/krona-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --hutan: #0f1f14;        /* page ground */
  --rimba: #17301d;        /* raised band */
  --rimba-terang: #1f3c27; /* glow behind the logo */
  --emas: #e6be6e;         /* wordmark gold */
  --emas-terang: #f0d282;  /* bud highlight, focus */
  --kertas: #ece5cf;       /* text */
  --kertas-redup: #b9b7a2; /* secondary text */
  --garis: rgba(230, 190, 110, 0.28);

  --display: "Krona One", "Arial Black", system-ui, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --gutter: clamp(20px, 5vw, 64px);
  --ruang: clamp(72px, 10vw, 140px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--hutan);
  color: var(--kertas);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol, dl, dd, blockquote, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--emas-terang);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 16px;
  background: var(--emas);
  color: var(--hutan);
  font-family: var(--display);
  font-size: 0.8rem;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
}
.brand img { width: 118px; height: auto; }
.top nav { display: flex; gap: clamp(18px, 3.4vw, 40px); }
.top nav a {
  font-family: var(--display);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--kertas);
  padding-block: 6px;
  border-bottom: 1px solid transparent;
}
.top nav a:hover { color: var(--emas); border-bottom-color: var(--emas); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  min-height: min(82vh, 760px);
  padding-block: clamp(24px, 5vw, 56px) var(--ruang);
}

.hero-text h1 {
  font-size: clamp(2.5rem, 6.3vw, 5.4rem);
  line-height: 1.04;
  max-width: 9ch;
}
.lede {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: rgba(236, 229, 207, 0.9);
}
.age {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 40ch;
  margin: 36px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--kertas-redup);
}
.roundel {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1.5px solid var(--emas);
  border-radius: 50%;
  color: var(--emas);
  font-family: var(--display);
  font-size: 0.95rem;
}
.jump {
  display: inline-block;
  margin-top: 40px;
  padding: 14px 26px;
  border: 1px solid var(--emas);
  color: var(--emas);
  font-family: var(--display);
  font-size: 0.8rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.jump:hover { background: var(--emas); color: var(--hutan); }

.crest {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 789 / 672;
  justify-self: center;
}
.crest::before {           /* soft glow so the dark leaves separate from the ground */
  content: "";
  position: absolute;
  inset: -22%;
  background: radial-gradient(closest-side, var(--rimba-terang), rgba(31, 60, 39, 0));
  z-index: -1;
}
.crest img { width: 100%; height: 100%; }
.crest::after {            /* one gold sheen, clipped to the logo's own shape */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("img/logo.webp") center / 100% 100% no-repeat;
  mask: url("img/logo.webp") center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 247, 220, 0.85) 50%, transparent 65%) no-repeat;
  background-size: 300% 100%;
  background-position: 0 0;
}

/* ---------- shared section head ---------- */

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 24px clamp(24px, 5vw, 72px);
  margin-bottom: clamp(40px, 6vw, 80px);
}
.sec-head h2 { font-size: clamp(1.7rem, 3.6vw, 3rem); }
.sec-head p { max-width: 46ch; margin: 0; color: rgba(236, 229, 207, 0.86); }

/* ---------- produk ---------- */

.produk { padding-block: var(--ruang); }

.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(48px, 6vw, 80px) 32px;
}
.pack { min-width: 0; }

.stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(250px, 30vw, 400px);
  padding-bottom: 14px;
}
.stage::before {           /* shelf edge, runs into the neighbouring cell's edge */
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  bottom: 0;
  height: 1px;
  background: var(--emas);
  opacity: 0.55;
}
.stage::after {            /* contact shadow */
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4px;
  height: 16px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
}
.stage img {
  position: relative;
  z-index: 1;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.4));
}

.pack h3 {
  margin-top: 22px;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}
.price { margin-top: 14px; }
.price div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block: 9px;
  border-top: 1px solid var(--garis);
}
.price dt {
  font-size: 0.86rem;
  line-height: 1.3;
  color: var(--kertas-redup);
}
.price dd {
  flex: none;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--emas);
  white-space: nowrap;
}
.price dd span {
  margin-left: 2px;
  font-family: var(--text);
  font-size: 0.75rem;
  color: var(--kertas-redup);
}

/* ---------- ramuan ---------- */

.ramuan {
  padding-block: var(--ruang);
  background: var(--rimba);
  border-block: 1px solid var(--garis);
}
.ramuan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px clamp(32px, 7vw, 110px);
  align-items: start;
}
.cerita h2 { font-size: clamp(1.7rem, 3.6vw, 3rem); }
.cerita .sub {
  margin: 14px 0 32px;
  font-weight: 600;
  color: var(--emas);
}
.cerita p { max-width: 58ch; }
.cerita p + p { margin-top: 1.1em; }
.cerita strong { font-weight: 600; color: var(--emas-terang); }

.rempah li {
  padding-block: 0.5em;
  border-bottom: 1px solid var(--garis);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  line-height: 1.25;
  color: var(--emas);
}
.rempah li:first-child { border-top: 1px solid var(--garis); }

.filosofi {
  margin-top: clamp(56px, 8vw, 104px);
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 2px solid var(--emas);
}
.filosofi p {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- kemitraan ---------- */

.mitra { padding-block: var(--ruang); }

.fakta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 7vw, 110px);
  margin-bottom: clamp(56px, 8vw, 104px);
}
.fakta div { padding-block: 22px; border-top: 1px solid var(--garis); }
.fakta dt { font-family: var(--display); font-size: 1rem; color: var(--emas); }
.fakta dd { margin-top: 8px; max-width: 42ch; color: rgba(236, 229, 207, 0.86); }

.tangga-judul { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.tangga-ket { max-width: 60ch; margin: 14px 0 0; color: var(--kertas-redup); }

/* Each rung's height / bar length follows log10(poin), scaled 0..1 into --v */
.tangga li:nth-child(1) { --v: 0.143; }
.tangga li:nth-child(2) { --v: 0.343; }
.tangga li:nth-child(3) { --v: 0.429; }
.tangga li:nth-child(4) { --v: 0.629; }
.tangga li:nth-child(5) { --v: 0.714; }
.tangga li:nth-child(6) { --v: 0.914; }
.tangga li:nth-child(7) { --v: 1; }

.tangga {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin-top: 48px;
}
.tangga li {
  display: flex;
  flex-direction: column;
  height: calc(170px + var(--v) * 250px);
  padding: 16px 14px;
  border-top: 2px solid var(--emas);
  background: linear-gradient(to bottom, rgba(230, 190, 110, 0.16), rgba(230, 190, 110, 0.02));
}
.poin { font-family: var(--display); font-size: clamp(0.85rem, 1.35vw, 1.1rem); line-height: 1.25; color: var(--emas); }
.poin small { display: block; margin-top: 2px; font-family: var(--text); font-size: 0.78rem; color: var(--kertas-redup); }
.hadiah { margin-top: auto; font-weight: 600; line-height: 1.3; }
.rinci { margin-top: 4px; font-size: 0.86rem; line-height: 1.35; color: var(--kertas-redup); }

/* ---------- footer ---------- */

.foot { padding-block: 64px 32px; border-top: 1px solid var(--garis); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 7vw, 110px);
  align-items: end;
}
.foot-mark { width: 150px; height: auto; margin-bottom: 20px; }
.foot-tag { margin: 0; color: var(--kertas-redup); }
.warning {
  max-width: 46ch;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--emas);
  font-size: 0.95rem;
  line-height: 1.5;
}
.warning strong { color: var(--emas); font-weight: 600; }
.copy { margin-top: 48px; margin-bottom: 0; font-size: 0.85rem; color: var(--kertas-redup); }

/* ---------- 404 ---------- */

.nf { min-height: 60vh; display: grid; align-content: center; gap: 20px; padding-block: 64px; }
.nf h1 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 14ch; }
.nf p { margin: 0; max-width: 42ch; color: rgba(236, 229, 207, 0.86); }
.nf .jump { justify-self: start; margin-top: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .crest { order: -1; width: min(72%, 380px); justify-self: start; }
  .hero-text h1 { max-width: 12ch; }

  .price div { flex-direction: column; align-items: flex-start; gap: 2px; }

  .sec-head, .ramuan-grid, .fakta, .foot-grid { grid-template-columns: 1fr; }
  .fakta div:first-child { border-top: 1px solid var(--garis); }
  .fakta div + div { border-top: 1px solid var(--garis); }

  /* staircase becomes horizontal bars: the bar under each row carries the log scale */
  .tangga { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .tangga li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(96px, 30%) 1fr;
    grid-template-areas: "poin hadiah" "poin rinci";
    column-gap: 20px;
    height: auto;
    padding: 18px 0 24px;
    border-top: 1px solid var(--garis);
    background: none;
  }
  .tangga li::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 5px;
    width: calc(var(--v) * 100%);
    background: var(--emas);
  }
  .poin { grid-area: poin; font-size: 1rem; }
  .hadiah { grid-area: hadiah; margin-top: 0; }
  .rinci { grid-area: rinci; margin-top: 2px; }
}

@media (max-width: 640px) {
  .top { padding-block: 20px; }
  .brand img { width: 96px; }
  .top nav a { font-size: 0.7rem; }

  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 16px; }
  .stage { height: clamp(210px, 52vw, 290px); }
  .stage::before { left: -8px; right: -8px; }
  .price dd { font-size: 0.9rem; }
}

/* ---------- motion: one page-load sequence, nothing else ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes naik {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes kilau {
    from { background-position: 100% 0; }
    to   { background-position: 0 0; }
  }
  .crest img { animation: naik 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .crest::after { animation: kilau 1.7s 1s ease-in-out both; }
  .hero-text h1 { animation: naik 0.9s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-text .lede { animation: naik 0.9s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-text .age, .hero-text .jump { animation: naik 0.9s 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
