/* Obscura v2 shared page styles (used with css/tw.css). */
:root {
  --accent: #A23A22;
  --accent-bright: #C2492E;
  --text-faint: #706C65;
  --ease-standard: cubic-bezier(0.2, 0, 0.1, 1);
}
::selection { background: rgba(194, 73, 46, 0.2); }
:focus-visible { outline: 2px solid rgba(194, 73, 46, 0.55); outline-offset: 2px; }
html { scroll-behavior: auto; scroll-padding-top: 84px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.form-context { margin-bottom: 24px; padding: 16px; border-left: 3px solid #A23A22; background: #EEEBE2; color: #44423C; font-size: 14px; line-height: 1.6; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: 5px;
  background: #1A1A18;
  color: #F3F1E9;
  font-size: 13px;
  font-weight: 600;
  transition: top 0.2s var(--ease-standard);
}
.skip-link:focus { top: 12px; }

/* Accent phrase inside headings (production signature: terracotta, never italic). */
.hx em { color: var(--accent); font-style: normal; }
.on-dark.hx em { color: #D9613F; }

/* Nav links: Inter 600 with the terracotta underline slide (production quirk). */
.nv {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #44423C;
  font-size: 14px;
  font-weight: 600;
}
.nv::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 7px;
  height: 2px;
  background: var(--accent);
  transition: right 0.28s var(--ease-standard);
}
.nv:hover, .nv[aria-current="page"] { color: var(--accent); }
.nv:hover::after, .nv[aria-current="page"]::after { right: 0; }

#obscura-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--accent);
  z-index: 100;
  pointer-events: none;
}

/* Masked word reveal (hero headline). Padding keeps descenders unclipped. */
.wm {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  padding-top: 0.06em;
  margin-top: -0.06em;
}
.wm .w { display: inline-block; }

/* Corner brackets: hero frame + active lifecycle card only. */
.bk {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 0 solid rgba(194, 73, 46, 0.4);
  pointer-events: none;
}
.bk-tl { top: -10px; left: -10px; border-top-width: 2px; border-left-width: 2px; }
.bk-tr { top: -10px; right: -10px; border-top-width: 2px; border-right-width: 2px; }
.bk-bl { bottom: -10px; left: -10px; border-bottom-width: 2px; border-left-width: 2px; }
.bk-br { bottom: -10px; right: -10px; border-bottom-width: 2px; border-right-width: 2px; }

/* Product showcase tabs: quiet terracotta underline on the active tab. */
.pg-tab { color: #6F6B64; }
.pg-tab .pg-name {
  display: inline-block;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease-standard), color 0.2s var(--ease-standard);
}
.pg-tab:hover { color: #1A1A18; }
.pg-tab.is-active { color: #1A1A18; }
.pg-tab.is-active .pg-name { border-color: var(--accent-bright); }
.pg-tab.is-active .pg-index { color: var(--accent-bright); }

/* Lifecycle: stacked by default (mobile, reduced motion, no JS); pinned mode overlays panels. */
.lc-pinned .lc-cols { display: grid; grid-template-columns: 0.62fr 1.38fr; gap: 56px; align-items: start; }
.lc-pinned [data-lc-rail] { display: flex; flex-direction: column; gap: 8px; }
.lc-step { display: none; }
.lc-pinned .lc-step { display: flex; }
.lc-pinned .lc-stage { position: relative; }
.lc-pinned .lc-panel { position: absolute; top: 0; left: 0; right: 0; margin: 0; }

/* Product showcase: same pinned-story overlay when scroll-driven. */
.pg-pinned .pg-stage { position: relative; }
.pg-pinned .pg-panel { position: absolute; top: 0; left: 0; right: 0; }

/* Pinned stories keep their section title on screen: tighten the gap under the
   header and let the screenshot shrink to make the whole block fit the viewport
   (--story-img-max is set by script when needed). */
.story-pinned [data-lifecycle] { margin-top: 32px; }
.story-pinned .pg-grid { margin-top: 24px; }
.lc-pinned .lc-panel .workflow-shot-link,
.pg-pinned .pg-panel .product-gallery-image-link { display: flex; align-items: center; justify-content: center; }
.lc-pinned .lc-panel .workflow-shot-link img,
.pg-pinned .pg-panel .product-gallery-image-link img { width: auto; max-width: 100%; max-height: var(--story-img-max, 9999px); }
/* Short viewports: the rail is the column the image cap cannot shrink, so
   compact it — step descriptions are supplementary (the caption repeats them). */
@media (max-height: 830px) {
  .lc-pinned .lc-step { padding-top: 12px; padding-bottom: 12px; }
  .lc-pinned .lc-step .lc-step-desc { display: none; }
}
.lc-panel .bk { opacity: 0; transition: opacity 0.5s var(--ease-standard); }
.lc-panel.is-active .bk,
[data-lifecycle]:not(.lc-pinned) .lc-panel .bk { opacity: 1; }
.lc-step { text-align: left; }
.lc-step .lc-step-number { color: rgba(243, 241, 233, 0.38); transition: color 0.3s var(--ease-standard); }
.lc-step .lc-step-title { color: rgba(243, 241, 233, 0.55); transition: color 0.3s var(--ease-standard); }
.lc-step .lc-step-desc { color: rgba(243, 241, 233, 0.45); }
.lc-step.is-active .lc-step-number { color: #D9613F; }
.lc-step.is-active .lc-step-title { color: #F3F1E9; }
.lc-step.is-active .lc-step-desc { color: rgba(243, 241, 233, 0.72); }

/* Demo form fields (kontak) */
.obf-input {
  width: 100%;
  min-height: 48px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  color: #1A1A18;
  background: #F3F1E9;
  border: 1px solid #706C65;
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.obf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 73, 46, 0.12); }
.obf-input::placeholder { color: var(--text-faint); }
textarea.obf-input { min-height: 0; resize: vertical; }

/* Screenshot stories are narrative beats, not extensions of the card grid.
   Give them a deliberate pause, balance text against the product image, and
   keep the same composition usable at tablet and phone widths. */
.capability-story,
.audit-story {
  align-items: stretch;
}
.capability-story > div,
.audit-story > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}
.capability-story figure,
.audit-story figure {
  min-width: 0;
}
.capability-story .product-story-image-link,
.audit-story .product-story-image-link {
  box-shadow: 0 14px 34px rgba(54, 47, 39, 0.08);
}
.audit-story {
  width: min(100%, 1080px);
  margin-inline: auto;
}
.technical-bridge {
  position: relative;
  isolation: isolate;
  border-top: 2px solid rgba(194, 73, 46, 0.48);
}

@media (max-width: 900px) {
  .capability-story > div,
  .audit-story > div { padding: 24px; }
  .capability-story .product-story-image-link,
  .audit-story .product-story-image-link { margin: 16px 16px 0; }
  .capability-story figcaption,
  .audit-story figcaption { padding: 18px; }
}

@media (max-width: 639px) {
  .technical-bridge > a { width: 100%; }
}

/* Image modal */
.image-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.image-modal[hidden] { display: none; }
.image-modal-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 24, 0.82); }
.image-modal-dialog {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #F3F1E9;
  border: 1px solid #D6D0C4;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s var(--ease-standard), transform 0.28s var(--ease-standard);
}
.image-modal.is-open .image-modal-dialog { opacity: 1; transform: none; }
.image-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #D6D0C4; }
.image-modal-brand { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.22em; color: #A23A22; }
.image-modal-header strong { display: block; font-size: 14px; color: #1A1A18; }
.image-modal-close { width: 36px; height: 36px; border-radius: 5px; border: 1px solid #D6D0C4; background: #fff; color: #1A1A18; font-size: 18px; line-height: 1; cursor: pointer; }
.image-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.image-modal-stage { min-height: 0; overflow: auto; background: #1A1A18; }
.image-modal-stage img { display: block; width: 100%; height: auto; }
.image-modal-caption { margin: 0; padding: 12px 18px; font-size: 13px; color: #6F6B64; }
body.has-image-modal { overflow: hidden; }

/* Scroll cue */
.scroll-cue-line { position: relative; width: 1px; height: 34px; background: rgba(26, 26, 24, 0.16); overflow: hidden; }
.scroll-cue-line::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 50%; background: var(--accent-bright); transform: translateY(-100%); animation: cueDrop 2.1s var(--ease-standard) infinite; }
@keyframes cueDrop { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(200%); } }
@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line::after { animation: none; }
}

/* ---------- Hidden-cost calculator ---------- */
/* Range inputs are the one control users actually drag, so they get real
   styling rather than the browser default (which looks foreign on this page). */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--sand-300, #DDD6C7);
  outline: none;
  cursor: pointer;
}
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #C2492E;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(54, 47, 39, 0.28);
  cursor: grab;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.1, 1);
}
.calc-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.calc-range:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.04); }
.calc-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #C2492E;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(54, 47, 39, 0.28);
  cursor: grab;
}
.calc-range:focus-visible { outline: 2px solid #C2492E; outline-offset: 4px; }
.calc [data-bar] { transition: width 0.45s cubic-bezier(0.2, 0, 0.1, 1); }
.calc [data-calc-out] { font-variant-numeric: tabular-nums; }
.calc summary::-webkit-details-marker { display: none; }
.calc summary { list-style: none; }
.calc summary::before { content: "\2212\00a0\00a0"; }
.calc details:not([open]) summary::before { content: "+\00a0\00a0"; }

@media (prefers-reduced-motion: reduce) {
  .calc [data-bar] { transition: none; }
  .calc-range::-webkit-slider-thumb { transition: none; }
}

/* Save-as-PDF: print only the calculator, with its result legible in mono. */
@media print {
  body.homepage > *:not(main) { display: none !important; }
  .homepage main > :not(#biaya-dokumen) { display: none !important; }
  #biaya-dokumen { padding: 0 !important; }
  #biaya-dokumen > div > *:not(.calculator-disclosure) { display: none !important; }
  .calculator-disclosure > summary { display: none !important; }
  .calc { border: 1px solid #999 !important; box-shadow: none !important; page-break-inside: avoid; }
  .calc [data-calc-print] { display: none !important; }
}
