/*
Theme Name: App Studio
Theme URI: https://karyakijobega.dev
Author: Karya Kijo Bega
Author URI: https://karyakijobega.dev
Description: Tema WordPress elegan dan minimalis untuk developer aplikasi & game yang dipublikasikan di Google Play Store. Fokus pada produk: hero yang jelas, katalog Apps & Games yang bersih, halaman detail per aplikasi, dan tombol download yang selalu mudah ditemukan.
Version: 1.8.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: app-studio
Tags: portfolio, custom-post-type, one-column, two-columns, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --surface: #FFFFFF;
  --surface-alt: #F9FAFB;
  --line: #E5E7EB;
  --line-soft: #EEF0F3;

  --text: #111111;
  --text-secondary: #6B7280;
  --text-faint: #9CA3AF;

  --accent: #5B57F0;
  --accent-dark: #4844C9;
  --accent-soft: #EEEDFD;
  --accent-contrast: #FFFFFF;

  --star: #F5A524;

  --font-display: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --container: 1180px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px -2px rgba(17,17,17,0.06);
  --shadow-md: 0 14px 34px -14px rgba(17,17,17,0.14);
  --shadow-lg: 0 24px 60px -20px rgba(17,17,17,0.18);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  line-height: 1.18;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1.2em; color: var(--text-secondary); }

ul, ol { padding-left: 1.2em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #000; color: #fff; box-shadow: var(--shadow-md); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(91,87,240,0.55);
}
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: #fff;
}
.btn-ghost:hover { border-color: var(--text); }

.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.btn svg { flex: none; }

/* ==========================================================================
   SITE HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  flex: none;
}

.site-brand-mark-link,
.site-brand-title-link,
.site-brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
}
.site-brand-title-link:hover { color: var(--accent); }

.site-brand .mark,
.site-brand .custom-logo-link,
.site-brand img.custom-logo {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px;
  max-height: 34px;
  border-radius: 9px;
  overflow: hidden;
  object-fit: cover;
  flex: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-secondary);
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  flex: none;
  align-items: center;
  justify-content: center;
}

.lang-dropdown { position: relative; flex: none; }

.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px 7px 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.lang-dropdown-toggle:hover { border-color: var(--text-faint); }
.lang-dropdown-toggle .chevron { color: var(--text-faint); transition: transform .15s ease; }
.lang-dropdown.is-open .lang-dropdown-toggle .chevron { transform: rotate(180deg); }

.flag-icon {
  display: inline-block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}
.flag-icon svg { width: 100%; height: 100%; display: block; }

.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 60;
}
.lang-dropdown.is-open .lang-dropdown-menu { display: block; }

.lang-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.lang-dropdown-menu a:hover { background: var(--bg-soft); color: var(--text); }
.lang-dropdown-menu a.is-active { background: var(--accent-soft); color: var(--accent-dark); }

.mobile-nav-panel .lang-dropdown { align-self: flex-start; margin: 4px 0 2px; }
.mobile-nav-panel .lang-dropdown-menu { right: auto; left: 0; }

.mobile-nav-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line-soft);
}
.mobile-nav-panel.is-open { display: flex; }
.mobile-nav-panel a {
  padding: 12px 4px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav-panel .btn { margin-top: 12px; align-self: flex-start; }
.mobile-nav-panel .gplay-badge {
  margin-top: 12px;
  align-self: flex-start;
  padding: 9px 18px 9px 14px;
  border-bottom: none;
}
.mobile-nav-panel .gplay-badge .gplay-eyebrow,
.mobile-nav-panel .gplay-badge .gplay-brand { color: #fff; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  padding: 88px 0 70px;
  background:
    radial-gradient(600px 320px at 82% 0%, var(--accent-soft), transparent 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 4.6vw, 58px);
  max-width: 14ch;
}
.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 18px;
  max-width: 48ch;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-trust .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
}
.hero-trust .label {
  font-size: 12.5px;
  color: var(--text-faint);
}

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent), #8B87F7);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual svg { width: 62%; height: 62%; }
.hero-visual .float-card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-visual .float-card.c1 { top: 12%; left: -8%; }
.hero-visual .float-card.c2 { bottom: 14%; right: -6%; }

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section { padding: 84px 0; }
.section-alt { background: var(--bg-soft); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 42px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0; }
.section-head p { margin: 0; max-width: 42ch; }

/* ==========================================================================
   PRODUCT CARDS (apps & games)
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--line);
}

/* Tautan tak-terlihat yang menutupi seluruh kartu (klik di mana pun pada
   kartu menuju halaman detail), diberi z-index rendah supaya elemen yang
   perlu klik terpisah (badge Play Store) bisa ditumpuk di atasnya. */
.product-card-linkarea {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  width: 100%;
  background: var(--bg-soft);
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-media img { transform: scale(1.04); }

/* Badge download Play Store yang mengambang di pojok thumbnail. z-index
   lebih tinggi dari product-card-linkarea supaya bisa diklik terpisah
   (langsung ke Play Store) tanpa ikut ke halaman detail. */
.product-download-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(17,17,17,0.72);
  color: #fff;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.35);
  transition: background .15s ease, transform .15s ease;
}
.product-download-badge:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
}
.product-download-badge svg { width: 14px; height: 14px; }

.product-body { padding: 20px 20px 8px; display: flex; gap: 14px; align-items: flex-start; }

.product-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: none;
  background: var(--bg-soft);
}

.product-title-wrap h3 { font-size: 17.5px; margin-bottom: 4px; }
.product-tagline { font-size: 13.5px; color: var(--text-secondary); margin: 0; }

.product-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 6px;
}
.product-rating .star { color: var(--star); }

.product-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 20px;
  margin-top: auto;
}
.product-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
}
.product-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.product-download:hover { color: var(--accent-dark); }

/* Pil hitam "Google Play" mini di footer kartu produk */
.product-download-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #000;
  color: #fff;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  font-size: 12px;
  font-weight: 600;
}
.product-download-pill:hover { background: #1a1a1a; color: #fff; }
.product-download-pill svg { flex: none; }

/* ==========================================================================
   BADGE RESMI "GET IT ON GOOGLE PLAY" — dipakai di hero, CTA, halaman detail
   ========================================================================== */

.gplay-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  border-radius: 8px;
  padding: 9px 18px 9px 14px;
  transition: background .15s ease, transform .15s ease;
}
.gplay-badge:hover { background: #1a1a1a; color: #fff; transform: translateY(-1px); }
.gplay-badge .gplay-icon { flex: none; display: flex; }
.gplay-badge .gplay-text { display: flex; flex-direction: column; line-height: 1.15; }
.gplay-badge .gplay-eyebrow {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #fff;
}
.gplay-badge .gplay-brand {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  margin-top: 1px;
}

.gplay-badge-sm { padding: 6px 12px 6px 9px; border-radius: 999px; gap: 7px; }
.gplay-badge-sm .gplay-eyebrow { font-size: 7.5px; }
.gplay-badge-sm .gplay-brand { font-size: 13px; }

/* ==========================================================================
   ABOUT DEVELOPER
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.about-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-figure img { width: 100%; height: 100%; object-fit: cover; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 34px;
}
.stat-item .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--text);
}
.stat-item .label {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ==========================================================================
   CTA STRIP
   ========================================================================== */

.cta-strip {
  background: linear-gradient(135deg, var(--accent), #7A76F5);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  color: #fff;
}
.cta-strip h2 { color: #fff; margin-bottom: 10px; }
.cta-strip p { color: rgba(255,255,255,0.85); max-width: 48ch; margin: 0 auto 26px; }
.cta-strip .btn-primary { background: #fff; color: var(--accent-dark); }
.cta-strip .btn-primary:hover { background: #fff; color: var(--accent-dark); box-shadow: 0 14px 30px -12px rgba(0,0,0,0.3); }

/* ==========================================================================
   PRODUCT DETAIL (single app / single game)
   ========================================================================== */

.product-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line-soft); }
.product-hero-top { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.product-hero-icon {
  width: 88px; height: 88px;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: none;
  background: var(--bg-soft);
}
.product-hero h1 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 6px; }
.product-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--text-secondary); }

.product-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.product-field .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.product-field .value { font-weight: 600; font-size: 14.5px; color: var(--text); }

.product-content { padding: 50px 0; max-width: 74ch; }
.product-content h2 { margin-top: 1.6em; font-size: 24px; }
.product-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0;
}
.product-gallery img { border-radius: var(--radius-sm); border: 1px solid var(--line); }

.download-panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 40px 0;
}
.download-panel h3 { margin: 0 0 4px; font-size: 17px; }
.download-panel p { margin: 0; font-size: 13.5px; }

/* ==========================================================================
   GENERIC PAGE / BLOG
   ========================================================================== */

.page-header-simple { padding: 60px 0 20px; text-align: center; }
.page-header-simple h1 { font-size: clamp(30px,4vw,44px); }
.entry-content { max-width: 74ch; margin: 0 auto; padding: 60px 0; }
.entry-content.is-page { max-width: 900px; }
.entry-content h2[id] { scroll-margin-top: 100px; }

/* Dukungan lebar untuk gambar/blok tertentu (WordPress block editor:
   pilih "Wide width" atau "Full width" pada gambar/galeri) supaya bisa
   melebar lebih dari kolom teks tanpa mengubah lebar keseluruhan halaman. */
.entry-content .alignwide {
  max-width: 1100px;
  width: 100%;
  margin-left: 50%;
  transform: translateX(-50%);
}
.entry-content .alignfull {
  max-width: none;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.empty-state { text-align: center; padding: 70px 0; color: var(--text-faint); }

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.4em;
  color: var(--text-secondary);
  font-style: italic;
}
code, pre {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
pre { padding: 16px; overflow: auto; }
code { padding: 2px 6px; }

.pagination { display: flex; gap: 10px; margin-top: 36px; font-size: 14px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer { padding: 60px 0 34px; border-top: 1px solid var(--line-soft); margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 32ch; }
.footer-brand .site-brand { margin-bottom: 12px; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--text-secondary); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .product-fields { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 22px; }
}

@media (max-width: 760px) {
  .primary-nav, .header-actions .gplay-badge, .header-actions > .lang-dropdown { display: none; }
  .nav-toggle { display: flex; }
  .product-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .cta-strip { padding: 44px 24px; }
  .footer-grid { flex-direction: column; gap: 30px; }
  .footer-links { gap: 30px; }
  .product-gallery { grid-template-columns: 1fr; }
  .product-hero-top { flex-direction: column; align-items: flex-start; }
  .download-panel { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .hero { padding: 60px 0 50px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .hero-trust { gap: 20px; }
  .product-fields { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
