/* East Prodigy — portfolio + client access. Brutalist, minimal. */

:root {
  --bg: #0b0b0b;
  --panel: #121212;
  --fg: #f2efe9;
  --mute: #8f8b84;
  --line: #2b2b2b;
  --accent: #ff3b1f;
  --ok: #3ddc84;
  --wide: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --pad: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--wide);
  font-stretch: 100%;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 14px; background: var(--accent); color: #000; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: stretch;
  height: 56px;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mark {
  position: relative; display: grid; place-items: center;
  width: 64px; flex: none;
  border-right: 1px solid var(--line);
  font-weight: 900; font-stretch: 125%; font-size: 18px; letter-spacing: -0.02em; text-decoration: none;
}
.mark span { position: absolute; right: 12px; bottom: 12px; width: 7px; height: 7px; background: var(--accent); }
.nav { display: flex; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; border-right: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none; white-space: nowrap; color: var(--mute);
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: var(--fg); background: var(--panel); }
.nav .n { color: var(--accent); }
.nav .nav-cta { color: var(--fg); }
.bar-end { display: flex; align-items: center; gap: 16px; padding: 0 var(--pad) 0 16px; border-left: 1px solid var(--line); }
.lang { display: flex; border: 1px solid var(--line); }
.lang-btn { border: 0; background: none; padding: 6px 10px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--mute); cursor: pointer; }
.lang-btn[aria-pressed='true'] { background: var(--fg); color: var(--bg); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

/* ---------- hero ---------- */

.hero { padding: 28px var(--pad) 40px; border-bottom: 1px solid var(--line); }
.hero-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--mute); margin-bottom: 18px; }
.giant {
  margin: 0;
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(56px, 15.6vw, 290px);
  line-height: 0.8; letter-spacing: -0.035em; text-transform: uppercase;
}
.giant span { display: block; }
.giant .sq { display: inline-block; width: 0.16em; height: 0.16em; margin-left: 0.06em; background: var(--accent); vertical-align: baseline; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-lede { margin: 0; max-width: 18em; font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; font-stretch: 100%; line-height: 1.2; letter-spacing: -0.01em; }
.disciplines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.disciplines li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.disciplines .mono { color: var(--accent); }
.disciplines strong { font-size: 20px; font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.01em; }
.disciplines li > span:last-child { font-size: 13px; color: var(--mute); text-align: right; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 52px; padding: 0 22px;
  border: 1px solid var(--fg); background: transparent; color: var(--fg);
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s, color 0.12s;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--accent); }
.btn:active { transform: none; box-shadow: none; }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn.sm { height: 40px; padding: 0 14px; font-size: 11px; }
.btn[disabled] { opacity: 0.5; cursor: progress; }

/* ---------- ticker ---------- */

.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--accent); color: #0b0b0b; }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker span { padding: 12px 28px; font-weight: 900; font-stretch: 125%; font-size: 15px; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.ticker span::after { content: '/'; margin-left: 56px; opacity: 0.5; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */

.sec { border-bottom: 1px solid var(--line); }
.sec-head {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: end; gap: 16px;
  padding: 36px var(--pad) 16px; border-bottom: 1px solid var(--line);
}
.sec-n { color: var(--accent); padding-bottom: 8px; }
.sec-head h2 { margin: 0; font-weight: 900; font-stretch: 125%; font-size: clamp(34px, 6vw, 84px); line-height: 0.9; text-transform: uppercase; letter-spacing: -0.03em; }
.sec-note { color: var(--mute); padding-bottom: 8px; }
.kicker { margin: 0 0 12px; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.big { margin: 0 0 18px; font-weight: 900; font-stretch: 125%; font-size: clamp(40px, 6.4vw, 96px); line-height: 0.86; text-transform: uppercase; letter-spacing: -0.03em; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 24px 0 0; border-top: 1px solid var(--line); }
.specs div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--mute); margin-bottom: 4px; }
.specs dd { margin: 0; color: var(--fg); display: flex; align-items: center; gap: 8px; }

/* now building */
.now { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 460px; }
.loop-art { position: relative; display: grid; place-items: center; overflow: hidden; border-right: 1px solid var(--line); background: repeating-linear-gradient(0deg, transparent 0 39px, var(--line) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px); }
.loop-ring { position: absolute; width: min(64%, 360px); aspect-ratio: 1; border: 2px solid var(--fg); border-radius: 50%; border-top-color: var(--accent); animation: spin 9s linear infinite; }
.loop-ring.r2 { width: min(46%, 260px); border-style: dashed; border-color: var(--mute); animation-duration: 14s; animation-direction: reverse; }
.loop-word { position: relative; font-weight: 900; font-stretch: 125%; font-size: clamp(26px, 3.4vw, 44px); line-height: 0.95; text-align: center; letter-spacing: -0.02em; background: var(--bg); padding: 8px 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.now-copy { padding: 40px var(--pad); align-self: center; }
.now-copy > p:not(.kicker) { max-width: 34em; color: #cfcbc4; font-size: 17px; margin: 0; }

/* projects */
.project { display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.4fr; border-bottom: 1px solid var(--line); }
.project:last-child { border-bottom: 0; }
.project.reverse .project-info { order: 2; border-right: 0; border-left: 1px solid var(--line); }
.project-info { padding: 40px var(--pad); border-right: 1px solid var(--line); }
.project-info > p:not(.kicker) { color: #cfcbc4; max-width: 30em; margin: 0; }
.gallery { display: grid; gap: 1px; background: var(--line); }
.g-takut { grid-template-columns: 0.72fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.g-takut .tall { grid-row: span 2; }
.g-takut .shot:nth-child(2) { grid-column: span 2; }
.g-abar { grid-template-columns: 0.9fr 1.2fr; grid-template-rows: 1fr 1fr; }
.g-abar .square { grid-row: span 2; }
.shot { position: relative; margin: 0; padding: 0; border: 0; background: #000; overflow: hidden; cursor: zoom-in; min-height: 180px; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s; filter: saturate(0.9); }
.shot:hover img, .shot:focus-visible img { transform: scale(1.035); filter: saturate(1.1); }
.shot::after { content: '+'; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-family: var(--mono); font-weight: 700; opacity: 0; transition: opacity 0.2s; }
.shot:hover::after, .shot:focus-visible::after { opacity: 1; }
.shot:focus-visible { outline-offset: -3px; }

/* apps */
.app { display: grid; grid-template-columns: 1fr 1fr; }
.app-title { padding: 40px var(--pad); border-right: 1px solid var(--line); }
.app-title > p:not(.kicker) { color: #cfcbc4; max-width: 32em; margin: 0; }
.ver { display: inline-block; margin-left: 0.1em; padding: 0 0.12em; background: var(--accent); color: #0b0b0b; font-size: 0.55em; vertical-align: 0.55em; letter-spacing: 0; }
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; }
.roadmap li { display: grid; grid-template-columns: 90px 1fr; grid-template-rows: auto auto; column-gap: 16px; padding: 28px var(--pad); border-bottom: 1px solid var(--line); color: var(--mute); text-transform: none; letter-spacing: 0; font-size: 13px; }
.roadmap li:last-child { border-bottom: 0; }
.roadmap .rm-n { grid-row: span 2; font-family: var(--wide); font-weight: 900; font-stretch: 125%; font-size: 40px; line-height: 1; color: var(--line); }
.roadmap strong { color: var(--fg); font-family: var(--wide); font-size: 20px; font-weight: 800; text-transform: uppercase; }
.roadmap li.done .rm-n { color: var(--mute); }
.roadmap li.done strong::after { content: ' \2713'; color: var(--ok); }
.roadmap li.is-now { background: var(--panel); box-shadow: inset 4px 0 0 var(--accent); }
.roadmap li.is-now .rm-n { color: var(--accent); }

/* web */
.web-grid { display: grid; grid-template-columns: 1.5fr 1fr; }
.site-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; border-right: 1px solid var(--line); }
.site-frame { display: block; overflow: hidden; border-bottom: 1px solid var(--line); background: #000; aspect-ratio: 16 / 10; }
.site-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.site-card:hover .site-frame img { transform: scale(1.03); }
.site-meta { display: grid; gap: 8px; align-content: start; padding: 28px var(--pad); }
.site-meta strong { font-weight: 900; font-stretch: 125%; font-size: clamp(26px, 3vw, 40px); line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.site-meta > span:not(.kicker):not(.arrow) { color: #cfcbc4; max-width: 34em; }
.site-meta .kicker { margin: 0; }
.arrow { margin-top: 8px; color: var(--fg); }
.site-card:hover .arrow { color: var(--accent); }
.private-card { display: grid; gap: 14px; align-content: start; padding: 40px var(--pad); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.025) 14px 15px); }
.private-card strong { font-weight: 900; font-stretch: 125%; font-size: clamp(26px, 3vw, 40px); line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.private-card p { margin: 0; color: #cfcbc4; }
.private-card .kicker { margin: 0; }
.private-card .btn { justify-self: start; margin-top: 8px; }

/* client access */
.access { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0; }
.access-lede { margin: 0; padding: 40px var(--pad); border-right: 1px solid var(--line); font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; line-height: 1.25; }
.session { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px var(--pad); border-bottom: 1px solid var(--line); background: var(--panel); }
.session .mono { color: var(--ok); }
.session strong { flex: 1; font-size: 18px; }
.access-form { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 0; padding: 40px var(--pad); }
.field { display: grid; gap: 8px; }
.field + .field { margin-left: -1px; }
.field label { color: var(--mute); }
.control { position: relative; display: flex; align-items: center; }
.control select, .control input {
  width: 100%; height: 52px; padding: 0 44px 0 16px;
  border: 1px solid var(--fg); border-radius: 0; background: var(--bg);
  font-family: var(--mono); font-size: 14px; appearance: none;
}
.control select:focus, .control input:focus { outline: none; background: var(--panel); box-shadow: inset 0 -3px 0 var(--accent); }
.control select option, .control select optgroup { background: var(--bg); color: var(--fg); }
.control input::placeholder { color: #5f5c57; }
.control .caret { position: absolute; right: 16px; font-size: 12px; pointer-events: none; color: var(--mute); }
.control[aria-invalid='true'] select, .control[aria-invalid='true'] input { border-color: var(--accent); }
.icon-btn { position: absolute; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--mute); cursor: pointer; }
.icon-btn:hover { color: var(--fg); }
.submit { height: 52px; margin-left: -1px; }
.form-error { grid-column: 1 / -1; min-height: 18px; margin: 14px 0 0; color: var(--accent); text-transform: none; font-size: 13px; }

/* footer */
.foot { padding: 40px var(--pad) 24px; }
.giant.small { display: block; font-size: clamp(40px, 11.6vw, 210px); color: #1c1c1c; line-height: 0.8; white-space: nowrap; overflow: hidden; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--mute); }
.foot-row a { text-decoration: none; color: var(--fg); }
.foot-row a:hover { color: var(--accent); }

/* image viewer */
dialog#viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, 0.94); display: none; place-items: center; }
dialog#viewer[open] { display: grid; }
dialog#viewer::backdrop { background: rgba(0, 0, 0, 0.8); }
#viewer-img { max-width: 94vw; max-height: 88vh; object-fit: contain; border: 1px solid var(--line); }
.viewer-close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border: 1px solid var(--fg); background: var(--bg); color: var(--fg); font-size: 18px; cursor: pointer; }
.viewer-close:hover { background: var(--accent); border-color: var(--accent); color: #000; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid, .now, .project, .app, .web-grid, .access { grid-template-columns: 1fr; }
  .loop-art { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-info, .project.reverse .project-info { order: 0; border: 0; border-bottom: 1px solid var(--line); }
  .app-title { border-right: 0; border-bottom: 1px solid var(--line); }
  .site-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .access-lede { border-right: 0; border-bottom: 1px solid var(--line); }
  .session, .access-form { grid-column: 1; }
}

@media (max-width: 680px) {
  .nav .n { display: none; }
  .nav a { padding: 0 12px; }
  .bar-end { padding-right: 12px; }
  .mark { width: 52px; }
  .sec-head { grid-template-columns: 1fr auto; }
  .sec-n { grid-column: 1 / -1; padding-bottom: 0; }
  .disciplines li { grid-template-columns: 28px 1fr; }
  .disciplines li > span:last-child { grid-column: 2; text-align: left; }
  .g-takut, .g-abar { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .g-takut .tall { grid-row: auto; grid-column: span 2; aspect-ratio: 4 / 5; }
  .g-takut .shot:nth-child(2) { grid-column: span 2; }
  .g-abar .square { grid-row: auto; grid-column: span 2; aspect-ratio: 1; }
  .access-form { grid-template-columns: 1fr; gap: 16px; }
  .field + .field, .submit { margin-left: 0; }
  .roadmap li { grid-template-columns: 64px 1fr; }
  .roadmap .rm-n { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .loop-ring, .dot.live { animation: none; }
  .btn:hover { transform: none; }
}

/* layout fixes */
.giant span { white-space: nowrap; }
.g-takut { height: clamp(420px, 62vw, 720px); }
.g-abar { height: clamp(340px, 42vw, 540px); }
.shot { min-height: 0; }
.roadmap { grid-auto-rows: 1fr; }
.roadmap li { align-content: center; }
.giant.small { font-size: clamp(34px, 9.4vw, 176px); }
@media (max-width: 680px) {
  .g-takut, .g-abar { height: auto; }
  .g-takut .shot:not(.tall), .g-abar .shot:not(.square) { aspect-ratio: 16 / 9; }
}

/* ---------- 01 Apps: Power Congak & Gergasi ---------- */
.arcade {
  display: grid; gap: clamp(20px, 3vw, 36px);
  padding: clamp(24px, 4vw, 48px) var(--pad);
  background: #f6ecd6;
  color: #111;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px);
  background-size: 14px 14px;
}
.arcade-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em 0.5em; margin: 0; font-size: clamp(24px, 4.6vw, 64px); line-height: 1.2; }
.pc-mark { font-family: 'Press Start 2P', monospace; font-size: 1em; letter-spacing: 0.02em; text-transform: uppercase; }
.pc-power, .pc-congak {
  -webkit-text-stroke: 0.12em #000;
  paint-order: stroke fill;
  text-shadow: 0.1em 0.1em 0 #000;
}
.pc-power { color: #ffd23f; }
.pc-congak { color: #2f7de1; }
.amp { font-family: var(--wide); font-weight: 900; font-stretch: 125%; font-size: 0.9em; color: #111; }
.gergasi-mark { font-family: 'Inter', system-ui, sans-serif; font-weight: 900; font-size: 1.25em; letter-spacing: -0.045em; color: #111; }
.g-dot { color: #0b5d3b; }
.arcade-shot {
  display: block; width: 100%; margin: 0; padding: 0;
  border: 4px solid #111; background: #111; cursor: zoom-in;
  box-shadow: 10px 10px 0 #111;
  transition: transform 0.12s, box-shadow 0.12s;
}
.arcade-shot:hover { transform: translate(-3px, -3px); box-shadow: 13px 13px 0 var(--accent); }
.arcade-shot img { width: 100%; height: auto; image-rendering: pixelated; }

.pc-chip { font-family: 'Press Start 2P', monospace; font-size: 10px; color: #ffd23f; -webkit-text-stroke: 3px #000; paint-order: stroke fill; letter-spacing: 0; text-transform: none; }
.g-chip { font-family: 'Inter', system-ui, sans-serif; font-weight: 900; font-size: 15px; color: var(--fg); letter-spacing: -0.03em; text-transform: none; }
.g-chip .g-dot { color: #1f9d63; }

.app-title .roadmap { margin-top: 28px; border-top: 1px solid var(--line); }
.app-title .roadmap li { padding-left: 0; padding-right: 0; }
.app-title .roadmap li.is-now { padding-left: 16px; }
.app-gergasi { padding: 40px var(--pad); }
.app-gergasi > p:not(.kicker) { color: #cfcbc4; max-width: 34em; margin: 0 0 24px; font-size: 17px; }
.g-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.g-list li { display: flex; align-items: center; gap: 10px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--fg); text-transform: none; letter-spacing: 0; font-size: 13px; }
.g-list i { color: #1f9d63; width: 18px; }
.app .roadmap { grid-auto-rows: auto; }

/* Mula-Mula now sits inside Games */
#games .now { border-bottom: 1px solid var(--line); }

@media (max-width: 680px) {
  .arcade-shot { box-shadow: 6px 6px 0 #111; }
  .g-list { grid-template-columns: 1fr; }
}
.amp-group { white-space: nowrap; }
