/* ===== Custom Properties ===== */
:root {
  --bg: #FCFCFC;
  --bg-soft: #F5F4F0;
  --ink: #0F172A;
  --ink-dim: #475569;
  --dark: #0F1728;
  --dark-soft: #1A2235;
  --line: #E5E3DC;
  --line-dark: rgba(255,255,255,0.14);
  --accent: #C9A87C;
}

/* ===== Base ===== */
html { scroll-behavior: smooth; }
body {
  font-family: 'Figtree', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.italic-display { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 500; }

/* ===== Label ===== */
.label {
  display: inline-flex; align-items: center; gap: 0.875rem;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-dim);
}
.label::before {
  content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: .55;
}
.label-dark { color: rgba(255,255,255,0.72); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  transition: all .25s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
.btn-dark { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-dark:hover { background: #fff; color: var(--dark); border-color: #fff; }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: transparent; color: var(--ink); }

/* ===== Cards ===== */
.card {
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--bg);
  transition: box-shadow .35s ease, transform .35s ease, border-color .35s ease;
}
.card:hover {
  box-shadow: 0 30px 60px -30px rgba(15,23,42,0.25);
  transform: translateY(-4px);
}
.card-dark {
  border-color: var(--line-dark);
  background: var(--dark-soft);
}
.card-dark:hover { box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* ===== Navbar ===== */
.nav { transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease; }
.nav.scrolled { background: rgba(252,252,252,0.78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom-color: var(--line); }

/* ===== Hamburger button ===== */
.ham-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  transition: background .2s ease, border-color .2s ease;
}
.ham-btn:hover { background: var(--bg-soft); }
.ham-wrap { display: flex; flex-direction: column; gap: 4.5px; }
.ham-line {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform .32s cubic-bezier(.2,.7,.2,1), opacity .2s ease;
  transform-origin: center;
}
.ham-btn.open .ham-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.ham-btn.open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ham-btn.open .ham-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== Mobile dropdown menu ===== */
.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(252,252,252,0.97);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height .4s cubic-bezier(.2,.7,.2,1), opacity .28s ease;
}
.mobile-menu.open {
  max-height: 420px;
  opacity: 1;
  pointer-events: all;
}
.mob-link {
  display: block;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-dim);
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, padding-left .2s ease;
}
.mob-link:last-of-type { border-bottom: 0; }
.mob-link:hover { color: var(--ink); padding-left: .4rem; }

/* ===== Project image hover ===== */
.project { position: relative; overflow: hidden; border-radius: 2rem; }
.project img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.project:hover img { transform: scale(1.06); }
.project .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,40,0) 35%, rgba(15,23,40,0.85) 100%);
  opacity: 0; transition: opacity .4s ease;
  display: flex; align-items: flex-end; padding: 1.75rem;
}
.project:hover .overlay { opacity: 1; }

/* ===== Hero float badge ===== */
.float-badge {
  position: absolute; bottom: -1.25rem; left: -1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 24px 50px -24px rgba(15,23,42,0.25);
  display: flex; align-items: center; gap: 0.875rem;
}

/* ===== WhatsApp FAB ===== */
.fab {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 60;
  width: 60px; height: 60px; border-radius: 999px;
  background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 18px 40px -10px rgba(37,211,102,0.5), 0 8px 20px -8px rgba(0,0,0,0.2);
  transition: transform .25s ease, box-shadow .25s ease;
}
.fab:hover { transform: translateY(-3px) scale(1.04); }
.fab::after {
  content: ""; position: absolute; inset: -6px; border-radius: 999px;
  border: 1px solid #25D366; opacity: .4;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.95); opacity: .5; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ===== Marquee strip ===== */
.marquee { overflow: hidden; }
.marquee-track {
  display: flex; gap: 3rem; width: max-content;
  animation: scroll 38s linear infinite;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Hero variants ===== */
body[data-hero="centered"] .hero-split { display: none; }
body[data-hero="centered"] .hero-centered { display: flex; }
body[data-hero="fullbleed"] .hero-split { display: none; }
body[data-hero="fullbleed"] .hero-fullbleed { display: flex; }
.hero-centered, .hero-fullbleed { display: none; }

/* ===== Color Palettes ===== */
body[data-palette="charcoal"] { --dark: #161616; --dark-soft: #222; --accent: #B8A582; }
body[data-palette="forest"]   { --dark: #15302A; --dark-soft: #1E3F37; --bg: #F7F5EF; --bg-soft: #ECE9DF; --line: #DDD8C9; --accent: #B6A77A; }
body[data-palette="taupe"]    { --dark: #2B2622; --dark-soft: #3A3530; --bg: #F5F0E8; --bg-soft: #ECE4D6; --line: #DDD3C0; --ink: #1F1A16; --accent: #C9A87C; }

/* ===== Tweaks panel ===== */
.tweaks {
  position: fixed; right: 1.5rem; bottom: 6.25rem; z-index: 70;
  width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
  padding: 1rem 1.1rem 1.1rem;
  font-size: 13px;
  display: none;
}
.tweaks.show { display: block; }
.tweaks h4 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: .6rem; font-weight: 600; }
.swatches { display: flex; gap: .5rem; }
.swatch { width: 36px; height: 36px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: transform .2s; position: relative; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { border-color: var(--ink); }
.swatch .dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 999px; border: 2px solid #fff; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #F1EFE9; padding: 3px; border-radius: 10px; }
.seg button { padding: .45rem .25rem; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border-radius: 7px; color: var(--ink-dim); transition: all .2s; font-weight: 500; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* ===== Selection ===== */
::selection { background: var(--ink); color: var(--bg); }

/* ===== Solutions cards ===== */
.solution {
  position: relative; overflow: hidden; border-radius: 2rem;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 3/4;
  transition: transform .4s ease;
}
.solution:hover { transform: translateY(-4px); }
.solution img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .5s ease, transform 1s ease; }
.solution:hover img { opacity: .7; transform: scale(1.04); }
.solution::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,40,0) 30%, rgba(15,23,40,0.9) 100%); }
.solution > * { position: relative; z-index: 1; }

/* ===== Trends horizontal scroll ===== */
.trend-scroll {
  display: flex; gap: 1.25rem;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 0 2.5rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.trend-scroll::-webkit-scrollbar { height: 6px; }
.trend-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.trend-card {
  flex: 0 0 360px; max-width: 80vw;
  scroll-snap-align: start;
  border-radius: 2rem; overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  display: flex; flex-direction: column;
  transition: transform .35s ease, box-shadow .35s ease;
}
.trend-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(15,23,42,0.25); }
.trend-card .trend-img { aspect-ratio: 4/3; overflow: hidden; }
.trend-card .trend-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.trend-card:hover .trend-img img { transform: scale(1.05); }
.trend-arrows { display: flex; gap: .5rem; }
.trend-arrow {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  transition: all .2s ease;
}
.trend-arrow:hover { background: var(--ink); color: var(--bg); }
.trend-arrow:disabled { opacity: .25; pointer-events: none; }

/* ===== AI Form ===== */
.field label { display: block; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--ink-dim); margin-bottom: .55rem; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  padding: .65rem 0 .85rem; font: inherit; color: var(--ink);
  outline: none; transition: border-color .2s;
  border-radius: 0;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230F172A' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right .25rem center; padding-right: 1.5rem; }
.file-drop {
  border: 1px dashed var(--line); border-radius: 1.25rem;
  padding: 1.25rem; text-align: center; cursor: pointer;
  transition: all .2s ease; display: flex; align-items: center; gap: .85rem; justify-content: center;
  color: var(--ink-dim); font-size: 13px;
}
.file-drop:hover, .file-drop.drag { border-color: var(--ink); color: var(--ink); background: var(--bg-soft); }
.ai-thinking { display: inline-flex; gap: .35rem; align-items: center; }
.ai-thinking span { width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .35; animation: blink 1.2s infinite; }
.ai-thinking span:nth-child(2) { animation-delay: .15s; }
.ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%,100% { opacity:.2; transform: translateY(0); } 50% { opacity:1; transform: translateY(-2px); } }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,10,18,0.94);
  display: none; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  opacity: 0; transition: opacity .25s ease;
  cursor: zoom-out;
}
.lightbox.show { display: flex; opacity: 1; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 1rem; box-shadow: 0 30px 80px rgba(0,0,0,0.5); cursor: default; }
.lightbox-close {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 510;
  width: 48px; height: 48px; border-radius: 999px;
  background: rgba(255,255,255,0.12); color: #fff;
  display: grid; place-items: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-close:focus-visible { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 3px; }
.lightbox-caption {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 510;
  color: #fff; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  background: rgba(0,0,0,0.5); padding: .5rem 1rem; border-radius: 999px;
}
[data-zoomable] { cursor: zoom-in; }

/* ===== AI result prose ===== */
.prose-glass h4 { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-dim); margin-top: 1.25rem; margin-bottom: .35rem; font-weight: 600; }
.prose-glass h4:first-child { margin-top: 0; }
.prose-glass p { color: var(--ink); line-height: 1.65; font-size: 15px; }
.prose-glass ul { list-style: none; padding: 0; margin: .25rem 0; }
.prose-glass li { padding: .35rem 0 .35rem 1.25rem; position: relative; color: var(--ink); font-size: 15px; line-height: 1.55; border-bottom: 1px solid var(--line); }
.prose-glass li:last-child { border-bottom: 0; }
.prose-glass li::before { content: "—"; position: absolute; left: 0; color: var(--ink-dim); }
.prose-glass .range { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.6rem; color: var(--ink); margin: .25rem 0; }

/* ===== Scroll Progress Bar ===== */
#progress-bar {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 0%; pointer-events: none;
  background: linear-gradient(90deg, var(--accent), #e8c99a);
  transition: width .06s linear;
}

/* ===== Custom Cursor ===== */
#cursor-dot {
  position: fixed; width: 7px; height: 7px;
  background: var(--ink); top: 0; left: 0;
  z-index: 9999; border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width .2s ease, height .2s ease, background .25s ease;
  will-change: left, top;
}
#cursor-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1.5px solid var(--ink); top: 0; left: 0;
  z-index: 9998; border-radius: 999px; opacity: .28;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width .25s ease, height .25s ease, opacity .25s ease;
  will-change: left, top;
}
#cursor-dot.hov { width: 12px; height: 12px; background: var(--accent); }
#cursor-ring.hov { opacity: 0; width: 0; height: 0; }

/* ===== Float badge bob ===== */
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}
.float-badge { animation: floatBob 3.6s ease-in-out infinite; }

/* ===== Hero h1 italic shimmer ===== */
@keyframes textShimmer {
  0%, 100% { background-position: 0% center; }
  50%       { background-position: 100% center; }
}
.hero-split h1 .italic-display {
  background: linear-gradient(105deg, var(--ink) 20%, var(--accent) 50%, var(--ink) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 5s ease-in-out infinite;
}

/* ===== Section entrance slide-up ===== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Stat number pulse ===== */
@keyframes statPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.stat-pop { animation: statPop .5s cubic-bezier(.2,.7,.2,1); }

/* ===== Magnetic button ===== */
.btn { transition: all .25s ease, transform .18s cubic-bezier(.2,.7,.2,1); }

/* ===== Project image clip-path reveal ===== */
.project img {
  clip-path: inset(0 0 100% 0 round 0);
  transition: clip-path 1.2s cubic-bezier(.16,1,.3,1) .15s, transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.project.in img { clip-path: inset(0 0 0% 0 round 0); }

/* ===== Solution card cursor ===== */
.solution[data-zoomable] { cursor: zoom-in; }
.project[data-zoomable]  { cursor: zoom-in; }

/* ===== Nav active link ===== */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1.5px; background: var(--accent);
  transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.nav-link.active::after { width: 100%; }

/* ===== CTA section spotlight ===== */
#kontak { overflow: hidden; position: relative; }
#kontak::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(201,168,124,0.08) 0%, transparent 65%);
  pointer-events: none;
}

/* ===== Why Us icon hover ===== */
.why-icon {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.why-icon:hover {
  transform: translateY(-4px) scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 12px 30px -10px rgba(201,168,124,0.4);
}

/* ===== Process step line fill ===== */
@keyframes lineFill {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.process-line-inner { animation: lineFill .8s cubic-bezier(.2,.7,.2,1) forwards; }

/* ===== Lightbox open/close ===== */
.lightbox { transition: opacity .3s ease; }
.lightbox img { transition: transform .35s cubic-bezier(.2,.7,.2,1); transform: scale(.96); }
.lightbox.show img { transform: scale(1); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .float-badge,
  .marquee-track,
  .fab::after,
  .hero-split h1 .italic-display { animation: none !important; }
  #cursor-dot, #cursor-ring { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .project img { clip-path: none !important; transition: transform 1.2s cubic-bezier(.2,.7,.2,1) !important; }
}

/* ===== Skip link ===== */
.skip-link {
  position: absolute; left: -9999px; top: 1rem; z-index: 9999;
  padding: .75rem 1.25rem; background: var(--ink); color: var(--bg);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  border-radius: 999px; white-space: nowrap; text-decoration: none;
}
.skip-link:focus { left: 1rem; outline: none; }

/* ===== Focus visible rings ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { border-radius: 999px; outline-offset: 4px; }
.ham-btn:focus-visible { border-radius: 999px; outline-offset: 2px; }
.card:focus-visible,
.project:focus-visible,
.solution:focus-visible { outline-offset: 4px; border-radius: 2rem; }
.mob-link:focus-visible { outline-offset: 2px; border-radius: 4px; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; }
a:focus-visible { border-radius: 2px; }
#layanan :focus-visible,
#kontak :focus-visible,
footer :focus-visible { outline-color: rgba(255,255,255,0.75); }

/* ===== Disabled button cursor ===== */
button:disabled,
.btn:disabled { cursor: not-allowed; }

/* ===== Required field indicator ===== */
.field-required::after {
  content: ' *'; color: #ef4444; font-size: .9em;
}
