/* Andya Teknologi — Editorial Product Index, 3-Phone Fan Carousel & Harmonious Split Detail */

:root {
  --paper: #f4f3ef;
  --ink: #141414;
  --ink-2: #4a4a47;
  --mute: #8a8984;
  --rule: #dddbd4;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.78, 0.14, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.row__num { font-family: var(--mono); font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 14.5px; font-weight: 500;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); opacity: 0.88; }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.link-arrow { font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: ' →'; }

/* ---------- Thin hardware frames ---------- */
.frame {
  margin: 0;
  background: #1a1a1a;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 28px 56px -28px rgba(20, 20, 20, 0.45);
  transition: transform 0.45s var(--ease);
}
.frame img { width: 100%; height: auto; }
.frame--tab { padding: 5px; border-radius: 16px; }
.frame--tab img { border-radius: 11px; }
.frame--phone { padding: 4px; border-radius: 30px; }
.frame--phone img { border-radius: 26px; }

/* ---------- Prototype screen tabs ---------- */
.proto-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  padding: 4px; border-radius: 999px;
  background: rgba(20, 20, 20, 0.065);
}
.proto-tab {
  border: 0; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 999px;
  opacity: 0.72;
  transition: background 0.2s var(--ease), opacity 0.2s, color 0.2s;
}
.proto-tab:hover { opacity: 1; }
.proto-tab.is-on { background: var(--ink); color: #fff; opacity: 1; }

/* ---------- 3-PHONE FAN ("KIPAS") FOR MOBILE-BASED APPS ---------- */
.phone-fan {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 460px;
}
.fan-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  height: min(86%, 560px);
  aspect-ratio: 780 / 1596;
  transform-origin: center 75%;
  transition:
    transform 0.62s var(--ease),
    opacity 0.48s var(--ease),
    filter 0.48s var(--ease);
  will-change: transform, opacity;
}
.fan-slot .frame--phone {
  width: 100%;
  height: 100%;
}
.fan-slot .frame--phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.fan-slot.is-center {
  transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1);
  opacity: 1;
  z-index: 3;
}
.fan-slot.is-left {
  transform: translate3d(calc(-50% - 78%), calc(-50% + 18px), 0) rotate(-10deg) scale(0.84);
  opacity: 0.56;
  z-index: 2;
}
.fan-slot.is-right {
  transform: translate3d(calc(-50% + 78%), calc(-50% + 18px), 0) rotate(10deg) scale(0.84);
  opacity: 0.56;
  z-index: 2;
}
.fan-slot.is-left:hover {
  transform: translate3d(calc(-50% - 82%), calc(-50% + 10px), 0) rotate(-8deg) scale(0.87);
  opacity: 0.82;
}
.fan-slot.is-right:hover {
  transform: translate3d(calc(-50% + 82%), calc(-50% + 10px), 0) rotate(8deg) scale(0.87);
  opacity: 0.82;
}
.fan-slot.is-center:hover {
  transform: translate3d(-50%, calc(-50% - 3px), 0) rotate(0deg) scale(1.015);
}

/* ---------- HOME: two-column editorial index ---------- */
.index {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) 1.6fr;
  height: 100svh;
  min-height: 660px;
  gap: 16px;
  padding: 16px;
}

.index__list {
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 8px 12px 18px 16px;
  min-height: 0;
}

.list { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--rule); }
.list li { border-bottom: 1px solid var(--rule); }
.row {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 6px;
  padding: 10px 0;
}
.row__num { grid-row: 1 / 3; padding-top: 7px; }
.row__name {
  font-size: clamp(22px, 2.15vw, 32px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--mute);
  transition: color 0.25s var(--ease);
}
.row__kind {
  font-size: 13px; color: var(--ink-2);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease), margin 0.35s var(--ease);
}
.row.is-on .row__name { color: var(--ink); }
.row.is-on .row__kind { max-height: 22px; opacity: 1; margin-top: 3px; }
.row.is-on .row__num { color: var(--ink); }

.list__foot { display: grid; gap: 12px; max-width: 340px; }
.list__foot p { font-size: 14px; color: var(--ink-2); }

/* preview panes */
.index__preview { position: relative; border-radius: 22px; overflow: hidden; }
.pane {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--tint);
  color: var(--ink);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.pane.is-on { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }

.pane__top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 26px 0;
  position: relative; z-index: 5;
}
.pane__count { font-family: var(--mono); font-size: 12px; opacity: 0.65; }

.pane__stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 18px 44px 12px;
}
.pane__stage--fan { padding: 8px 24px; overflow: hidden; }
.pane .frame--tab { width: min(100%, calc((100svh - 220px) * 1.6)); }
.pane__stage:not(.pane__stage--fan) .frame--phone {
  height: calc(100svh - 220px); width: auto; aspect-ratio: 780 / 1596;
}
.pane__stage:not(.pane__stage--fan) .frame--phone img {
  height: 100%; width: 100%; object-fit: cover; object-position: top;
}

.pane__cap {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  padding: 0 28px 24px;
  position: relative; z-index: 5;
}
.pane__cap p { font-size: clamp(16px, 1.35vw, 19px); letter-spacing: -0.015em; max-width: 560px; color: var(--ink); }
.pane__go { flex-shrink: 0; font-size: 14px; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.pane__go::after { content: ' →'; display: inline-block; transition: transform 0.25s var(--ease); }
.pane__go:hover::after { transform: translateX(4px); }

.mobile-list { display: none; }

/* ---------- CONTACT SHEET ---------- */
.sheet { padding: 92px 16px 24px; }
.sheet__head {
  display: grid; grid-template-columns: 0.78fr 1.6fr; gap: 16px;
  padding: 0 16px 36px; align-items: end;
}
.sheet__head h2 { font-size: clamp(26px, 2.4vw, 36px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.12; }
.sheet__head p { font-size: 17px; color: var(--ink-2); max-width: 560px; }

.sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sheet-card {
  display: flex; flex-direction: column;
  background: var(--tint); color: var(--ink);
  border-radius: 22px; overflow: hidden;
  transition: transform 0.3s var(--ease);
}
.sheet-card:hover { transform: translateY(-3px); }
.sheet-card__stage {
  height: 360px; padding: 28px 24px 0;
  display: flex; align-items: flex-start; justify-content: center; overflow: hidden;
}
.sheet-card .frame--phone { width: 210px; }
.sheet-card .frame--tab { width: 100%; align-self: center; margin-bottom: 18px; }
.sheet-card__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(20, 20, 20, 0.08);
  background: rgba(255, 255, 255, 0.28);
}
.sheet-card__meta b { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.sheet-card__meta span { font-size: 13px; opacity: 0.78; }

/* studio note */
.studio {
  display: grid; grid-template-columns: 0.78fr 1.6fr; gap: 16px;
  padding: 104px 32px 88px;
  border-top: 1px solid var(--rule);
  margin: 72px 16px 0;
}
.studio h2 { font-size: clamp(26px, 2.4vw, 36px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; max-width: 400px; }
.studio > div { display: grid; gap: 28px; justify-items: start; max-width: 620px; }
.studio p { font-size: 18px; color: var(--ink-2); line-height: 1.6; }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin: 0 16px; padding: 22px 16px 28px;
  border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--mute);
}
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }

/* ==========================================================================
   OVERHAULED DETAIL PAGE — HARMONIOUS SPLIT ARCHITECTURE (Zero dead void!)
   ========================================================================== */
.detail { padding: 16px; display: flex; flex-direction: column; gap: 28px; }

/* Full-screen harmonious split hero matching Home proportions */
.d-split {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) 1.52fr;
  gap: 16px;
  min-height: calc(100svh - 32px);
}

.d-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 18px;
  gap: 28px;
}
.d-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px; border-bottom: 1px solid var(--rule);
}
.back { font-size: 14px; font-weight: 500; transition: opacity 0.2s; }
.back:hover { opacity: 0.6; }

.d-intro { display: flex; flex-direction: column; gap: 14px; }
.d-kind { font-size: 13.5px; color: var(--mute); font-weight: 500; }
.d-intro h1 {
  font-size: clamp(42px, 4.4vw, 66px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.d-tag {
  font-size: clamp(19px, 1.65vw, 23px);
  letter-spacing: -0.02em;
  line-height: 1.32;
  color: var(--ink);
  max-width: 36ch;
}
.d-desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 44ch;
}
.d-act { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.d-meta {
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.d-meta span { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--mute); margin-bottom: 5px; }
.d-meta p { font-size: 14px; color: var(--ink-2); max-width: 42ch; }

/* Right tinted visual stage */
.d-stage {
  background: var(--tint);
  color: var(--ink);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 600px;
}
.d-stage__top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
  padding: 20px 26px 0;
}
.d-stage__body {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 18px 40px 12px;
}
.d-stage__body--fan { padding: 8px 20px; overflow: hidden; }
.d-stage__body .frame--tab { width: min(100%, 840px); }
.d-stage__body:not(.d-stage__body--fan) .frame--phone {
  height: min(70svh, 540px); width: auto; aspect-ratio: 780 / 1596;
}
.d-stage__body:not(.d-stage__body--fan) .frame--phone img {
  height: 100%; width: 100%; object-fit: cover; object-position: top;
}
.d-stage__cap { padding: 0 28px 22px; }
.d-stage__cap p { font-size: 15.5px; color: var(--ink); opacity: 0.85; }

/* Section 2: Unified 3-Screen Prototype Gallery */
.d-gallery { padding: 56px 0 16px; }
.d-gallery__head {
  display: grid; grid-template-columns: 0.82fr 1.52fr; gap: 16px;
  padding: 0 16px 28px; align-items: end;
}
.d-gallery__head h2 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.03em; }
.d-gallery__head p { font-size: 16px; color: var(--ink-2); }

.d-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.g-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 22px;
  overflow: hidden;
}
.g-card__stage {
  background: var(--tint);
  padding: 28px 24px;
  height: 310px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.g-card__stage--phone { align-items: flex-start; padding-bottom: 0; }
.g-card__stage .frame--tab { width: 100%; }
.g-card__stage .frame--phone { width: 196px; }
.g-card__txt {
  padding: 22px 24px 26px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.g-card__txt h3 { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; color: var(--ink); }
.g-card__txt p { font-size: 13.5px; color: var(--ink-2); }

/* Section 3: Balanced 3-Column Context Strip */
.d-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 22px;
  overflow: hidden;
  margin-top: 12px;
}
.ctx-col {
  padding: 32px 30px;
  display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid var(--rule);
}
.ctx-col:last-child { border-right: 0; }
.ctx-col p { font-size: 16px; line-height: 1.6; color: var(--ink); }

/* Section 4: Prev / Next App Bar */
.d-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 36px;
}
.pager-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 28px 32px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--rule);
  transition: transform 0.25s var(--ease);
}
.pager-item--next {
  background: var(--tint);
  border-color: transparent;
  align-items: flex-end;
  text-align: right;
}
.pager-item:hover { transform: translateY(-2px); }
.pager-item strong { font-size: clamp(28px, 3vw, 44px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .index { display: none; }
  .mobile-list { display: grid; gap: 14px; padding: 16px 14px 0; }
  .m-card { display: block; background: var(--tint); border-radius: 20px; overflow: hidden; }
  .m-card__stage { padding: 28px 22px 0; display: flex; justify-content: center; }
  .m-card .frame--phone { width: 62%; }
  .m-card__txt { padding: 18px 20px 22px; display: grid; gap: 4px; }
  .m-card__txt h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.035em; }
  .m-card__txt p { font-size: 15px; color: var(--ink-2); }

  .d-split, .sheet__head, .studio, .d-gallery__head, .d-gallery__grid, .d-context { grid-template-columns: 1fr; }
  .d-split { min-height: 0; }
  .d-stage { min-height: 460px; }
  .ctx-col { border-right: 0; border-bottom: 1px solid var(--rule); }
  .ctx-col:last-child { border-bottom: 0; }
  .sheet__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { padding: 72px 18px 56px; margin-top: 40px; }
  .fan-slot.is-left { transform: translate3d(calc(-50% - 58%), calc(-50% + 14px), 0) rotate(-8deg) scale(0.8); }
  .fan-slot.is-right { transform: translate3d(calc(-50% + 58%), calc(-50% + 14px), 0) rotate(8deg) scale(0.8); }
}

@media (max-width: 600px) {
  .sheet__grid, .d-pager { grid-template-columns: 1fr; }
  .detail { padding: 10px; }
  .sheet-card__stage { height: 320px; }
  .pager-item--next { align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
