/* ============================================================
   XMPANELS — HOMEPAGE DEDICATED STYLESHEET
   File: public/home.css
   Semua styling & responsivitas halaman utama (index.html) dipusatkan di sini.
   ============================================================ */

/* ------------------------------------------------------------
   1. BASE HOMEPAGE & ANTI-CLS RESERVATION
   ------------------------------------------------------------ */
html, body {
  margin: 0;
  padding: 0;
  background: var(--ink, #0a0a0d);
  color: var(--text, #f0f0f0);
}

html.light-theme, body.light-theme {
  background: #f7f5ef !important;
  background-color: #f7f5ef !important;
  color: #0a0a0d !important;
}

/* Reserve space untuk navbar agar tidak terjadi Cumulative Layout Shift (CLS) */
.navbar {
  min-height: 60px;
}

/* Reserve ruang untuk widget async (Trustpilot) & container paket */
.faq-trustpilot, .nav-menu-trustpilot {
  min-height: 60px;
}

.package-container .packages {
  min-height: 320px;
}

/* ------------------------------------------------------------
   2. TECH STACK MARQUEE SECTION
   ------------------------------------------------------------ */
.tech-stack {
  padding: 50px 0 44px;
  background: var(--ink-2, #101015);
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  overflow: hidden;
  position: relative;
}

.tech-stack::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 106, 0, 0.06), transparent 60%);
}

.tech-stack-head {
  text-align: center;
  margin-bottom: 30px;
  padding: 0 20px;
  position: relative;
}

.tech-stack-head .eyebrow {
  display: inline-block;
}

.tech-stack-head h2 {
  font-family: var(--display, 'Space Grotesk'), sans-serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  margin: 8px 0 6px;
  line-height: 1.15;
}

.tech-stack-head h2 em {
  font-style: normal;
  color: var(--orange, #ff6a00);
  text-shadow: 0 0 24px rgba(255, 106, 0, 0.35);
}

.tech-stack-head p {
  font-family: var(--sans, 'Inter'), sans-serif;
  font-size: 0.92rem;
  color: var(--text-dim, #7f7d75);
  max-width: 560px;
  margin: 0 auto;
}

/* Marquee wrapper dengan mask gradient di tepi kiri & kanan */
.tech-marquee {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.tech-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: techScrollL 40s linear infinite;
}

.tech-track.reverse {
  animation: techScrollR 44s linear infinite;
}

.tech-track:hover {
  animation-play-state: paused;
}

@keyframes techScrollL {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes techScrollR {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  flex-shrink: 0;
  background: var(--ink-3, #15151c);
  border: 1px solid var(--line-2, rgba(255, 255, 255, 0.12));
  border-radius: 14px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}

.tech-chip:hover {
  transform: translateY(-6px) scale(1.05);
  border-color: var(--orange, #ff6a00);
  box-shadow: 0 12px 36px rgba(255, 106, 0, 0.22), 0 0 0 1px rgba(255, 106, 0, 0.25);
  background: color-mix(in srgb, var(--orange, #ff6a00) 8%, var(--ink-3, #15151c));
}

.tech-chip .tc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--ink-2, #101015);
  font-size: 1.25rem;
  color: var(--orange, #ff6a00);
  transition: color 0.3s, transform 0.4s ease;
}

.tech-chip:hover .tc-icon {
  transform: rotate(-8deg) scale(1.15);
  color: var(--lime, #c7ff3d);
}

.tech-chip .tc-text,
.tech-chip .tc-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tech-chip .tc-name {
  font-family: var(--display, 'Space Grotesk'), sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text, #f0f0f0);
}

.tech-chip .tc-ver {
  font-family: var(--mono, 'JetBrains Mono'), monospace;
  font-size: 0.68rem;
  color: var(--text-dim, #7f7d75);
  letter-spacing: 0.02em;
}

/* Floating animation untuk setiap chip (staggered) */
.tech-chip {
  animation: techFloat 5s ease-in-out infinite;
}

.tech-track .tech-chip:nth-child(odd) { animation-delay: -1.2s; }
.tech-track .tech-chip:nth-child(3n)  { animation-delay: -2.6s; }
.tech-track .tech-chip:nth-child(5n)  { animation-delay: -3.8s; }

@keyframes techFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Light Theme overrides untuk Marquee & Home Components */
:is(html.light-theme, body.light-theme) .tech-stack {
  background: #efece3;
  border-top-color: rgba(10, 10, 15, 0.1);
  border-bottom-color: rgba(10, 10, 15, 0.1);
}

:is(html.light-theme, body.light-theme) .tech-chip {
  background: #e6e2d6;
  border-color: rgba(10, 10, 15, 0.14);
}

:is(html.light-theme, body.light-theme) .tech-chip:hover {
  background: color-mix(in srgb, var(--orange, #ff6a00) 8%, #e6e2d6);
}

:is(html.light-theme, body.light-theme) .tech-chip .tc-icon {
  background: #efece3;
}

:is(html.light-theme, body.light-theme) .hero-meta-item {
  background: #ffffff;
  border-color: rgba(10, 10, 15, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

:is(html.light-theme, body.light-theme) .features-3d-wrapper {
  background: #ffffff;
  border-color: rgba(10, 10, 15, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.07);
}

:is(html.light-theme, body.light-theme) .f3d-canvas-container {
  background: radial-gradient(circle at center, rgba(255, 106, 0, 0.06) 0%, #ece9de 100%);
}

:is(html.light-theme, body.light-theme) .package-card {
  background: #ffffff;
  border-color: rgba(10, 10, 15, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

:is(html.light-theme, body.light-theme) .package-card.featured {
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.06), #ffffff);
  border-color: var(--orange);
}

:is(html.light-theme, body.light-theme) .bento:not(.bento-4) {
  background: #ffffff;
  border-color: rgba(10, 10, 15, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

:is(html.light-theme, body.light-theme) .bento-4 {
  background: var(--grad) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 16px 36px -6px rgba(255, 106, 0, 0.45) !important;
}

:is(html.light-theme, body.light-theme) .bento-4 h3 {
  color: #ffffff !important;
}

:is(html.light-theme, body.light-theme) .bento-4 p {
  color: rgba(255, 255, 255, 0.92) !important;
}

:is(html.light-theme, body.light-theme) .bento-4 .b-tag {
  color: rgba(255, 255, 255, 0.92) !important;
}

:is(html.light-theme, body.light-theme) .bento-4 .b-icon {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

:is(html.light-theme, body.light-theme) .location-card {
  background: #ffffff;
  border-color: rgba(10, 10, 15, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

:is(html.light-theme, body.light-theme) .faq-item {
  background: #ffffff !important;
  border: 1px solid rgba(10, 10, 15, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
}

:is(html.light-theme, body.light-theme) .faq-item:hover {
  border-color: rgba(255, 106, 0, 0.45) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
}

:is(html.light-theme, body.light-theme) .faq-item.active {
  border-color: var(--orange) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 30px -6px rgba(255, 106, 0, 0.16), inset 3px 0 0 var(--orange) !important;
}

:is(html.light-theme, body.light-theme) .faq-question {
  background: transparent !important;
  border: none !important;
}

:is(html.light-theme, body.light-theme) .faq-q-text {
  color: #0d0d12 !important;
}

:is(html.light-theme, body.light-theme) .faq-item:hover .faq-q-text,
:is(html.light-theme, body.light-theme) .faq-item.active .faq-q-text {
  color: #d45000 !important;
}

:is(html.light-theme, body.light-theme) .faq-badge {
  background: rgba(255, 106, 0, 0.09) !important;
  border-color: rgba(255, 106, 0, 0.28) !important;
  color: #d45000 !important;
}

:is(html.light-theme, body.light-theme) .faq-item.active .faq-badge {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #ffffff !important;
}

:is(html.light-theme, body.light-theme) .faq-toggle-chip {
  background: rgba(10, 10, 15, 0.05) !important;
  border-color: rgba(10, 10, 15, 0.12) !important;
  color: #555555 !important;
}

:is(html.light-theme, body.light-theme) .faq-item:hover .faq-toggle-chip {
  color: #111116 !important;
  border-color: rgba(10, 10, 15, 0.22) !important;
}

:is(html.light-theme, body.light-theme) .faq-item.active .faq-toggle-chip {
  background: rgba(255, 106, 0, 0.12) !important;
  border-color: rgba(255, 106, 0, 0.45) !important;
  color: #d45000 !important;
}

:is(html.light-theme, body.light-theme) .faq-divider {
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.35), rgba(10, 10, 15, 0.08) 60%, transparent) !important;
}

:is(html.light-theme, body.light-theme) .faq-answer-inner p {
  color: #3b3a36 !important;
}

/* Responsive Queries */
@media (max-width: 640px) {
  .tech-stack {
    padding: 38px 0 32px;
  }
  .tech-chip {
    padding: 11px 16px;
    gap: 10px;
  }
  .tech-chip .tc-icon {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }
  .tech-chip .tc-name {
    font-size: 0.8rem;
  }
  .tech-chip .tc-ver {
    font-size: 0.62rem;
  }
  .tech-track {
    gap: 12px;
  }
}

/* ============================================================
   3. UNIVERSAL RESPONSIVE ENHANCEMENTS FOR HOMEPAGE
   Mendukung Mobile (<480px, <640px), Tablet (641px-1024px), Desktop (>1024px),
   Touch Target (min 44px), dan Anti-Horizontal Overflow.
   ============================================================ */

/* Cegah horizontal scroll yang tidak diinginkan di semua resolusi */
html, body {
  overflow-x: clip;
}

/* Touch target ramah jari & fluid container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* --- HERO SECTION RESPONSIVENESS --- */
.hero {
  position: relative;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    padding: 0 clamp(16px, 4vw, 32px);
  }
  .hero-left {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
  }
  .hero-right {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 32px 0 48px !important;
  }
  .hero-left h1 {
    font-size: clamp(1.85rem, 6.5vw, 2.6rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em;
  }
  .hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.02rem) !important;
    line-height: 1.55 !important;
    margin-bottom: 24px !important;
  }
  .hero-meta {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-top: 24px !important;
  }
  .hero-meta-item {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
    border-radius: var(--rad-sm, 10px);
    box-sizing: border-box;
  }
  .hero-meta-item .num {
    font-size: 1.45rem !important;
  }
  .hero-meta-item .lbl {
    font-size: 0.76rem !important;
  }
}

@media (max-width: 480px) {
  .hero-btn-group {
    display: flex;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }
  .hero-btn-group .btn-cloud-primary,
  .hero-btn-group .btn-cloud-secondary {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
    font-size: 0.92rem !important;
    box-sizing: border-box;
  }
  .hero-telemetry-card {
    padding: 14px !important;
    border-radius: var(--rad-sm, 12px) !important;
  }
  .telemetry-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .telemetry-metric-box {
    padding: 10px 8px !important;
  }
  .telemetry-metric-lbl {
    font-size: 0.66rem !important;
  }
  .telemetry-metric-val {
    font-size: 0.8rem !important;
    gap: 4px !important;
    word-break: break-word;
  }
  .telemetry-activity-log {
    font-size: 0.72rem !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 360px) {
  .hero-meta {
    grid-template-columns: 1fr !important;
  }
  .telemetry-metrics-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- STATS STRIP RESPONSIVENESS --- */
@media (max-width: 768px) {
  .stats-strip {
    padding: 24px 0 !important;
  }
  .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
  .stat-cell {
    padding: 14px !important;
  }
  .stat-num {
    font-size: 1.75rem !important;
  }
  .stat-lbl {
    font-size: 0.78rem !important;
  }
}

@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
}

/* --- PACKAGES & PRICING RESPONSIVENESS --- */
.packages {
  display: grid;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1025px) {
  .packages {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 22px !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .packages {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
  }
}

@media (max-width: 640px) {
  .packages {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .package-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .package-tabs::-webkit-scrollbar {
    display: none;
  }
  .package-tab {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  .package-card {
    padding: 20px 16px !important;
  }
  .package-card .btn-buy {
    min-height: 46px !important;
    font-size: 0.94rem !important;
    justify-content: center !important;
  }
}

/* --- BENTO FEATURES RESPONSIVENESS --- */
@media (max-width: 768px) {
  .bento-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .bento {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    padding: 20px 18px !important;
  }
  .bento h3 {
    font-size: 1.05rem !important;
  }
  .bento p {
    font-size: 0.86rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .bento-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

/* --- 3D CYBER-CORE SHOWCASE RESPONSIVENESS (ANTI-GEPENG MOBILE) --- */
.features-3d-wrapper {
  overflow: hidden;
  border-radius: var(--rad, 16px);
  background: var(--ink-2, #101015);
  border: 1px solid var(--line-2, rgba(255, 255, 255, 0.1));
}

.f3d-canvas-container {
  width: 100%;
  height: 480px;
  min-height: 480px;
  position: relative;
  overflow: hidden;
  display: block;
}

.f3d-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 1024px) {
  .f3d-canvas-container {
    height: 450px !important;
    min-height: 450px !important;
  }
}

@media (max-width: 768px) {
  .f3d-hud-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 14px 16px !important;
  }
  /* Tinggi absolut nyaman untuk mobile agar server rack 3D tegak, proporsional & tidak gepeng */
  .f3d-canvas-container {
    height: 420px !important;
    min-height: 420px !important;
  }
  .f3d-canvas {
    height: 100% !important;
  }
  .f3d-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }
  .f3d-modes-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 12px 14px !important;
  }
}

@media (max-width: 480px) {
  .f3d-canvas-container {
    height: 400px !important;
    min-height: 400px !important;
  }
  .f3d-modes-bar {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

@media (max-width: 360px) {
  .f3d-canvas-container {
    height: 360px !important;
    min-height: 360px !important;
  }
}

/* --- LOCATIONS SECTION RESPONSIVENESS --- */
@media (max-width: 768px) {
  .locations-row {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .location-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* --- FAQ & ACCORDION RESPONSIVENESS --- */
@media (max-width: 640px) {
  .faq-container {
    gap: 10px !important;
  }
  .faq-question {
    min-height: 48px !important;
    padding: 16px 14px !important;
    gap: 12px !important;
  }
  .faq-q-left {
    gap: 12px !important;
    align-items: flex-start !important;
  }
  .faq-badge {
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
    margin-top: 1px !important;
  }
  .faq-q-text {
    font-size: 0.94rem !important;
    line-height: 1.42 !important;
  }
  .faq-toggle-chip {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.78rem !important;
    margin-top: 1px !important;
  }
  .faq-divider {
    margin: 0 14px 12px 14px !important;
  }
  .faq-answer-inner p {
    padding: 0 14px 18px 14px !important;
    font-size: 0.88rem !important;
    line-height: 1.62 !important;
  }
}

@media (max-width: 380px) {
  .faq-question {
    padding: 13px 12px !important;
    gap: 8px !important;
  }
  .faq-q-left {
    gap: 8px !important;
  }
  .faq-badge {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
  }
  .faq-q-text {
    font-size: 0.88rem !important;
    line-height: 1.38 !important;
  }
  .faq-toggle-chip {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 0.72rem !important;
  }
  .faq-divider {
    margin: 0 12px 10px 12px !important;
  }
  .faq-answer-inner p {
    padding: 0 12px 14px 12px !important;
    font-size: 0.84rem !important;
    line-height: 1.55 !important;
  }
}
