/* TSC AI WALLPAPER - mobile first, dark theme, tanpa framework */

:root {
  --bg: #090b11;
  --panel: #10131c;
  --viewer: #0c0f16;
  --line: #232a39;
  --line-strong: #36425c;
  --text: #e9edf5;
  --soft: #b3bcd0;
  --muted: #8c96ab;
  --ice: #8fd8ff;
  --ice-hover: #b4e5ff;
  --ice-ink: #04141f;

  --font-display: "Syne", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: 16px;
  --radius: 12px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }

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

.wrap {
  width: min(1160px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ice);
  color: var(--ice-ink);
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.mark { color: var(--ice); flex: none; }

.nav { display: flex; gap: 2px; }
.nav a {
  position: relative;
  padding: 10px 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 2px;
  background: var(--ice);
}

@media (max-width: 400px) {
  .mark { display: none; }
  .bar { gap: 8px; }
  .brand { font-size: 0.78rem; letter-spacing: 0.02em; }
  .nav a { padding: 10px 6px; font-size: 0.85rem; }
  .nav a[aria-current="page"]::after { left: 6px; right: 6px; }
}

/* ---------- tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--ice); color: var(--ice-ink); }
.btn-primary:hover { background: var(--ice-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--ice); color: var(--ice); }
.btn-sm { min-height: 40px; padding: 0 8px; font-size: 0.8rem; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }

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

.hero { padding-block: 36px 48px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.7rem, 12vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
}
.hero-sub {
  margin: 18px 0 28px;
  max-width: 34ch;
  color: var(--soft);
  font-size: 1.12rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 200px; }

.hero-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2%;
  padding-block: 24px;
}
/* garis silang tipis di belakang kartu */
.hero-stack::before,
.hero-stack::after {
  content: "";
  position: absolute;
  background: var(--line);
  pointer-events: none;
}
.hero-stack::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.hero-stack::after { top: 50%; left: -16px; right: -16px; height: 1px; }

.hero-card {
  position: relative;
  z-index: 1;
  flex: none;
  aspect-ratio: var(--ar);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--viewer);
  transition: border-color 0.2s;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card:hover { border-color: var(--ice); }
.hero-card--main { order: 1; width: 38%; }
.hero-card--a { order: 0; width: 28%; transform: translateY(18px); }
.hero-card--b { order: 2; width: 28%; transform: translateY(-18px); }

/* ---------- janji "original" ---------- */

.promise { padding-block: 40px 56px; border-top: 1px solid var(--line); }
.promise h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.2;
  max-width: 24ch;
}
.promise > p { margin-top: 14px; max-width: 60ch; color: var(--soft); }
.promise-list { display: grid; gap: 20px; margin-top: 32px; }
.promise-list div { padding-top: 14px; border-top: 1px solid var(--line); }
.promise-list dt { font-weight: 600; }
.promise-list dd { margin-top: 4px; color: var(--muted); font-size: 0.95rem; max-width: 40ch; }

/* ---------- judul halaman ---------- */

.page-head { padding-block: 32px 20px; }
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.05;
}
.lead { margin-top: 10px; max-width: 56ch; color: var(--muted); }

/* ---------- gallery ---------- */

.gallery { padding-bottom: 64px; }

.filters { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.js .filters { display: flex; }
.chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active { border-color: var(--ice); color: var(--ice); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.empty { grid-column: 1 / -1; color: var(--muted); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.card[hidden] { display: none; }
@media (hover: hover) {
  .card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
}

.card-media { display: block; aspect-ratio: var(--ar); background: var(--viewer); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 12px; }
.card-char { color: var(--ice); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; }
.card-title {
  margin: 1px 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
}

.specs div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 8px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.specs dt { color: var(--muted); }
.specs dd { margin-left: auto; text-align: right; color: var(--soft); font-variant-numeric: tabular-nums; }

.card-actions { display: grid; gap: 8px; margin-top: 12px; }

/* ---------- detail wallpaper ---------- */

.detail { padding-block: 20px 64px; }
.detail-grid { display: grid; gap: 24px; }

.viewer {
  display: flex;
  justify-content: center;
  padding: 10px;
  background: var(--viewer);
  border: 1px solid var(--line);
  border-radius: 14px;
}
/* width/height auto + max-* = rasio asli terjaga, tanpa crop */
.viewer img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(78vh, 980px);
  border-radius: 6px;
}

.detail-title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 7vw, 2.7rem);
  line-height: 1.08;
}
.detail-desc { margin-top: 12px; max-width: 52ch; color: var(--soft); }
.detail-desc:empty { display: none; }

.specs-lg { margin-top: 24px; }
.specs-lg div { padding: 10px 0; font-size: 0.95rem; }

.detail-actions { display: grid; gap: 10px; margin-top: 24px; }
.note { margin-top: 16px; color: var(--muted); font-size: 0.88rem; max-width: 52ch; }
.note:empty { display: none; }

/* ---------- about / teks ---------- */

.prose { max-width: 62ch; padding-bottom: 64px; }
.prose h2 {
  margin-top: 40px;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}
.prose p { color: var(--soft); margin-top: 10px; }
.prose .note { color: var(--muted); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.credits li { margin-top: 8px; color: var(--soft); }
.page-head .inline-actions { margin-top: 24px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.9rem;
}
.foot { display: grid; gap: 10px; }
.foot-name { color: var(--text); font-weight: 600; }
.foot-name span { display: block; color: var(--muted); font-weight: 400; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { text-decoration: none; transition: color 0.2s; }
.foot-links a:hover { color: var(--ice); }

/* ---------- layar lebih lebar ---------- */

@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .hero-card--a { transform: translateY(28px); }
  .hero-card--b { transform: translateY(-28px); }
  .promise-list { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .detail-actions { display: flex; flex-wrap: wrap; }
  .foot { grid-template-columns: 1fr auto; align-items: end; }
  .foot-copy { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .hero { padding-block: 72px 80px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 40px; align-items: start; }
  .viewer { position: sticky; top: 76px; }
  .detail-info { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover { transform: none; }
}
