/* ══════════════════════════════════════════════════════════════
   PT NARAYA ADHI PRATAMA — Design System
   Editorial trade-house aesthetic · Fraunces + Archivo
   Jungle Green #134137 · Warm paper · Hairline ledger grids
   ══════════════════════════════════════════════════════════════ */

:root {
  --paper:        #F7F4EC;
  --paper-2:      #EFEBE0;
  --paper-3:      #E7E2D4;
  --ink:          #17201B;
  --ink-2:        #4C554F;
  --ink-3:        #7B837D;
  --green:        #134137;
  --green-deep:   #0A2620;
  --green-mid:    #1B584A;
  --green-tint:   #E3EAE4;
  --cocoa:        #7A5638;
  --cocoa-deep:   #4A3320;
  --gold:         #A08137;
  --cream:        #EFEAE0;
  --on-green:     #EDE9DC;
  --on-green-60:  rgba(237,233,220,0.62);
  --on-green-30:  rgba(237,233,220,0.28);
  --line:         rgba(23,32,27,0.14);
  --line-soft:    rgba(23,32,27,0.08);
  --line-green:   rgba(237,233,220,0.16);
  /* Brand type: SF Compact Display (guideline). Inter Tight is the licensed web
     substitute; Apple devices fall back to the genuine SF family. */
  --serif:  'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  --sans:   'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max:    1320px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a, button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px;
}
::selection { background: rgba(19,65,55,0.18); }
section[id], div[id] { scroll-margin-top: 90px; }

/* ── Type scale ─────────────────────────────────────────────── */

.display, .h1, .h2, .h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.display { font-size: clamp(3rem, 7.2vw, 6.2rem); }
.h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
.h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; }
.h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.18; }
.serif-i { font-style: italic; font-weight: 400; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 34em;
}
.body-s { font-size: 0.92rem; line-height: 1.65; color: var(--ink-2); }

.eyebrow {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--green);
}
.eyebrow .idx { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; font-size: 0.82rem; color: var(--gold); }
.eyebrow::after { content: ''; flex: 0 0 36px; height: 1px; background: currentColor; opacity: 0.5; align-self: center; }
.eyebrow.no-rule::after { display: none; }

.on-dark .eyebrow { color: var(--on-green-60); }
.on-dark .eyebrow .idx { color: var(--gold); }
.on-dark .display, .on-dark .h1, .on-dark .h2, .on-dark .h3 { color: var(--on-green); }
.on-dark .lead, .on-dark .body-s { color: var(--on-green-60); }

/* ── Layout ─────────────────────────────────────────────────── */

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: clamp(4.5rem, 9vw, 8rem); padding-bottom: clamp(4.5rem, 9vw, 8rem); }
.section-tight { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }

.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.sec-head .h2 { max-width: 15em; }
.sec-head-meta { font-size: 0.8rem; color: var(--ink-3); max-width: 26em; line-height: 1.6; padding-bottom: 0.4rem; }

.rule { border: 0; border-top: 1px solid var(--line); }

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 1.05rem 1.7rem; border-radius: 2px;
  text-decoration: none; border: 1px solid transparent;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.btn .arr { display: inline-block; transition: transform 0.22s ease; }
.btn:hover .arr { transform: translateX(5px); }

.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-light { background: var(--cream); color: var(--green-deep); }
.btn-light:hover { background: #fff; }
.btn-ghost-light { border-color: var(--on-green-30); color: var(--on-green); background: transparent; }
.btn-ghost-light:hover { border-color: var(--on-green); }

.link-more {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green); text-decoration: none;
  padding-bottom: 4px; border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.link-more:hover { border-color: var(--green); }
.link-more .arr { transition: transform 0.2s ease; }
.link-more:hover .arr { transform: translateX(4px); }

/* ── Navbar ─────────────────────────────────────────────────── */

#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(247,244,236,0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
#navbar.on-hero:not(.scrolled) { border-bottom-color: var(--line-green); }

.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.nav-brand img { height: 58px; width: 58px; }
.nav-brand .lm-w { display: none; }
#navbar.nav-dark:not(.scrolled) .lm-w { display: block; }
#navbar.nav-dark:not(.scrolled) .lm-g { display: none; }
.nav-brand .nb-name {
  font-family: var(--sans); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.24em; color: var(--ink); line-height: 1;
}
.nav-brand .nb-sub {
  display: block; font-size: 0.54rem; font-weight: 500; letter-spacing: 0.34em; color: var(--ink-3); margin-top: 1px; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.4rem); list-style: none; }
.nav-links a {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2); padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-links a:hover { color: var(--green); }
.nav-links a.active { color: var(--green); border-bottom-color: var(--green); }
.nav-cta { margin-left: 0.5rem; }
.nav-cta .btn { padding: 0.72rem 1.25rem; }
/* CTA text must stay cream on green — wins over .nav-links link colours in every nav state */
#navbar .nav-links .nav-cta a.btn-primary,
#navbar.nav-dark:not(.scrolled) .nav-links .nav-cta a.btn-primary { color: var(--on-green); border-bottom: 0; }
#navbar .nav-links .nav-cta a.btn-primary:hover,
#navbar.nav-dark:not(.scrolled) .nav-links .nav-cta a.btn-primary:hover { color: #fff; background: var(--green-mid); }

/* dark hero variant */
#navbar.nav-dark:not(.scrolled) .nb-name { color: var(--on-green); }
#navbar.nav-dark:not(.scrolled) .nb-sub { color: var(--on-green-60); }
#navbar.nav-dark:not(.scrolled) .nav-links a { color: var(--on-green-60); }
#navbar.nav-dark:not(.scrolled) .nav-links a:hover,
#navbar.nav-dark:not(.scrolled) .nav-links a.active { color: var(--on-green); border-bottom-color: var(--on-green); }
#navbar.nav-dark:not(.scrolled) .nav-burger span { background: var(--on-green); }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px;
}
.nav-burger span { width: 22px; height: 1.6px; background: var(--ink); transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

#mobile-menu {
  display: none;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.32s ease, opacity 0.26s ease;
}
#mobile-menu.open { max-height: 480px; opacity: 1; }
#mobile-menu ul { list-style: none; padding: 0.8rem var(--gutter) 1.6rem; }
#mobile-menu a {
  display: block; padding: 0.85rem 0;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-soft);
}
#mobile-menu a.active { color: var(--green); }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  #mobile-menu { display: block; }
}

/* ── Hero (shared page-hero) ────────────────────────────────── */

.page-hero { padding-top: clamp(9rem, 16vw, 13rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.page-hero .lead { margin-top: 1.6rem; }
.page-hero .eyebrow { margin-bottom: 1.4rem; }

/* ── Ledger grid (bordered cells) ───────────────────────────── */

.ledger {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.ledger > * { background: var(--paper); padding: clamp(1.6rem, 3vw, 2.4rem); }
.ledger-2 { grid-template-columns: repeat(2, 1fr); }
.ledger-3 { grid-template-columns: repeat(3, 1fr); }
.ledger-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .ledger-3, .ledger-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .ledger-2, .ledger-3, .ledger-4 { grid-template-columns: 1fr; } }

.ledger-cell-hover { transition: background 0.25s ease; }
.ledger-cell-hover:hover { background: #FDFCF8; }

.ledger-dark { background: var(--line-green); border-color: var(--line-green); }
.ledger-dark > * { background: var(--green-deep); }
.ledger-dark .cell-title { color: var(--on-green); }
.ledger-dark .cell-body { color: var(--on-green-60); }
.ledger-dark .ledger-cell-hover:hover { background: #0D2E27; }

.cell-num {
  font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--gold);
}
.cell-title { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 0.9rem 0 0.7rem; }
.cell-body { font-size: 0.9rem; color: var(--ink-2); line-height: 1.65; }

/* ── Stat blocks ────────────────────────────────────────────── */

.stat-num {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 4.6vw, 4rem);
  line-height: 1; letter-spacing: -0.02em; color: var(--green);
  font-variant-numeric: lining-nums;
}
.stat-num sup { font-size: 55%; top: -0.55em; position: relative; }
.stat-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.7rem; }
.on-dark .stat-num { color: var(--on-green); }
.on-dark .stat-label { color: var(--on-green-60); }

/* ── Marquee ────────────────────────────────────────────────── */

.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.marquee-track { display: flex; white-space: nowrap; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  display: inline-flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem;
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-2);
}
.marquee-item::after { content: '·'; color: var(--gold); font-style: normal; }

/* ── Images ─────────────────────────────────────────────────── */

.img-frame { position: relative; overflow: hidden; border-radius: 2px; }
.img-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2,0.6,0.2,1); }
.img-frame:hover img { transform: scale(1.035); }
.img-frame .img-tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--paper); color: var(--ink-2);
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.55rem 1rem 0.45rem; border-radius: 0 2px 0 0;
}

/* ── Dark band ──────────────────────────────────────────────── */

.band-green { background: var(--green-deep); color: var(--on-green); position: relative; }
.band-green-mid { background: var(--green); color: var(--on-green); position: relative; }

/* Brand pattern texture (guideline p.08) on dark section bands */
.band-green::before, .band-green-mid::before {
  content: ''; position: absolute; inset: 0;
  background: url('img/pattern-dark.svg') repeat;
  background-size: 240px 240px;
  pointer-events: none;
}
.band-green > *, .band-green-mid > * { position: relative; }

/* ── Spec tables ────────────────────────────────────────────── */

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 2px; background: #FDFCF8; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 560px; }
.tbl thead th {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--on-green); background: var(--green);
  padding: 0.85rem 1.1rem; text-align: left; white-space: nowrap;
}
.tbl tbody td { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(19,65,55,0.035); }
.tbl td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tbl .code { font-family: var(--serif); font-style: italic; color: var(--green); font-size: 0.95rem; }
.tbl-cocoa thead th { background: var(--cocoa-deep); }

.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 1px solid rgba(0,0,0,0.15); }

/* ── Forms ──────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  background: #FDFCF8; border: 1px solid var(--line); border-radius: 2px;
  padding: 0.85rem 1rem; width: 100%;
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23134137' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }

/* ── Footer ─────────────────────────────────────────────────── */

footer.site-footer { background: var(--green-deep); color: var(--on-green-60); }
.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 3rem;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 3rem;
}
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .footer-top { grid-template-columns: 1fr; gap: 2.2rem; } }

.footer-h { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--on-green); margin-bottom: 1.2rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { color: var(--on-green-60); text-decoration: none; font-size: 0.9rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--on-green); }
.footer-brand-line { display: flex; align-items: center; gap: 14px; margin-bottom: 1.2rem; }
.footer-brand-line img { height: 44px; width: 44px; }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--on-green); line-height: 1.45; max-width: 20em; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line-green);
  padding: 1.4rem 0 1.8rem; font-size: 0.78rem;
}

/* ── Skip link (a11y) ───────────────────────────────────────── */

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  background: var(--green); color: var(--on-green);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.8rem 1.2rem; border-radius: 2px; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 16px; }

/* ── Map embed ──────────────────────────────────────────────── */

.map-frame {
  border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  background: var(--paper-2); position: relative;
}
.map-frame iframe {
  display: block; width: 100%; height: clamp(320px, 42vw, 460px); border: 0;
  filter: grayscale(1) sepia(0.14) contrast(1.02);
  transition: filter 0.4s ease;
}
.map-frame:hover iframe { filter: none; }

/* ── WhatsApp floating button ───────────────────────────────── */

.wa-fab {
  position: fixed;
  right: clamp(16px, 2.4vw, 28px);
  bottom: calc(clamp(16px, 2.4vw, 28px) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex; align-items: center;
  height: 56px; min-width: 56px;
  padding: 0 14px;
  background: #1FAF5A;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(10, 38, 32, 0.32);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  animation: wa-fab-in 0.5s cubic-bezier(0.2, 0.65, 0.25, 1) 0.8s backwards;
}
.wa-fab:hover { background: #178A47; box-shadow: 0 10px 28px rgba(10, 38, 32, 0.4); transform: translateY(-2px); }
.wa-fab:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.wa-fab svg { width: 27px; height: 27px; flex: 0 0 auto; fill: currentColor; }
.wa-fab-label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  transition: max-width 0.35s ease, padding-left 0.35s ease;
}
@media (hover: hover) {
  .wa-fab:hover .wa-fab-label, .wa-fab:focus-visible .wa-fab-label { max-width: 190px; padding-left: 11px; }
}
@keyframes wa-fab-in { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 640px) {
  .wa-fab { height: 50px; min-width: 50px; padding: 0 11px; }
  .wa-fab svg { width: 25px; height: 25px; }
}
@media (prefers-reduced-motion: reduce) { .wa-fab { animation: none; } }
@media print { .wa-fab { display: none !important; } }

/* ── Reveal on scroll ───────────────────────────────────────── */

.reveal { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.65,0.25,1); }
html.js .reveal:not(.visible) { opacity: 0; transform: translateY(26px); }
.rd1 { transition-delay: 0.08s; } .rd2 { transition-delay: 0.16s; }
.rd3 { transition-delay: 0.24s; } .rd4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) { html.js .reveal:not(.visible) { opacity: 1; transform: none; } }

/* ── Misc ───────────────────────────────────────────────────── */

.badge {
  display: inline-block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 2px; border: 1px solid currentColor;
}
.badge-gold { color: var(--gold); }
.badge-green { color: var(--green); }

.crumb { display: inline-flex; gap: 10px; align-items: center; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; }
.crumb:hover { color: var(--green); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }
