/* adsas.id public site. One stylesheet, no imports, no third-party origins.
   Tokens follow brand/brand.css: Ink #0B0B10, Disc #17171F, Limb #F2A33A,
   Moon #E9EEF7, Mute #8A90A2. Dark is the native ground; light is derived. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/BricolageGrotesque-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("fonts/InstrumentSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("fonts/InstrumentSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ads-ink: #0B0B10;
  --ads-disc: #17171F;
  --ads-limb: #F2A33A;
  --ads-moon: #E9EEF7;
  --ads-mute: #8A90A2;

  /* light (derived) */
  --bg: #F4F5F8;
  --bg-2: #ECEEF3;
  --surface: #FFFFFF;
  --line: #D9DCE5;
  --line-strong: #BFC3D0;
  --text: #0B0B10;
  --text-2: #3A3F4D;
  --mute: #555B6B;
  --accent: #F2A33A;
  --accent-ink: #0B0B10;
  --accent-text: #8A4F00;
  --code-bg: #0F0F15;
  --code-text: #E9EEF7;
  --code-mute: #8A90A2;
  --code-key: #F2A33A;
  --code-str: #B9D7A8;
  --glow: rgba(242, 163, 58, 0.22);
  --shadow: 0 1px 0 rgba(11, 11, 16, 0.04), 0 12px 32px -18px rgba(11, 11, 16, 0.25);

  --f-display: "Bricolage", "Instrument", ui-sans-serif, sans-serif;
  --f-body: "Instrument", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B10;
    --bg-2: #101016;
    --surface: #17171F;
    --line: #24242F;
    --line-strong: #34343F;
    --text: #E9EEF7;
    --text-2: #C3C8D4;
    --mute: #8A90A2;
    --accent-text: #F2A33A;
    --code-bg: #0F0F15;
    --glow: rgba(242, 163, 58, 0.28);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--f-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--accent); color: var(--ads-ink); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.35rem, 6.2vw, 4.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--f-mono); font-size: 0.875em; }
:not(pre) > code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.36em;
  overflow-wrap: anywhere;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent); color: var(--ads-ink);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; margin-right: auto; }
.brand img { width: 28px; height: 28px; }
.brand b { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: -0.02em; }
.brand span { display: block; font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mute); line-height: 1; margin-top: 0.15rem; }
.mark-dark { display: none; }
@media (prefers-color-scheme: dark) { .mark-dark { display: block; } .mark-light { display: none; } }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { color: var(--text-2); text-decoration: none; padding: 0.5rem 0.7rem; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .btn { margin-left: 0.4rem; }
.menu { display: none; }

@media (max-width: 52rem) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary {
    list-style: none; cursor: pointer; padding: 0.5rem 0.8rem; border: 1px solid var(--line-strong);
    border-radius: 8px; font-weight: 700; font-size: 0.9rem;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] summary { background: var(--bg-2); }
  .menu .nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 14rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 0.5rem; box-shadow: var(--shadow);
  }
  .menu .nav a { padding: 0.75rem 0.8rem; }
  .menu .nav .btn { margin: 0.4rem 0 0; justify-content: center; }
  .menu .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 700 0.95rem/1 var(--f-body); text-decoration: none;
  padding: 0.85rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--ads-ink); }
.btn-primary:hover { background: #F6B65C; }
.btn-ghost { color: var(--text); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.nav .btn { padding: 0.6rem 0.95rem; }
.nav .btn-primary { color: var(--ads-ink); }
.nav .btn-primary:hover { background: #F6B65C; color: var(--ads-ink); }
.arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 400 0.78rem/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute);
  margin: 0 0 1.4rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: var(--accent); }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text-2); max-width: 38rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero h1 em { font-style: normal; color: var(--accent-text); }

/* The eclipse: amber disc, dark disc slides over it on load, leaving the limb. */
.eclipse {
  position: absolute; z-index: 0; pointer-events: none;
  width: min(62vw, 46rem); aspect-ratio: 1; right: -14%; top: 50%;
  transform: translateY(-50%);
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 80px 10px var(--glow), 0 0 220px 40px var(--glow);
  opacity: 0.9;
}
.eclipse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--bg);
  transform: translate(-5%, 3.9%);
  animation: totality 1.8s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
@keyframes totality {
  from { transform: translate(-34%, 30%); }
  to { transform: translate(-5%, 3.9%); }
}

.term {
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid #24242F; border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  overflow: hidden; min-width: 0;
}
.term-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 1rem; border-bottom: 1px solid #24242F;
  font: 400 0.75rem/1 var(--f-mono); color: var(--code-mute);
}
.term-bar i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34343F; margin-right: 5px; }
.term-bar i:first-child { background: var(--ads-limb); }
pre {
  margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto;
  line-height: 1.65; color: var(--code-text); tab-size: 2;
}
pre .c { color: var(--code-mute); }
pre .k { color: var(--code-key); }
pre .s { color: var(--code-str); }
pre .p { color: var(--code-mute); user-select: none; }

/* ---------- sections ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head p { color: var(--text-2); font-size: 1.125rem; }
.kicker { font: 400 0.78rem/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 1rem; }

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem); position: relative; min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-strong); }
.card p { color: var(--text-2); }
.card ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.card li { padding: 0.5rem 0 0.5rem 1.4rem; border-top: 1px dashed var(--line); position: relative; color: var(--text-2); font-size: 0.97rem; }
.card li::before { content: ""; position: absolute; left: 0.1rem; top: 1.05rem; width: 0.55rem; height: 2px; background: var(--accent); }

.product-tag {
  display: inline-block; font: 400 0.72rem/1 var(--f-mono); letter-spacing: 0.06em;
  color: var(--mute); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.35rem 0.6rem; margin-bottom: 1rem;
}
.product h3 { font-size: 1.6rem; }
.product .num { position: absolute; right: 1.4rem; top: 1.2rem; font: 400 0.8rem/1 var(--f-mono); color: var(--mute); }

.included {
  margin-top: 1rem; padding: 1.1rem 1.4rem; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--text-2); font-size: 0.97rem;
}
.included b { color: var(--text); }

/* security highlight list */
.pillars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.pillar { grid-column: span 2; }
.pillar.wide { grid-column: span 3; }
.pillar .idx { font: 400 0.75rem/1 var(--f-mono); color: var(--accent-text); display: block; margin-bottom: 1.4rem; }

/* hash chain */
.chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 1.4rem; counter-reset: none; }
.link-row {
  font: 400 0.76rem/1.5 var(--f-mono); background: var(--code-bg); color: var(--code-text);
  border: 1px solid #24242F; padding: 0.8rem 0.9rem; position: relative; min-width: 0;
}
.link-row:first-child { border-radius: 10px 0 0 10px; }
.link-row:last-child { border-radius: 0 10px 10px 0; }
.link-row + .link-row { border-left: 0; }
.link-row + .link-row::before {
  content: ""; position: absolute; left: -5px; top: 50%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ads-limb); transform: translateY(-50%); box-shadow: 0 0 0 3px var(--code-bg);
}
.link-row span { display: block; color: var(--code-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row b { color: var(--ads-limb); font-weight: 400; }
.fine { font-size: 0.85rem; color: var(--mute); margin-top: 0.8rem; }

/* integrations */
.protocols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.protocol h3 { font-family: var(--f-mono); font-weight: 400; font-size: 1.05rem; letter-spacing: 0; }
.protocol p { font-size: 0.95rem; margin: 0; }
.catalog { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.catalog li {
  font: 400 0.82rem/1 var(--f-mono); padding: 0.6rem 0.8rem; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
}
.catalog li.generic { border-style: dashed; }

/* developer split */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.facts { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.1rem; }
.facts li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.facts li > span:first-child { font: 400 0.75rem/1.9 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }
.facts code { overflow-wrap: anywhere; }
.stack { display: grid; gap: 1rem; }

/* CTA band */
.cta-band { padding: clamp(4rem, 9vw, 6rem) 0; position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band h2 { max-width: 30rem; }
.cta-band p { color: var(--text-2); max-width: 34rem; }
.cta-band .eclipse { width: min(70vw, 34rem); right: -10%; opacity: 0.55; }
.cta-band .eclipse::after { animation: none; }

/* ---------- long-form pages ---------- */
.page-head { padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 48rem; }
.page-head .eclipse { width: min(60vw, 30rem); right: -12%; opacity: 0.5; }
.page-head .eclipse::after { animation: none; }

.doc { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.toc { position: sticky; top: 5.5rem; align-self: start; font-size: 0.9rem; }
.toc p { font: 400 0.72rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); margin-bottom: 0.9rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 0.35rem 0 0.35rem 1rem; color: var(--text-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
.prose { max-width: 46rem; min-width: 0; }
.prose section { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); scroll-margin-top: 5.5rem; }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--accent-text); }
.prose .term { margin: 1.25rem 0; }

.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 400 0.72rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.25rem 0; color: var(--text-2);
}
.callout p:last-child { margin: 0; }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; position: relative; overflow: hidden; }
.lost .wrap { position: relative; z-index: 1; }
.lost .code { font: 400 0.85rem/1 var(--f-mono); letter-spacing: 0.1em; color: var(--accent-text); }
.lost .cta-row { justify-content: center; }
.lost .eclipse { right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(80vw, 30rem); opacity: 0.35; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: 0.9rem; color: var(--mute); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; justify-content: space-between; align-items: flex-start; }
.site-foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.site-foot p { margin: 0.3rem 0 0; }

/* ---------- copy button (added by site.js) ---------- */
.copy {
  font: 400 0.72rem/1 var(--f-mono); color: var(--code-mute); background: transparent;
  border: 1px solid #34343F; border-radius: 6px; padding: 0.35rem 0.55rem; cursor: pointer;
}
.copy:hover { color: var(--code-text); border-color: var(--ads-limb); }

/* ---------- entrance motion ---------- */
.rise { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
.rise-2 { animation-delay: 0.08s; }
.rise-3 { animation-delay: 0.16s; }
.rise-4 { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

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

/* ---------- responsive ---------- */
@media (max-width: 64rem) {
  .protocols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar, .pillar.wide { grid-column: span 3; }
}
@media (max-width: 52rem) {
  .hero .wrap, .split, .doc { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .pillar, .pillar.wide { grid-column: 1 / -1; }
  .eclipse { width: 120vw; right: -70vw; top: 18rem; opacity: 0.55; }
  .toc { position: static; }
  .chain { grid-template-columns: minmax(0, 1fr); }
  .link-row:first-child { border-radius: 10px 10px 0 0; }
  .link-row:last-child { border-radius: 0 0 10px 10px; }
  .link-row + .link-row { border-left: 1px solid #24242F; border-top: 0; }
  .link-row + .link-row::before { left: 1.2rem; top: -5px; transform: none; }
}
@media (max-width: 34rem) {
  .protocols { grid-template-columns: minmax(0, 1fr); }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }
  .brand span { display: none; }
}
