/* =============================================================
   WayangOS — Custom styles (Tailwind handles the rest)
   Only stuff Tailwind CDN can't do: pseudo-elements, keyframes,
   complex selectors, custom components.
   ============================================================= */

/* ---- CSS Custom Properties (used in inline styles) ---- */
:root {
  --bg-primary: #0a0806;
  --bg-card: #1a1410;
  --accent: #c8941a;
  --accent-bright: #f0b830;
  --text-primary: #f0e8d8;
  --text-secondary: #a09070;
  --text-dim: #5a4a30;
  --border: #2e2318;
  --border-gold: #c8941a44;
  --green: #7ec87e;
}

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.85rem;
  color: #a09070;
  padding: 12px 0;
}
.breadcrumb a {
  color: #a09070;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: #c8941a; }
.breadcrumb .sep { margin: 0 8px; color: #5a4a30; }
.breadcrumb .current { color: #f0e8d8; }

/* ---- App Hero Section ---- */
.app-hero {
  text-align: center;
  padding: 80px 24px 48px;
  position: relative;
}
.app-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #f0e8d8;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
}
.accent { color: #c8941a; }
.tagline {
  color: #a09070;
  font-size: 1.2rem;
  margin: 0 0 12px;
  font-weight: 500;
}
.desc {
  color: #5a4a30;
  font-size: 0.95rem;
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

/* ---- Hero Buttons ---- */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: #c8941a;
  color: #0a0806;
  border-color: #c8941a;
}
.btn-primary:hover {
  background: #f0b830;
  border-color: #f0b830;
}
.btn-secondary {
  background: transparent;
  color: #c8941a;
  border-color: #c8941a;
}
.btn-secondary:hover {
  background: rgba(200, 148, 26, 0.1);
  color: #f0b830;
  border-color: #f0b830;
}

/* ---- Hero Screenshot ---- */
.hero-screenshot {
  padding: 0 24px 48px;
}
.hero-screenshot img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  border: 1px solid #2e2318;
  image-rendering: pixelated;
}
.hero-screenshot .caption,
.caption {
  text-align: center;
  color: #5a4a30;
  font-size: 0.8rem;
  margin-top: 12px;
  font-style: italic;
}

/* ---- App Sections ---- */
.app-section {
  padding: 48px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 36px;
}
.section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f0e8d8;
  margin: 0 0 8px;
}
.section-header p {
  color: #a09070;
  font-size: 0.95rem;
  margin: 0;
}

/* ---- Feature Cards ---- */
.feature-card {
  background: #1a1410;
  border: 1px solid #2e2318;
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: #c8941a44;
  transform: translateY(-2px);
}
.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.feature-card h3 {
  color: #f0e8d8;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.feature-card p {
  color: #a09070;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ---- Pricing Cards ---- */
.pricing-card {
  background: #1a1410;
  border: 1px solid #2e2318;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.pricing-card:hover {
  border-color: #c8941a44;
  transform: translateY(-2px);
}
.plan-name {
  color: #c8941a;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.price {
  font-size: 2rem;
  font-weight: 800;
  color: #f0b830;
  margin: 8px 0;
}
.price-note {
  color: #a09070;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.plan-desc {
  color: #a09070;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.plan-desc ul {
  list-style: none;
  text-align: left;
  padding: 0;
}
.plan-desc ul li {
  padding: 4px 0;
}
.plan-desc ul li::before {
  content: '✓ ';
  color: #7ec87e;
}
.pricing-card .btn {
  margin-top: 16px;
  display: inline-flex;
}

/* ---- Addon Cards ---- */
.addon-card {
  background: #1a1410;
  border: 1px solid #2e2318;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.addon-card h4 {
  color: #f0e8d8;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.addon-price {
  color: #f0b830;
  font-weight: 700;
  font-size: 0.95rem;
}
.addon-card p {
  color: #a09070;
  font-size: 0.85rem;
  margin: 4px 0 0;
}

/* ---- Usecase Cards ---- */
.usecase-card {
  background: #1a1410;
  border: 1px solid #2e2318;
  border-radius: 12px;
  padding: 24px;
}
.usecase-card .uc-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.usecase-card h3 {
  color: #f0e8d8;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.usecase-card p {
  color: #a09070;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ---- Screenshot Gallery ---- */
.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2e2318;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.gallery-item:hover {
  border-color: #c8941a44;
  transform: translateY(-2px);
}
.gallery-item .caption {
  background: #1a1410;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #a09070;
  text-align: center;
  font-style: normal;
  margin-top: 0;
}

/* ---- Mobile responsive for app pages ---- */
@media (max-width: 768px) {
  .app-hero h1 { font-size: 2rem; }
  .hero-icon { font-size: 2.5rem; }
  .tagline { font-size: 1rem; }
  .desc { font-size: 0.9rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 320px; justify-content: center; }
  .section-header h2 { font-size: 1.3rem; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ---- Batik background pattern ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,148,26,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,148,26,.025) 1px, transparent 1px),
    radial-gradient(ellipse at 30% 60%, rgba(200,148,26,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(200,148,26,.03) 0%, transparent 40%);
  background-size: 60px 60px, 60px 60px, 100% 100%, 100% 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---- Radial glow behind hero sections ---- */
.hero-glow::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 100vw);
  height: min(700px, 100vw);
  background: radial-gradient(circle, rgba(200,148,26,.27) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-sm::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100vw);
  height: min(600px, 100vw);
  background: radial-gradient(circle, rgba(200,148,26,.27) 0%, transparent 65%);
  pointer-events: none;
}

/* ---- Pulse animation (hero badge dot) ---- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.animate-pulse-dot { animation: pulse 2s infinite; }

/* ---- Cultural card decorative aksara ---- */
.cultural-card::before {
  content: '꧅';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 8rem;
  color: #c8941a;
  opacity: .04;
  line-height: 1;
}
.cultural-card::after {
  content: '꧅';
  position: absolute;
  bottom: -30px;
  right: 20px;
  font-size: 8rem;
  color: #c8941a;
  opacity: .04;
  line-height: 1;
}

/* ---- Terminal dots ---- */
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot-red   { background: #ff5f57; }
.terminal-dot-yellow{ background: #febc2e; }
.terminal-dot-green { background: #28c840; }

/* ---- Mobile nav dropdown ---- */
@media (max-width: 1024px) {
  .nav-toggle { display: block !important; }
  .lang-switch-mobile { display: flex !important; }
  .nav-links {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #0a0806;
    z-index: 9998;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(200,148,26,.27);
  }
  .nav-links.active { display: flex !important; }
  .nav-links li { border-bottom: 1px solid #2e2318; list-style: none; }
  .nav-links a { display: block; padding: 14px 24px; font-size: 1rem; }
}

/* ---- WhatsApp floating button ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #25D366;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  transition: transform .3s;
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* ---- Gold divider ---- */
.gold-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8941a, transparent);
  margin: 0 auto 24px;
}

/* ---- Comparison table ---- */
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th,
.comparison-table td { padding: 16px 24px; text-align: left; border-bottom: 1px solid #2e2318; }
.comparison-table th { color: #5a4a30; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.comparison-table td:first-child { font-weight: 600; }
.comparison-table tr:hover td { background: rgba(200,148,26,.03); }
.comparison-table .highlight-row td { color: #c8941a; }
.comparison-table .check { color: #7ec87e; }
.comparison-table .cross { color: #5a4a30; }

@media (max-width: 768px) {
  .comparison-table { font-size: .75rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; white-space: nowrap; }
}

/* ---- Shortcuts table (app pages) ---- */
.shortcuts-table { width: 100%; border-collapse: collapse; }
.shortcuts-table th,
.shortcuts-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #2e2318; font-size: .9rem; }
.shortcuts-table th { color: #c8941a; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.shortcuts-table td { color: #a09070; }
.shortcuts-table code { background: #110e09; padding: 2px 8px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: #f0b830; }

/* ---- Download page: GPU guide ---- */
.gpu-guide { border: 2px solid #c8941a; }
.gpu-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gpu-mapping { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.download-grid.two-col { grid-template-columns: repeat(2, 1fr); max-width: 680px; }
.legacy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 768px) {
  .gpu-check-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .download-grid.two-col { grid-template-columns: 1fr; max-width: 100%; }
  .legacy-grid { grid-template-columns: 1fr 1fr; }
  .pos-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .legacy-grid { grid-template-columns: 1fr; }
}

/* ---- Download card badge ---- */
.dl-card .card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #c8941a;
  color: #000;
  font-size: .65rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ---- Legacy toggle arrow ---- */
details[open] .legacy-toggle .arrow { transform: rotate(180deg); }

/* ---- Pricing grid (gates/map pages) ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.pricing-card.featured { border-color: #c8941a; background: linear-gradient(180deg, #221b13 0%, #1a1410 100%); }
.pricing-card .plan-desc ul { list-style: none; text-align: left; padding: 0; }
.pricing-card .plan-desc ul li { padding: 4px 0; }
.pricing-card .plan-desc ul li::before { content: '✓ '; color: #7ec87e; }

@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---- Screenshot gallery (gates/map pages) ---- */
.screenshot-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.gallery-item img { width: 100%; display: block; image-rendering: pixelated; }

/* ---- Addon grid (map page) ---- */
.addon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ---- POS download selects ---- */
.dl-select {
  background: #1a1410;
  color: #f0e8d8;
  border: 2px solid #c8941a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  width: 100%;
  max-width: 400px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.dl-btn-main { opacity: .5; pointer-events: none; }
.dl-btn-main.active { opacity: 1; pointer-events: auto; }

/* ---- Apps grid (apps.html) ---- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
@media (max-width: 768px) { .apps-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ---- Index: features grid ---- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ---- Index: arch grid ---- */
.arch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .arch-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ---- Index: usecases grid ---- */
.usecases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
@media (max-width: 768px) { .usecases-grid { grid-template-columns: 1fr; } }

/* ---- App detail: features grid ---- */
.app-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
@media (max-width: 768px) { .app-features-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ---- Misc responsive helpers ---- */
@media (max-width: 768px) {
  .hero-buttons-stack { flex-direction: column; width: 100%; }
  .hero-buttons-stack > * { text-align: center; width: 100%; min-height: 44px; }
  .screenshot-grid-2 { grid-template-columns: 1fr !important; }
}
