/* Shared base and components (v9). Colors come only from tokens.css aliases.
   Shape language: soft radii, pill controls, floating panels, serif accent words.
   Components: skip link, floating header, language toggle, sheet (panel), type, button,
   status chip, panel, ledger, table, note, footer. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }

.skip { position: absolute; left: 8px; top: -80px; z-index: 20; background: var(--fg); color: var(--bg); padding: 0.7rem 1rem; font-weight: 600; text-decoration: none; border-radius: var(--pill); }
.skip:focus { top: 8px; }

/* language toggle: both languages live in the markup */
html[lang="en"] [data-l="id"], html[lang="id"] [data-l="en"] { display: none !important; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.stack { display: grid; gap: 1.1rem; align-content: start; }
.stack-lg { display: grid; gap: 2.2rem; align-content: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.cols-2 > *, .cols-3 > * { min-width: 0; }
@media (max-width: 860px) { .cols-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .cols-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- floating header ---------- */
.top {
  position: sticky; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 10;
  margin: 10px clamp(8px, 1.4vw, 16px) 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--line); border-radius: var(--pill);
}
.top .wrap { max-width: none; display: flex; align-items: center; gap: 0.25rem 0.8rem; padding: 6px 8px 6px 18px; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; min-height: var(--tap); }
.mark svg { width: 26px; height: 26px; flex: none; }
.mark b { font-family: var(--f-display); font-weight: 800; font-stretch: 112%; letter-spacing: 0.08em; font-size: 0.95rem; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { text-decoration: none; color: var(--muted); padding: 0.5rem 0.9rem; min-height: 40px; display: inline-flex; align-items: center; border-radius: var(--pill); transition: background 160ms ease, color 160ms ease; }
.nav a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.nav a[aria-current="page"] { color: var(--fg); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.lang {
  font-family: var(--f-mono); font-size: var(--label); letter-spacing: 0.08em;
  background: none; color: var(--muted); border: 1px solid var(--line);
  min-width: var(--tap); min-height: var(--tap); padding: 0 0.7rem; cursor: pointer; border-radius: var(--pill);
}
.lang:hover { color: var(--fg); border-color: var(--muted); }
.nav { order: 1; }
.lang { order: 2; }
.menu-btn {
  display: none; order: 2; font-family: var(--f-mono); font-size: var(--label); letter-spacing: 0.08em; text-transform: uppercase;
  background: none; color: var(--fg); border: 1px solid var(--line); min-height: var(--tap); padding: 0 1rem; cursor: pointer; border-radius: var(--pill);
}
.menu-btn:hover { border-color: var(--muted); }
/* phones: one-row header, the links open as a list under the Menu button */
@media (max-width: 860px) {
  .top { border-radius: 26px; }
  .top .wrap { padding-left: 14px; }
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { order: 3; width: 100%; }
  html.js .nav:not(.open) { display: none; }
  .nav.open { flex-direction: column; border-top: 1px solid var(--line); padding-block: 0.4rem; }
  .nav a { min-height: 44px; padding-inline: 0.9rem; }
}

/* ---------- sheets: plain ones sit on the page, light and graphite ones float as panels ---------- */
.sheet { position: relative; margin: clamp(6px, 1vw, 12px) clamp(8px, 1.4vw, 16px); border-radius: var(--radius-lg); background: transparent; color: var(--fg); padding-block: clamp(2.8rem, 6.5vw, 5.5rem); }
.sheet--graphite { background: var(--surface); border: 1px solid var(--line); }
.sheet.on-light { background: var(--bg); border: 1px solid transparent; }
.sheet--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.sheet--card { background: var(--card); border: 1px solid var(--line); }
.sheet > .wrap { position: relative; z-index: 1; }
/* small section counter, top right of each panel */
.sheet[data-sec]::before {
  content: attr(data-sec); position: absolute; top: clamp(1rem, 2.4vw, 1.8rem); right: clamp(1.1rem, 3vw, 2.2rem);
  font-family: var(--f-mono); font-size: var(--label); letter-spacing: 0.14em; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--pill); padding: 0.1rem 0.6rem;
}
.rule { display: none; }

/* ---------- type ---------- */
.eyebrow, .label { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--f-mono); font-size: var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0; }
.eyebrow::before, .label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.08; }
h1 { font-size: var(--step-4); font-weight: 700; font-stretch: 100%; letter-spacing: -0.024em; line-height: 1.03; }
h2 { font-size: var(--step-3); font-weight: 700; font-stretch: 100%; letter-spacing: -0.022em; }
h3 { font-size: var(--step-1); font-weight: 650; line-height: 1.25; letter-spacing: -0.005em; }
h1 em, h2 em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.1em; letter-spacing: -0.01em; color: var(--accent);
}
p { margin: 0; max-width: 64ch; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.note { font-size: var(--step--1); color: var(--muted); background: color-mix(in srgb, var(--fg) 5%, transparent); padding: 0.7rem 0.95rem; border-radius: 12px; max-width: 64ch; }

/* ---------- button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: var(--tap);
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  padding: 0.7rem 1.35rem; border-radius: var(--pill); border: 1px solid var(--accent-fill); cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent-fill) 80%, transparent); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--wa { background: var(--wa-green); border-color: var(--wa-green); color: var(--white); }
.btn--wa:hover { filter: brightness(1.1); }
.btn svg { width: 20px; height: 20px; flex: none; }
.ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; }
/* contact not published yet: a plain notice, never a button that looks live */
.btn .pending { display: none; }
.btn.is-pending { background: var(--surface); border: 1px dashed var(--muted); color: var(--fg); cursor: default; }
.btn.is-pending .pending { display: inline; font-weight: 400; color: var(--muted); }
.btn.is-pending svg { display: none; }

/* ---------- status chip ---------- */
.status {
  display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--f-mono); font-size: var(--label);
  letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.65rem; border: 1px solid currentColor;
  border-radius: var(--pill); white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--est { color: var(--fg); }
.status--dev { color: var(--signal); }
.status--prop { color: var(--accent); }
.status--prop::before { background: transparent; border: 1px solid currentColor; }

/* ---------- panel, ledger, table ---------- */
.panel { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 1.8rem); display: grid; gap: 0.8rem; align-content: start; transition: border-color 200ms ease; }
.panel:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ledger { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.ledger > li { list-style: none; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); align-items: start; transition: background 160ms ease; }
.ledger > li:last-child { border-bottom: 0; }
.ledger > li:hover { background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
.ledger .idx { font-family: var(--f-mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.2rem; }
@media (max-width: 640px) { .ledger > li { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; color: inherit; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-size: var(--label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: var(--muted); background: color-mix(in srgb, var(--fg) 4%, transparent); }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
blockquote.q {
  margin: 0; position: relative; padding-top: 2.6rem; font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.15; max-width: 26ch; letter-spacing: -0.005em;
}
blockquote.q::before { content: "\201C"; position: absolute; top: -0.35rem; left: -0.05rem; font-size: 5rem; line-height: 1; color: var(--accent); font-style: normal; }

/* ---------- footer: one rounded panel with an outlined wordmark ---------- */
.foot {
  position: relative; overflow: hidden; margin: clamp(6px, 1vw, 12px) clamp(8px, 1.4vw, 16px) clamp(8px, 1.4vw, 16px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(5.5rem, 15vw, 10rem); font-size: 0.9rem; color: var(--muted);
}
.foot .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; position: relative; z-index: 1; }
.foot strong { color: var(--fg); font-family: var(--f-display); letter-spacing: 0.06em; }
.foot nav { display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.foot nav a { text-decoration: none; padding-block: 0.65rem; min-height: 44px; }
.foot nav a:hover { color: var(--fg); text-decoration: underline; }
.foot::after {
  content: "SAIZENLABS" / ""; position: absolute; left: 0; right: 0; bottom: -0.2em; text-align: center; white-space: nowrap;
  font: 800 clamp(2.4rem, 10.6vw, 9.5rem)/1 var(--f-display); font-stretch: 100%; letter-spacing: 0.01em;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--fg) 14%, transparent); pointer-events: none; user-select: none;
}
@media (max-width: 640px) { .foot .wrap { grid-template-columns: minmax(0, 1fr); } }

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

p, li { text-wrap: pretty; }
@media (max-width: 480px) { .lead, .hero .sub { font-size: 1.1rem; } .sheet[data-sec]::before { display: none; } }
