/* =============================================================
   Ono Agung Studio — stylesheet
   Mobile-first. Tidak perlu diedit untuk mengganti konten.
   ============================================================= */

/* --- Tokens ------------------------------------------------ */
:root {
  --paper:   #E9E9E4;
  --paper-2: #E1E1DA;
  --ink:     #16161A;
  --ink-2:   #5C5C63;
  --rule:    #C9C9C1;
  --accent:  #3B2BF2;

  /* warna sapuan tombol; teksnya dikunci gelap agar tetap terbaca
     di atas turquoise, baik di mode terang maupun gelap */
  --sweep:     #40E0D0;
  --sweep-ink: #0C1A18;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono:    "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: 20px;
  --bar-h: 52px;
  --max: 1400px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #121215;
    --paper-2: #1A1A1F;
    --ink:     #ECECE6;
    --ink-2:   #9A9AA2;
    --rule:    #2E2E35;
    --accent:  #9C90FF;
  }
}

@media (min-width: 760px) { :root { --gut: 40px; --bar-h: 60px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--paper); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; font: 500 14px var(--body);
}
.skip:focus { left: 8px; top: 8px; }

/* --- Shared type ------------------------------------------- */
.mono {
  font: 400 11px/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow {
  font: 400 11px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1;
  letter-spacing: -.02em;
}

.lead {
  font-size: clamp(17px, 4.2vw, 21px);
  line-height: 1.45;
  max-width: 34ch;
  color: var(--ink);
  text-wrap: pretty;
}

/* Rollover fill seperti tombol Lukman Batik: warna menyapu naik dari
   bawah saat hover. Dibuat dengan background-image yang tingginya dua
   kali tombol lalu digeser posisinya — bukan pseudo-element ber-z-index
   negatif, supaya tetap terlihat di atas .pill-solid yang punya latar. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  /* Ditulis di sini, bukan di selektor `button.pill`, supaya varian
     .pill-solid di bawah tidak kalah spesifisitas. */
  background-color: transparent;
  background-image: linear-gradient(to top, var(--sweep) 50%, transparent 50%);
  background-repeat: no-repeat;
  background-size: 100% 200%;
  background-position: 0 0;
  color: inherit;
  font: 500 15px var(--body);
  cursor: pointer;
  transition: background-position .4s cubic-bezier(.45, .05, .2, 1),
              color .3s var(--ease),
              border-color .3s var(--ease);
}
.pill::after { content: "→"; transition: transform .3s var(--ease); }
.pill:hover, .pill:focus-visible {
  background-position: 0 100%;
  border-color: var(--sweep);
  color: var(--sweep-ink);
}
.pill:hover::after { transform: translateX(4px); }

.pill-solid { background-color: var(--ink); color: var(--paper); }
.pill-solid:disabled {
  opacity: .35;
  cursor: not-allowed;
  background-position: 0 0;
  border-color: var(--ink);
  color: var(--paper);
}
.pill-block { width: 100%; justify-content: center; }

/* --- Top bar ------------------------------------------------ */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 var(--gut);
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.bar-mark {
  font: 500 13px var(--mono);
  letter-spacing: .04em;
  white-space: nowrap;
}

.bar-nav { display: flex; gap: 14px; }
.bar-nav a {
  font: 400 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 0;
  transition: color .2s var(--ease);
}
.bar-nav a:hover, .bar-nav a[aria-current="true"] { color: var(--ink); }

@media (min-width: 460px) { .bar-nav { gap: 22px; } .bar-nav a { font-size: 12px; } }

/* --- Fit-text (tanda tangan visual situs) ------------------- */
/* Tiap baris diskalakan oleh JS supaya rata penuh selebar kolom. */
.fit {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 100, "opsz" 96;
  line-height: .82;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.fit .line {
  display: block;
  white-space: nowrap;
  /* fallback sebelum JS jalan */
  font-size: clamp(48px, 26vw, 200px);
}
.fit .line > span {
  display: inline-block;
  transform: translateY(0.14em);
  opacity: 0;
}
.fit.is-in .line > span {
  transform: translateY(0);
  opacity: 1;
  transition: transform .9s var(--ease), opacity .7s var(--ease);
}
.fit.is-in .line:nth-child(2) > span { transition-delay: .09s; }
.fit.is-in .line:nth-child(3) > span { transition-delay: .18s; }
.fit.is-in .line:nth-child(4) > span { transition-delay: .27s; }

/* --- Hero --------------------------------------------------- */
.hero {
  padding: clamp(40px, 12vw, 96px) var(--gut) clamp(56px, 14vw, 110px);
  max-width: var(--max);
  margin: 0 auto;
}
.hero .eyebrow { margin-bottom: 18px; }
.hero .fit { margin-bottom: clamp(28px, 7vw, 48px); }

/* Di layar lebar, batasi kolom teks besar supaya tetap rata penuh
   tanpa ukuran huruf jadi tak masuk akal. */
@media (min-width: 860px) {
  .hero .fit, .contact-lines { max-width: 820px; }
}

.hero-foot { display: grid; gap: 26px; justify-items: start; }
@media (min-width: 860px) {
  .hero-foot {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
  }
}

/* --- Section shell ------------------------------------------ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 12vw, 104px) var(--gut);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: clamp(24px, 6vw, 40px);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 560px) {
  .section-head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }
}

/* --- Work index --------------------------------------------- */
.work { display: grid; gap: clamp(36px, 9vw, 64px); }

@media (min-width: 860px) {
  .work { grid-template-columns: 1fr 1fr; gap: 72px 40px; align-items: start; }
}

.work-link { display: block; }

.work-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--brand, var(--paper-2));
  border-radius: 3px;
}
.work-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .7s var(--ease);
}
.work-link:hover .work-media img { transform: scale(1.03); }

/* placeholder ketika belum ada gambar */
.work-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 34vw;
  line-height: 1;
  color: rgba(255, 255, 255, .92);
  mix-blend-mode: soft-light;
  user-select: none;
}
@media (min-width: 860px) { .work-initial { font-size: 15vw; } }

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.work-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(21px, 5.4vw, 28px);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.work-index { flex: none; }
.work-blurb {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 42ch;
}
.work-cat { margin-top: 8px; display: flex; gap: 10px; }
.work-cat span::after { content: ""; }

/* --- Archive grid --------------------------------------------- */
/* Menyambung langsung dari "Selected work", bukan blok terpisah. */
.archive-section { padding-top: 0; }

.archive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 14px;
}
@media (min-width: 620px)  { .archive { grid-template-columns: repeat(3, 1fr); gap: 30px 18px; } }
@media (min-width: 1000px) { .archive { grid-template-columns: repeat(4, 1fr); gap: 40px 22px; } }

.archive-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
  border-radius: 2px;
  margin-bottom: 10px;
}
.archive-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.archive-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-bottom: 3px;
}
@media (min-width: 620px) { .archive-title { font-size: 17px; } }

/* --- About ---------------------------------------------------
   Dua kolom seperti halaman profil: foto + layanan di kiri,
   fakta singkat + bio di kanan. Menumpuk di layar sempit.      */
.about { display: grid; gap: clamp(28px, 7vw, 44px); }
@media (min-width: 860px) {
  .about { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
}

.portrait { margin: 0 0 20px; }
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.services-lead {
  font-weight: 600;
  font-style: italic;
  font-size: 16px;
  margin-bottom: 6px;
}
.services-list {
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.services-list strong { font-weight: 600; color: var(--ink); }

.facts { display: grid; gap: 18px; margin-bottom: 28px; }
.fact { display: grid; gap: 9px; }
.fact dt {
  font: 400 11px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.fact dd { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips li {
  padding: 6px 11px;
  border-radius: 4px;
  font: 400 12px/1.2 var(--mono);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.about-body p {
  font-size: clamp(16px, 4.2vw, 18px);
  line-height: 1.55;
  text-wrap: pretty;
}
.about-body p + p { margin-top: 1em; }

/* --- Client marquee ------------------------------------------ */
.marquee-wrap {
  overflow: hidden;
  padding: clamp(16px, 4vw, 28px) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.marquee {
  display: flex;
  width: max-content;
  gap: 0;
  animation: slide 38s linear infinite;
}
.marquee span {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.1;
  letter-spacing: -.02em;
  padding: 0 .35em;
  white-space: nowrap;
  color: var(--ink-2);
}
.marquee span:nth-child(even) { color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* --- Contact -------------------------------------------------- */
.contact .eyebrow { margin-bottom: 18px; }
.contact-lines {
  display: block;
  margin-bottom: clamp(24px, 6vw, 40px);
  color: var(--accent);
  transition: opacity .3s var(--ease);
}
.contact-lines:hover { opacity: .72; }

.contact-foot { display: grid; gap: 26px; justify-items: start; }
@media (min-width: 860px) {
  .contact-foot { grid-template-columns: 1fr auto; align-items: end; gap: 40px; }
}

.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Enquiry modal --------------------------------------------- */
body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  padding: 0;
}
@media (min-width: 720px) { .modal { place-items: center; padding: 32px 20px; } }
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px var(--gut) calc(26px + env(safe-area-inset-bottom));
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px 16px 0 0;
}
@media (min-width: 720px) { .modal-card { border-radius: 8px; padding: 34px; } }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background-color: transparent;
  background-image: linear-gradient(to top, var(--sweep) 50%, transparent 50%);
  background-repeat: no-repeat;
  background-size: 100% 200%;
  background-position: 0 0;
  color: var(--ink);
  cursor: pointer;
  transition: background-position .35s cubic-bezier(.45, .05, .2, 1),
              color .3s var(--ease),
              border-color .3s var(--ease);
}
.modal-close:hover, .modal-close:focus-visible {
  background-position: 0 100%;
  border-color: var(--sweep);
  color: var(--sweep-ink);
}

.modal-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.05;
  letter-spacing: -.02em;
  padding-right: 48px;
}
.modal-sub {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 44ch;
}

.form-grid { display: grid; gap: 16px; margin: 24px 0 16px; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; }
.field-label {
  font: 400 11px/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field-label span { text-transform: none; letter-spacing: .02em; opacity: .7; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 16px/1.4 var(--body);   /* 16px mencegah iOS auto-zoom */
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  appearance: none;
  transition: border-color .2s var(--ease);
}
.input:focus { border-color: var(--accent); outline: none; }
.input::placeholder { color: var(--ink-2); opacity: .75; }
textarea.input { resize: vertical; min-height: 96px; }

select.input {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 18px center, right 13px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field-err { font-size: 13px; color: #C0392B; }
@media (prefers-color-scheme: dark) { .field-err { color: #FF8A80; } }
.field-err.hidden { display: none; }

.notice {
  margin: 4px 0 20px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.modal-done { text-align: center; padding: 12px 0 4px; }
.modal-done.hidden { display: none; }
.modal-done .modal-title { padding-right: 0; }
.modal-done .modal-sub { margin-inline: auto; }
.modal-done .pill { margin-top: 20px; }

.done-badge {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* --- Footer ---------------------------------------------------- */
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gut) calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 22px;
}

.socials { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.socials a {
  display: inline-block;
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--rule);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }

.foot-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 400 11px/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

@media (min-width: 860px) {
  .foot { grid-template-columns: 1fr auto; align-items: center; }
  .foot-meta { gap: 28px; }
}

/* --- Scroll reveal ---------------------------------------------
   Pakai @keyframes, bukan transition. Kalau .reveal ikut memasang
   `transition`, elemen seperti .pill kehilangan transisi hover-nya
   karena selektor .reveal.is-in lebih spesifik. */
.reveal { opacity: 0; }
.reveal.is-in { animation: rise .6s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- Utility ------------------------------------------------------
   Ditaruh paling akhir supaya menang urutan atas aturan display
   di atasnya. Varian seperti .modal.hidden tetap lebih spesifik.  */
.hidden { display: none; }

/* --- Reduced motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { animation: none; }
  .reveal, .reveal.is-in,
  .fit .line > span, .fit.is-in .line > span {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .work-media img, .pill::after { transition: none; }
  /* sapuan tombol jadi ganti warna seketika, bukan bergerak */
  .pill, .modal-close { transition: color .01s, border-color .01s; }
  .pill:hover, .pill:focus-visible,
  .modal-close:hover, .modal-close:focus-visible { background-position: 0 100%; }
}
