/* ========= Tokens =========
   Palette (Grapura identity): Krem Lembut #EAE4D7, Krem Pasir #DDD3C2,
   Hitam Arang #1A1918, Oranye Karamel #C86D2D, Abu-abu Kecokelatan #635D55.
   Variable names are kept from the first version: --kunyit = main accent
   (caramel orange), --hijau = second accent (brownish grey). Change colors here only. */
:root {
  --paper: #EAE4D7;
  --surface: #F4F0E8;
  --tint: #DDD3C2;
  --ink: #1A1918;
  --ink-2: #635D55;
  --line: rgba(26, 25, 24, .16);
  --kunyit: #C86D2D;
  --kunyit-ink: #1A1918;
  --hijau: #635D55;
  --panel: #1A1918;
  --panel-ink: #EAE4D7;
  --panel-line: rgba(234, 228, 215, .16);
  --focus: #635D55;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(2.6rem, 6.4vw, 5.25rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1A1918; --surface: #23211F; --tint: #2A2724;
    --ink: #EAE4D7; --ink-2: #B0A89C; --line: rgba(234, 228, 215, .14);
    --kunyit: #D47A3A; --hijau: #B0A89C;
    --panel: #2A2724; --panel-ink: #EAE4D7; --focus: #D47A3A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1A1918; --surface: #23211F; --tint: #2A2724;
  --ink: #EAE4D7; --ink-2: #B0A89C; --line: rgba(234, 228, 215, .14);
  --kunyit: #D47A3A; --hijau: #B0A89C;
  --panel: #2A2724; --panel-ink: #EAE4D7; --focus: #D47A3A;
  color-scheme: dark;
}

/* ========= Base ========= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* ========= Header ========= */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; display: inline-flex; align-items: baseline; }
.brand { align-items: center; gap: .5rem; }
.brand__logo { height: 32px; width: auto; display: block; }
.brand__logo--dark { display: none; }
:root[data-theme="dark"] .brand__logo--light { display: none; }
:root[data-theme="dark"] .brand__logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo--light { display: none; }
  :root:not([data-theme="light"]) .brand__logo--dark { display: block; }
}
.top__nav { display: flex; gap: 24px; margin-left: auto; font-size: var(--step--1); font-weight: 600; }
.top__nav a { text-decoration: none; color: var(--ink-2); }
.top__nav a:hover { color: var(--ink); }
.lang { font: inherit; font-size: var(--step--1); font-weight: 700; background: none; color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.lang:hover { border-color: var(--ink); }

/* ========= Buttons & links ========= */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; font-size: var(--step-0); text-decoration: none; border-radius: 12px; padding: 13px 22px; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--kunyit); color: var(--kunyit-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--kunyit) 86%, #000); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--big { font-size: var(--step-1); padding: 16px 28px; }
.link { font-weight: 700; color: var(--hijau); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--ink); }

/* ========= Hero ========= */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title { font-size: var(--step-4); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; max-width: 11ch; text-wrap: balance; }
.hero__lede { margin-top: 24px; font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ========= Demo: the one bold element ========= */
.demo { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 0; }
.demo__cap { grid-column: 1 / -1; font-size: var(--step--1); color: var(--ink-2); margin-bottom: 14px; font-style: italic; font-weight: 500; }

.panel { grid-column: 1; grid-row: 2; position: relative; z-index: 2; background: var(--panel); color: var(--panel-ink); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 48px -24px rgba(26, 25, 24, .55); margin-right: -28px; align-self: start; margin-top: 28px; }
.panel__bar { display: flex; justify-content: space-between; align-items: center; font-size: .8125rem; border-bottom: 1px solid var(--panel-line); padding-bottom: 10px; }
.panel__title { font-weight: 700; }
.panel__user { opacity: .6; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; }
.field__label { display: flex; justify-content: space-between; opacity: .8; font-weight: 600; }
.field output { font-weight: 700; color: var(--kunyit); opacity: 1; }
.field textarea { font: inherit; font-size: .9375rem; line-height: 1.45; color: var(--panel-ink); background: rgba(255,255,255,.06); border: 1px solid var(--panel-line); border-radius: 10px; padding: 10px 12px; resize: none; }
.field textarea:focus { outline: 2px solid var(--kunyit); outline-offset: 0; }
.field input[type="range"] { accent-color: var(--kunyit); width: 100%; }
.btn--publish { background: var(--kunyit); color: var(--kunyit-ink); padding: 10px 16px; font-size: .9375rem; border-radius: 10px; align-self: flex-start; }
.btn--publish:focus-visible { outline-color: var(--panel-ink); }

.wire { display: none; }

.site { grid-column: 2; grid-row: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(26, 25, 24, .45); min-height: 360px; }
.site__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--tint); }
.site__dots { display: inline-flex; gap: 5px; }
.site__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.site__url { font-size: .75rem; color: var(--ink-2); background: var(--surface); padding: 2px 10px; border-radius: 999px; flex: 1; text-align: center; }
.site__body { padding: 20px 20px 18px 44px; display: flex; flex-direction: column; gap: 16px; }
.site__name { font-weight: 800; font-size: 1.125rem; letter-spacing: -.01em; }
.site__ann { position: relative; border-radius: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--kunyit) 16%, var(--surface)); border-left: 4px solid var(--kunyit); }
.site__ann p { font-size: .9375rem; line-height: 1.45; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.site__tag { font-size: .75rem; font-weight: 700; color: var(--hijau); }
.site__don-row { display: flex; justify-content: space-between; gap: 8px; font-size: .8125rem; color: var(--ink-2); margin-bottom: 6px; }
.site__don-row strong { color: var(--ink); white-space: nowrap; }
.meter { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--hijau); border-radius: inherit; transition: width .35s cubic-bezier(.2,.8,.2,1); }
.site__fresh { font-size: .75rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin-top: auto; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--hijau); box-shadow: 0 0 0 0 color-mix(in srgb, var(--hijau) 60%, transparent); }

/* Publish moment: the only orchestrated motion on the page */
.demo.is-sending .panel { transform: translateX(4px); transition: transform .2s ease; }
.site__ann.is-new { animation: arrive .9s cubic-bezier(.2,.8,.2,1); }
.site__ann.is-new::after { content: ""; position: absolute; inset: -4px; border-radius: 15px; border: 2px solid var(--kunyit); animation: ring 1.1s ease-out forwards; pointer-events: none; }
.is-pulsing .live { animation: beat 1.2s ease-out; }
@keyframes arrive { 0% { transform: translateY(-8px); opacity: .2; } 100% { transform: none; opacity: 1; } }
@keyframes ring { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }
@keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hijau) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* ========= Sections ========= */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tint { background: var(--tint); }
.h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: clamp(28px, 4vw, 48px); }
.h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; margin-bottom: 20px; }

/* Case study */
.case { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.case__shot { position: relative; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.case__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.shot-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; }
.sf__bar { display: flex; gap: 5px; padding: 12px 14px; background: var(--tint); border-bottom: 1px solid var(--line); }
.sf__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.sf__body { flex: 1; display: grid; grid-template-columns: 22% 1fr; }
.sf__side { background: var(--panel); padding: 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.sf__side b { height: 8px; border-radius: 4px; background: rgba(234,228,215,.22); }
.sf__side b:first-child { background: var(--kunyit); width: 70%; }
.sf__main { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sf__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sf__row span { height: 46px; border-radius: 10px; background: var(--tint); }
.sf__chart { flex: 1; border-radius: 10px; background:
  linear-gradient(to top, var(--hijau) 0 100%) 8% 100% / 9% 40% no-repeat,
  linear-gradient(to top, var(--hijau) 0 100%) 24% 100% / 9% 62% no-repeat,
  linear-gradient(to top, var(--hijau) 0 100%) 40% 100% / 9% 48% no-repeat,
  linear-gradient(to top, var(--hijau) 0 100%) 56% 100% / 9% 78% no-repeat,
  linear-gradient(to top, var(--kunyit) 0 100%) 72% 100% / 9% 90% no-repeat,
  linear-gradient(to top, var(--hijau) 0 100%) 88% 100% / 9% 66% no-repeat,
  var(--tint); opacity: .9; }
.sf__list { display: flex; flex-direction: column; gap: 8px; }
.sf__list b { height: 8px; border-radius: 4px; background: var(--tint); }
.sf__list b:nth-child(2) { width: 80%; } .sf__list b:nth-child(3) { width: 60%; }

.case__name { font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.case__sum { font-size: var(--step-1); color: var(--ink-2); margin-top: 10px; max-width: 30em; }
.case__facts { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.case__facts dt { font-weight: 700; font-size: var(--step--1); color: var(--hijau); }
.case__facts dd { margin-top: 2px; max-width: 36em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 22px; }
.chips li { font-size: .8125rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--tint); }

.next { margin-top: clamp(40px, 6vw, 72px); border: 2px dashed var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 12px 40px; align-items: center; }
.next__title { font-size: var(--step-2); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.next__text { color: var(--ink-2); max-width: 36em; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.svc { border-top: 3px solid var(--ink); padding-top: 20px; }
.svc:first-child { border-top-color: var(--kunyit); }
.svc__name { font-size: var(--step-2); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.svc__text { margin-top: 12px; }
.svc__fit { margin-top: 12px; font-size: var(--step--1); color: var(--ink-2); font-style: italic; }

.stack { margin-top: clamp(56px, 8vw, 96px); }
.stack__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; transition: transform .25s ease, border-color .25s ease; }
.tool__icon { width: 34px; height: 34px; color: var(--ink); margin-bottom: 14px; transition: color .25s ease, transform .35s cubic-bezier(.3,1.6,.5,1); }
.tool:hover { transform: translateY(-4px); border-color: var(--kunyit); }
.tool:hover .tool__icon { color: var(--kunyit); transform: scale(1.12) rotate(-6deg); }
.tool.reveal .tool__icon { transform: scale(.6); opacity: 0; }
.tool.reveal.is-in .tool__icon { transform: none; opacity: 1; transition: transform .5s cubic-bezier(.3,1.6,.5,1) .25s, opacity .3s ease .25s, color .25s ease; }
.tool.reveal.is-in:hover .tool__icon { transform: scale(1.12) rotate(-6deg); transition-delay: 0s; }
.stack__list dt { font-weight: 800; }
.stack__list dd { color: var(--ink-2); font-size: var(--step--1); margin-top: 4px; line-height: 1.5; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 2px; background: var(--line); }
.step { position: relative; counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); font-weight: 800; font-size: 1.125rem; margin-bottom: 18px; position: relative; }
.step:last-child::before { background: var(--kunyit); border-color: var(--kunyit); color: var(--kunyit-ink); }
.step__name { font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: .9875rem; }

/* About */
.about { display: grid; grid-template-columns: 280px 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }

/* Contact */
.contact { padding: clamp(72px, 10vw, 140px) 0; background: var(--ink); color: var(--paper); }
.contact__title { font-size: var(--step-4); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; max-width: 14ch; text-wrap: balance; }
.contact__text { margin-top: 24px; font-size: var(--step-1); max-width: 34em; opacity: .8; }
.contact__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.contact__mail { font-weight: 700; font-size: var(--step-1); text-underline-offset: 5px; overflow-wrap: anywhere; }
.contact :focus-visible { outline-color: var(--kunyit); }

.foot { background: var(--ink); color: var(--paper); border-top: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); }
.foot__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; font-size: var(--step--1); opacity: .75; }
.foot__links { display: flex; gap: 20px; }

/* Hero eyebrow: small keyword line inside the h1 */
.hero__eyebrow { display: block; font-size: var(--step--1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kunyit); line-height: 1.4; margin-bottom: 14px; }

/* About: story behind the name */
.about__mark { aspect-ratio: 1; border-radius: 50% 50% 24px 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; }
.about__logo { height: auto; width: 52%; }
.about__lede { max-width: 36em; font-size: var(--step-1); line-height: 1.6; }
.ideas { margin-top: clamp(28px, 4vw, 40px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.idea { border-top: 3px solid var(--ink); padding-top: 16px; }
.idea:first-child { border-top-color: var(--kunyit); }
.idea__name { font-size: var(--step-0); font-weight: 800; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 8px; }
.idea p { color: var(--ink-2); font-size: var(--step--1); line-height: 1.55; }

/* Back to top: semi-transparent so content behind stays readable */
.totop { position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 6; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink) 45%, transparent); color: var(--paper); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s ease, transform .3s ease, background-color .2s ease; }
.totop.is-shown { opacity: .75; transform: none; pointer-events: auto; }
.totop:hover, .totop:focus-visible { opacity: 1; background: var(--kunyit); color: var(--kunyit-ink); }
.totop svg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ========= Motion ========= */
/* Language pick: hidden until app.js has set the text (fallback shows it after 1.5s) */
.i18n-wait:not(.i18n-ready) body { visibility: hidden; animation: show-anyway 0s 1.5s forwards; }
@keyframes show-anyway { to { visibility: visible; } }

/* Fade in on scroll (app.js adds .reveal, then .is-in when the element is on screen) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ========= Responsive ========= */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { max-width: 13ch; }
  .case { grid-template-columns: 1fr; }
  .next { grid-template-columns: 1fr; }
  .ideas { grid-template-columns: 1fr; gap: 20px; }
  .stack__list { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
}
@media (max-width: 760px) {
  .top__nav { display: none; }
  .lang { margin-left: auto; }
  .services { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__mark { width: 160px; }
  .ideas { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 600px) {
  .demo { grid-template-columns: 1fr; }
  .panel { grid-column: 1; grid-row: 2; margin: 0 12px 0 0; }
  .site { grid-column: 1; grid-row: 3; margin: -14px 0 0 12px; min-height: 0; }
  .site__body { padding: 30px 16px 16px; }
  .steps { grid-template-columns: 1fr; row-gap: 28px; }
  .stack__list { grid-template-columns: 1fr; gap: 16px; }
  .btn { width: 100%; }
  .btn--publish { width: auto; }
  .contact__actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
