/* ===================================================================
   BUANA KARYA — Kontraktor & Konstruksi
   Stylesheet utama. Ubah warna brand di :root.
   =================================================================== */

:root {
  /* --- Palet (ubah di sini) --- */
  --ink:        #17181C;   /* teks & elemen gelap */
  --ink-soft:   #3A3C42;
  --muted:      #6E7078;   /* teks sekunder */
  --line:       #E4E1DB;   /* garis hairline */
  --paper:      #FBFAF8;   /* latar utama (off-white hangat) */
  --paper-2:    #F3F0EA;   /* latar section alternatif */
  --accent:     #B5622E;   /* terracotta — aksen utama */
  --accent-2:   #8F4C22;   /* terracotta gelap (hover) */
  --white:      #FFFFFF;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --maxw: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.section { padding: 130px 0; }

/* --- Tipografi utilitas --- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.08; }

.label {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.index-num {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--muted);
}

/* Kepala section editorial */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 40px; margin-bottom: 64px; flex-wrap: wrap; }
.sec-head .title { font-size: clamp(2rem, 4.4vw, 3.3rem); max-width: 15ch; }
.sec-head .title .accent { color: var(--accent); font-style: italic; }
.sec-head .meta { max-width: 340px; color: var(--muted); font-size: 1rem; }
.rule-top { border-top: 1px solid var(--line); padding-top: 22px; }

/* --- Tombol --- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-weight: 500; font-size: .95rem;
  padding: 15px 30px; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: .95rem; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ========================= HEADER ========================= */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s, box-shadow .4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled { background: rgba(251,250,248,.9); backdrop-filter: blur(14px) saturate(1.4); border-color: var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 3px; }
.logo b { font-weight: 500; }
.logo .dot { color: var(--accent); }
.nav { display: flex; gap: 38px; align-items: center; }
.nav a { font-size: .93rem; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color .3s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.header-cta { display: flex; align-items: center; gap: 20px; }
.header-cta .btn { padding: 11px 22px; }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; border-radius: 2px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: .3s var(--ease); }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { bottom: 15px; }
.burger.active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger.active span:nth-child(2) { bottom: 19px; transform: rotate(-45deg); }

/* ========================= HERO ========================= */
.hero { padding: 168px 0 90px; }
.hero-top { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-bottom: 56px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 6rem); font-weight: 300; line-height: .98; letter-spacing: -.03em; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-intro { max-width: 340px; }
.hero-intro p { color: var(--muted); font-size: 1.02rem; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-figure { position: relative; aspect-ratio: 16/7.4; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.hero-figure .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure .caption {
  position: absolute; left: 22px; bottom: 20px; z-index: 2;
  background: rgba(23,24,28,.72); backdrop-filter: blur(6px); color: #fff;
  font-size: .8rem; letter-spacing: .04em; padding: 8px 16px; border-radius: 2px;
}

/* Baris metadata di bawah hero */
.hero-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: 56px; }
.hero-meta .cell { padding: 30px 24px 0 0; }
.hero-meta .cell b { font-family: var(--serif); font-size: 2.6rem; font-weight: 400; display: block; letter-spacing: -.02em; }
.hero-meta .cell span { font-size: .85rem; color: var(--muted); }

/* ========================= ABOUT ========================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about-intro { font-size: 1.18rem; line-height: 1.7; color: var(--ink-soft); max-width: 42ch; }
.about-values { display: grid; gap: 0; }
.about-values li { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.about-values li:last-child { border-bottom: 1px solid var(--line); }
.about-values .n { font-family: var(--serif); color: var(--accent); font-size: 1.05rem; flex: 0 0 auto; }
.about-values h4 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin-bottom: 3px; }
.about-values p { font-size: .95rem; margin: 0; }

/* ========================= SERVICES ========================= */
.services { background: var(--ink); color: var(--paper); }
.services .label { color: #D89A6E; }
.services .sec-head .title { color: var(--white); }
.services .sec-head .meta { color: #9A9CA3; }
.services .rule-top { border-color: rgba(255,255,255,.14); }
.svc-list { border-top: 1px solid rgba(255,255,255,.14); }
.svc {
  display: grid; grid-template-columns: 80px 1fr 1.1fr auto; gap: 30px; align-items: center;
  padding: 38px 0; border-bottom: 1px solid rgba(255,255,255,.14);
  transition: transform .4s var(--ease);
}
.svc:hover { transform: translateX(16px); }
.svc .num { font-family: var(--sans); font-size: .82rem; color: #7D7F86; letter-spacing: .1em; }
.svc h3 { font-size: 1.75rem; color: var(--white); font-weight: 400; }
.svc p { color: #9A9CA3; font-size: .97rem; max-width: 42ch; }
.svc .ico { justify-self: end; color: #D89A6E; opacity: .55; transition: opacity .4s, transform .4s var(--ease); }
.svc:hover .ico { opacity: 1; transform: translate(4px, -4px); }

/* ========================= PROJECTS ========================= */
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.proj { position: relative; }
.proj a { display: block; }
.proj .frame { position: relative; overflow: hidden; border-radius: 4px; background: var(--paper-2); }
.proj .frame::after { content: ""; position: absolute; inset: 0; background: rgba(23,24,28,.12); opacity: 0; transition: opacity .4s; }
.proj:hover .frame::after { opacity: 1; }
.proj .ph { aspect-ratio: 4/3; display: grid; place-items: center; color: var(--muted); }
.proj img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.proj:hover img { transform: scale(1.04); }
.proj .info { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; gap: 16px; }
.proj .info h4 { font-size: 1.35rem; font-weight: 400; }
.proj .info .cat { font-size: .82rem; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.proj .info .yr { font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.proj.tall { aspect-ratio: auto; }
.proj.tall .ph { aspect-ratio: 3/4; }
.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

/* ========================= PROSES ========================= */
.process { background: var(--paper-2); }
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 40px 30px 40px 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step .st-num { font-family: var(--serif); font-size: 3rem; color: var(--accent); line-height: 1; margin-bottom: 24px; display: block; }
.step h4 { font-size: 1.4rem; font-weight: 400; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: .95rem; }

/* ========================= TEAM ========================= */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.person .portrait { aspect-ratio: 3/4; background: var(--paper-2); border-radius: 4px; overflow: hidden; display: grid; place-items: center; margin-bottom: 18px; filter: grayscale(1); transition: filter .5s; }
.person:hover .portrait { filter: grayscale(0); }
.person .portrait img { width: 100%; height: 100%; object-fit: cover; }
.person .portrait .init { font-family: var(--serif); font-size: 2.4rem; color: var(--muted); }
.person h4 { font-size: 1.25rem; font-weight: 400; }
.person span { color: var(--accent); font-size: .88rem; font-family: var(--sans); }

/* ========================= CTA ========================= */
.cta { background: var(--ink); color: var(--paper); text-align: center; }
.cta .wrap { padding-top: 120px; padding-bottom: 120px; }
.cta .label { color: #D89A6E; margin-bottom: 22px; display: inline-block; }
.cta h2 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); font-weight: 300; line-height: 1.04; max-width: 16ch; margin: 0 auto 32px; }
.cta h2 em { font-style: italic; color: #D89A6E; }
.cta .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ========================= CONTACT ========================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 90px; }
.contact-details { display: grid; gap: 0; }
.contact-details .row { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); align-items: baseline; }
.contact-details .row:last-child { border-bottom: 1px solid var(--line); }
.contact-details .row .k { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-details .row .v { font-size: 1.15rem; }
.contact-details .row .v a { border-bottom: 1px solid var(--line); transition: border-color .3s; }
.contact-details .row .v a:hover { border-color: var(--accent); color: var(--accent); }
.contact-details .socials { display: flex; gap: 20px; }
.contact-details .socials a { font-size: .95rem; color: var(--muted); }
.contact-details .socials a:hover { color: var(--accent); }

.form { }
.form .field { margin-bottom: 4px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.form label { display: block; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.form input, .form textarea {
  width: 100%; border: 0; background: transparent; font-family: var(--sans);
  font-size: 1.05rem; color: var(--ink); resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; }
.form textarea { min-height: 90px; }
.form .btn { margin-top: 30px; width: 100%; justify-content: center; }

/* ========================= FOOTER ========================= */
.footer { background: var(--ink); color: #9A9CA3; padding: 90px 0 34px; }
.footer .big { font-family: var(--serif); font-size: clamp(3rem, 12vw, 10rem); font-weight: 300; color: var(--paper); line-height: .9; letter-spacing: -.03em; margin-bottom: 60px; }
.footer .big .dot { color: var(--accent); }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-cols p { max-width: 34ch; font-size: .95rem; }
.footer-cols h5 { font-family: var(--sans); color: var(--paper); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; }
.footer-cols a { display: block; padding: 6px 0; font-size: .95rem; color: #9A9CA3; transition: color .3s; }
.footer-cols a:hover { color: var(--paper); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 28px; font-size: .84rem; color: #6E7078; flex-wrap: wrap; gap: 10px; }

/* ========================= WHATSAPP FLOAT ========================= */
.wa {
  position: fixed; right: 28px; bottom: 28px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper); padding: 13px 20px; border-radius: 100px;
  font-size: .9rem; font-weight: 500; box-shadow: 0 12px 30px rgba(23,24,28,.25);
  transition: background .3s, transform .3s var(--ease);
}
.wa:hover { background: var(--accent); transform: translateY(-3px); }
.wa svg { flex: 0 0 auto; }

/* ========================= REVEAL =========================
   Animasi fade-up berbasis CSS murni (tidak bergantung JS/observer).
   `both` menjamin elemen SELALU berakhir dalam kondisi tampil —
   konten tidak pernah blank, bahkan bila JS mati. */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.js .reveal { animation: revealUp .8s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 1024px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 54px; }
  .step-grid { grid-template-columns: 1fr 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:nth-child(odd) { border-right: 1px solid var(--line); }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
}
@media (max-width: 860px) {
  .section { padding: 90px 0; }
  .wrap { padding: 0 24px; }
  .nav { position: fixed; inset: 84px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
         background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 24px;
         transform: translateY(-130%); transition: transform .45s var(--ease); box-shadow: 0 20px 40px rgba(0,0,0,.06); }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header-cta .btn { display: none; }
  .burger { display: block; }
  .hero { padding: 140px 0 70px; }
  .hero-top { grid-template-columns: 1fr; align-items: start; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta .cell { padding: 26px 20px 0 0; }
  .proj-grid { grid-template-columns: 1fr; gap: 40px; }
  .col-7, .col-5, .col-6, .col-4 { grid-column: 1 / -1; }
  .svc { grid-template-columns: 40px 1fr; gap: 14px 20px; padding: 30px 0; }
  .svc p { grid-column: 2; }
  .svc .ico { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .contact-details .row { grid-template-columns: 1fr; gap: 6px; }
}
