/* Prefectura: taruh file font di assets/fonts/. Kalau belum ada, otomatis pakai Bricolage Grotesque. */
@font-face {
  font-family: "Prefectura";
  src:
    url("assets/fonts/Prefectura.woff2") format("woff2"),
    url("assets/fonts/Prefectura.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #eaf3f1;
  --ink: #0e2b33;
  --muted: #4a666c;
  --night: #0e2b33;
  --night-text: #eaf3f1;
  --night-muted: #9fbcc0;
  --night-line: rgba(234, 243, 241, 0.16);
  --blue: #17a2d6;
  --teal: #2db5a0;
  --lime: #8be04e;
  --gutter: clamp(20px, 5vw, 64px);
  --display: "Prefectura", "Bricolage Grotesque", system-ui, sans-serif;
  --machine:
    ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
  border-radius: 6px;
}
::selection {
  background: var(--lime);
  color: var(--ink);
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Penanda situs dalam pengembangan */
.dev {
  background: var(--lime);
  color: var(--ink);
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 10px var(--gutter);
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.pill {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  transition:
    background-color 0.2s,
    color 0.2s;
}
.pill:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Hero */
.hero {
  padding-top: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(56px, 8vw, 104px);
}

h1 {
  margin: 0 0 clamp(40px, 6vw, 72px);
  max-width: 13em;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Penerjemah: satu-satunya momen "wah" di halaman ini */
.translator {
  --v: 1;
  --p: 100;
  max-width: 960px;
}
.scale {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 600;
}
.scale .l {
  color: var(--muted);
}

.translator input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0 0 clamp(24px, 4vw, 40px);
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
}
.translator input[type="range"]:active {
  cursor: grabbing;
}
.translator input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--blue), var(--teal), var(--lime)) left /
      calc(var(--p) * 1%) 100% no-repeat,
    rgba(14, 43, 51, 0.16);
}
.translator input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--blue), var(--teal), var(--lime)) left /
      calc(var(--p) * 1%) 100% no-repeat,
    rgba(14, 43, 51, 0.16);
}
.translator input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--ink);
}
.translator input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--ink);
}

.stage {
  display: grid;
}
.line {
  grid-area: 1 / 1;
  margin: 0;
  font-size: clamp(1.375rem, 3.2vw, 2.375rem);
  line-height: 1.3;
  max-width: 24em;
}
.tech {
  font-family: var(--machine);
  font-size: clamp(1.125rem, 2.6vw, 1.875rem);
  color: var(--muted);
  letter-spacing: -0.02em;
  opacity: calc(1 - var(--v));
  filter: blur(calc(var(--v) * 8px));
}
.plain {
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: var(--v);
  filter: blur(calc((1 - var(--v)) * 8px));
}

.again {
  margin-top: 28px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.again:hover {
  background: var(--ink);
  color: var(--paper);
}
.again[hidden] {
  display: none;
}

/* Panel gelap */
.night {
  background: var(--night);
  color: var(--night-text);
  border-radius: clamp(32px, 6vw, 72px) clamp(32px, 6vw, 72px) 0 0;
  padding-top: clamp(56px, 9vw, 112px);
}

.night h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.intro {
  margin: 0 0 clamp(32px, 5vw, 56px);
  max-width: 34em;
  color: var(--night-muted);
}

.work {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--night-line);
}
.work li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 12px 48px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--night-line);
}
.work h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.work p {
  margin: 0 0 6px;
  max-width: 32em;
  color: var(--night-muted);
}
.work p:last-child {
  margin-bottom: 0;
  color: var(--night-text);
  font-weight: 600;
}
.work .k {
  display: inline-block;
  min-width: 3.2em;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--night-muted);
}
.work p:last-child .k {
  color: var(--lime);
}

/* Kontak */
.contact {
  padding-top: clamp(64px, 10vw, 128px);
  padding-bottom: 56px;
}
.contact h2 {
  max-width: 16em;
  margin-bottom: 36px;
  text-wrap: balance;
}

.reveal {
  font: inherit;
  font-weight: 800;
  font-size: clamp(1.25rem, 3.4vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--lime));
  border: 0;
  border-radius: 999px;
  padding: 18px 34px;
  cursor: pointer;
  transition: transform 0.2s;
}
.reveal:hover {
  transform: translateY(-2px);
}

.big-mail {
  display: inline-block;
  font-size: clamp(1.5rem, 5.4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-decoration: none;
  word-break: break-word;
  padding-bottom: 6px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--lime)) left
    bottom / 100% 6px no-repeat;
  transition: background-size 0.25s;
}
.big-mail:hover {
  background-size: 100% 100%;
  color: var(--ink);
}

.nojs {
  color: var(--night-muted);
}
.hasjs .nojs {
  display: none;
}
.js-only {
  display: none;
}
.hasjs .js-only {
  display: inline-block;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: clamp(48px, 7vw, 88px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--night-line);
}
.facts dt {
  font-size: 0.875rem;
  color: var(--night-muted);
  margin-bottom: 4px;
}
.facts dd {
  margin: 0;
  font-weight: 600;
}

footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 36px;
  font-size: 0.875rem;
  color: var(--night-muted);
}
footer img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: block;
}

@media (max-width: 860px) {
  .work li {
    grid-template-columns: 1fr;
  }
  .facts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .pill {
    padding: 9px 14px;
    font-size: 0.875rem;
  }
  .scale {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pill,
  .again,
  .reveal,
  .big-mail {
    transition: none;
  }
}
