/* Nadhif Digital — style.css
   Tema: blok bergaya inventaris + konsol server. Tanpa build step. */

/* ---------- Token ---------- */
:root {
  --ice: #EDF0F5;
  --paper: #FFFFFF;
  --ink: #1C2030;
  --muted: #4A5068;
  --line: #C5CCDA;
  --red: #C8302A;
  --red-dark: #A32320;
  --gold: #F2B632;
  --focus: #2A4BD7;

  --console-bg: #12151F;
  --console-text: #C9D1E3;
  --ok: #5BE39A;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4rem;
  --block: 4px 4px 0 var(--ink);
}

/* ---------- Dasar ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }

section[id] { scroll-margin-top: calc(var(--header-h) + 0.5rem); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }

/* Piksel sprite */
.px-k { fill: var(--ink); }
.px-w { fill: var(--ice); }
.px-r { fill: var(--red); }
.px-g { fill: var(--gold); }

/* ---------- Tata letak ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section--paper {
  background: var(--paper);
  border-block: 2px solid var(--ink);
}

.section-head { max-width: 40rem; }

h2 {
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h3 {
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 106%;
  line-height: 1.2;
}

.lead {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--muted);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 700 1rem/1.2 var(--font);
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.12s;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }

.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }

.btn--sm { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }

.textlink {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--red);
  text-underline-offset: 0.25em;
}
.textlink:hover { color: var(--red-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ice);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  box-shadow: 2px 2px 0 var(--ink);
  shape-rendering: crispEdges;
}
.brand__name {
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}
.nav a:not(.btn) {
  padding: 0.5rem 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.nav a:not(.btn):hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--red);
  text-underline-offset: 0.3em;
}

/* Menu ponsel: hanya aktif saat JavaScript berjalan */
.nav-toggle { display: none; }
.js .nav-toggle { display: inline-flex; }

.js .nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.5rem var(--gutter) 1.25rem;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.js .nav.is-open { display: flex; }
.js .nav a:not(.btn) {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.js .nav .btn { margin-top: 1rem; }

@media (min-width: 64rem) {
  .js .nav-toggle { display: none; }
  .js .nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding: 0;
    background: none;
    border: 0;
  }
  .js .nav a:not(.btn) { padding: 0.5rem 0; border: 0; }
  .js .nav .btn { margin-top: 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem);
  border-bottom: 2px solid var(--ink);
  background-image:
    linear-gradient(rgba(28, 32, 48, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 32, 48, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero__copy { max-width: 36rem; }

h1 {
  font-size: clamp(2.1rem, 7vw, 4.25rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.03;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

@media (max-width: 30rem) {
  .hero__actions .btn { flex: 1 1 100%; }
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 4rem;
  }
}

/* Konsol */
.console {
  background: var(--console-bg);
  color: var(--console-text);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--red);
}
.console__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: #1B2030;
  border-bottom: 2px solid var(--ink);
  font: 500 0.75rem/1 var(--mono);
  color: #8FA0C4;
}
.console__squares i {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.3rem;
  background: #3A4260;
}
.console__body {
  padding: 1rem 1.1rem 1.25rem;
  font: 500 0.75rem/1.85 var(--mono);
}
.console__line {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.console__line.is-pending { visibility: hidden; }

.c-prompt { color: #FF6B62; }
.c-cmd { color: #fff; }
.c-info { color: #8FA0C4; }
.c-warn { color: var(--gold); }
.c-ok { color: var(--ok); }

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: var(--gold);
  vertical-align: -0.2em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (min-width: 40rem) {
  .console { box-shadow: 8px 8px 0 var(--red); }
  .console__body { font-size: 0.875rem; padding: 1.25rem 1.5rem 1.5rem; }
}

/* ---------- Layanan ---------- */
.slots {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 48rem) {
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

.slot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--block);
}
.slot__icon {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  background: var(--ice);
  border: 2px solid var(--ink);
}
.slot__icon svg {
  width: 2.25rem;
  height: 2.25rem;
  shape-rendering: crispEdges;
}
.slot p { color: var(--muted); }
.slot ul {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.slot li {
  position: relative;
  padding-left: 1.5rem;
}
.slot li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--red);
}
.slot .btn { margin-top: auto; align-self: flex-start; }

.slot--empty {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

/* ---------- Rekam jejak ---------- */
.timeline {
  display: grid;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  padding: 0 0 2rem 2rem;
  border-left: 2px solid var(--ink);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-0.5rem - 1px);
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  background: var(--red);
  border: 2px solid var(--ink);
}
.timeline__when {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
}
.timeline p { margin-top: 0.5rem; max-width: 24rem; color: var(--muted); }

@media (min-width: 56rem) {
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .timeline li {
    padding: 1.75rem 0 0;
    border-left: 0;
    border-top: 2px solid var(--ink);
  }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::before { left: 0; top: calc(-0.5rem - 1px); }
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--ice);
  border: 2px solid var(--ink);
  box-shadow: var(--block);
}
.callout p { font-weight: 600; }

/* ---------- Alur ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 44rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.steps li {
  counter-increment: step;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.9rem;
  background: var(--red);
  border: 2px solid var(--ink);
  color: #fff;
  font: 800 1.125rem/1 var(--font);
}
.steps p { margin-top: 0.5rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq {
  max-width: 48rem;
  margin-top: 2rem;
  border-top: 2px solid var(--ink);
}
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-size: 1.0625rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--ink);
  font: 700 1.1rem/1 var(--mono);
}
.faq details[open] summary::after {
  content: "\2212";
  background: var(--gold);
}
.faq details p {
  max-width: 40rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* ---------- Kontak ---------- */
.contact {
  background: var(--ink);
  color: var(--ice);
}
.contact h2 { color: #fff; }
.contact .lead { color: #B9C1D6; }
.contact :focus-visible { outline-color: var(--gold); }

.contact-links {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
@media (min-width: 56rem) {
  .contact-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.25rem 1.4rem;
  border: 2px solid var(--ice);
  box-shadow: 4px 4px 0 var(--red);
  color: var(--ice);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}
.contact-link:hover {
  background: var(--ice);
  color: var(--ink);
}
.contact-link__label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 108%;
}
.contact-link__label svg { width: 1.25rem; height: 1.25rem; flex: none; }
.contact-link__value {
  font: 500 0.9375rem/1.4 var(--mono);
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 1.75rem 2.25rem;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #9AA3BA;
  font-size: 0.875rem;
}
.site-footer p + p { margin-top: 0.5rem; max-width: 40rem; }

/* ---------- Tombol kontak cepat ---------- */
.fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.js .fab { display: flex; }

.fab__menu { display: grid; gap: 0.6rem; }
.fab__menu[hidden] { display: none; }

.fab__btn {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  background: var(--red);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  color: #fff;
  cursor: pointer;
}
.fab__btn svg { width: 1.6rem; height: 1.6rem; }
.fab__btn[aria-expanded="true"] .i-chat { display: none; }
.fab__btn[aria-expanded="false"] .i-close { display: none; }

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