/* ==========================================================================
   templatein9 — India APK/App Download Template
   Design language: "Build Release" — a dark, signal-driven system built
   around the one thing these pages exist to communicate: verified app specs
   and a trustworthy download. Stat rows read like a release changelog;
   the accent green means "verified / ready", amber flags rating & trust.
   Mobile-first. No UI framework. System fonts only (perf on Indian mobile
   networks matters more than a webfont).
   ========================================================================== */

:root{
  /* ---- Color tokens ---- */
  --ink:        #0c0f14;
  --ink-2:      #12161d;
  --surface:    #171c25;
  --surface-2:  #1e2530;
  --border:     #2a3140;
  --text:       #eef1f5;
  --text-dim:   #9aa5b4;
  --text-faint: #6b7484;

  --accent:       #22d07a;   /* verified / download / live */
  --accent-dim:   #1a9f5d;
  --accent-ink:   #06120b;
  --amber:        #ffb020;   /* rating / trust */
  --danger:       #ff5d5d;

  /* ---- Type ---- */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    ui-monospace, "SFMono-Regular", "Roboto Mono", Consolas, monospace;

  /* ---- Layout ---- */
  --maxw: 1160px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --gap: 20px;

  --header-h: 64px;
}

/* ---- Reset ---- */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font: inherit; }
h1,h2,h3,h4{ margin: 0 0 .5em; line-height: 1.15; font-weight: 800; }
p{ margin: 0 0 1em; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

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

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

.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus{ left: 0; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(12,15,20,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .01em;
}
.brand img{
  width: 32px; height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--surface-2);
}
.brand-name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav{
  display: none;
}
.main-nav ul{
  display: flex;
  gap: 4px;
}
.main-nav a{
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
}
.main-nav a:hover{ color: var(--text); background: var(--surface); }

.header-cta{
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}
.header-cta:hover{ background: var(--accent-dim); }

.menu-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.menu-toggle svg{ width: 20px; height: 20px; }
.menu-toggle .icon-close{ display: none; }
.menu-toggle[aria-expanded="true"] .icon-open{ display: none; }
.menu-toggle[aria-expanded="true"] .icon-close{ display: block; }

.mobile-nav{
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--ink);
  z-index: 39;
  padding: 24px 20px;
  overflow-y: auto;
  display: none;
}
.mobile-nav.is-open{ display: block; }
.mobile-nav ul{ display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a{
  display: block;
  padding: 14px 6px;
  font-size: 17px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.mobile-nav .header-cta{
  display: flex;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}

@media (min-width: 860px){
  .main-nav{ display: block; }
  .header-cta{ display: inline-flex; }
  .menu-toggle{ display: none; }
  .mobile-nav{ display: none !important; }
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb{
  padding: 14px 0 0;
}
.breadcrumb ol{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-faint);
}
.breadcrumb li:not(:last-child)::after{
  content: "/";
  margin-left: 6px;
  color: var(--text-faint);
}
.breadcrumb a{ color: var(--text-dim); }
.breadcrumb a:hover{ color: var(--accent); }
.breadcrumb [aria-current]{ color: var(--text); font-weight: 600; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative;
  padding: 32px 0 40px;
  overflow: hidden;
}
.hero::before{
  content: "";
  position: absolute;
  top: -160px; right: -120px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(34,208,122,.28) 0%, rgba(34,208,122,0) 70%);
  pointer-events: none;
}
.hero-grid{
  display: grid;
  gap: 28px;
  position: relative;
}
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(34,208,122,.12);
  border: 1px solid rgba(34,208,122,.3);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow .dot{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,208,122,.25);
}

.hero h1{
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: -.01em;
}
.hero-desc{
  color: var(--text-dim);
  font-size: 16px;
  max-width: 56ch;
}

.cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary{
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover{ background: var(--accent-dim); }
.btn-ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover{ border-color: var(--text-dim); }
.btn-icon{ width: 18px; height: 18px; }

.hero-media{
  position: relative;
}
.app-card{
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.app-card img{
  width: 84px; height: 84px;
  border-radius: 18px;
  background: var(--ink-2);
  flex-shrink: 0;
}
.app-card-body{ min-width: 0; }
.app-card-name{
  font-weight: 800;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-card-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}
.rating-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--amber);
  font-weight: 700;
}

@media (min-width: 860px){
  .hero-grid{
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
  }
}

/* ==========================================================================
   STAT / SPEC SCOREBOARD (App Information)
   ========================================================================== */
.section{ padding: 36px 0; }
.section-head{ margin-bottom: 20px; }
.section-title{
  font-size: clamp(20px, 3.6vw, 26px);
}
.section-sub{
  color: var(--text-dim);
  font-size: 14px;
}

.spec-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.spec-cell{
  background: var(--surface);
  padding: 16px;
}
.spec-label{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.spec-value{
  font-weight: 800;
  font-size: 16px;
  word-break: break-word;
}
.spec-value.is-accent{ color: var(--accent); }

@media (min-width: 640px){
  .spec-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   DOWNLOAD PANEL (page-special)
   ========================================================================== */
.download-panel{
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.download-panel .btn-primary{
  width: 100%;
  padding: 16px 22px;
  font-size: 16px;
}
.download-note{
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}

.sticky-dl-bar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: var(--ink-2);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(100%);
  transition: transform .25s ease;
}
.sticky-dl-bar.is-visible{ transform: translateY(0); }
.sticky-dl-bar strong{ font-size: 14px; }
.sticky-dl-bar span{ display: block; font-size: 12px; color: var(--text-dim); }
.sticky-dl-bar .btn{ padding: 10px 18px; font-size: 14px; }

@media (min-width: 860px){
  .sticky-dl-bar{ display: none !important; }
}

/* ==========================================================================
   INSTALL STEPS
   ========================================================================== */
.steps{
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.step{
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.step::before{
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(34,208,122,.15);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step p{ margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* ==========================================================================
   ARTICLE / MAIN CONTENT (AI generated body)
   ========================================================================== */
.article-body{
  font-size: 16px;
  color: var(--text-dim);
}
.article-body h2{
  color: var(--text);
  font-size: 22px;
  margin-top: 1.6em;
}
.article-body h3{
  color: var(--text);
  font-size: 18px;
  margin-top: 1.3em;
}
.article-body p{ margin-bottom: 1em; }
.article-body ul{
  list-style: disc;
  padding-left: 1.3em;
  margin-bottom: 1em;
}
.article-body li{ margin-bottom: .4em; }
.article-body figure{ margin: 1.4em 0; }
.article-body figure img {
  margin: 0 auto;
}
.article-body figcaption{
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 6px;
}
.article-body a{ color: var(--accent); text-decoration: underline; }

/* ==========================================================================
   CARDS: latest / popular / related posts
   ========================================================================== */
.card-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.post-card{
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  align-items: center;
}
.post-card img{
  width: 76px; height: 76px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}
.post-card-title{
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.35;
}
.post-card:hover .post-card-title{ color: var(--accent); }
.post-card-meta{
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

@media (min-width: 640px){
  .card-grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px){
  .card-grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   PILL LINK LIST (special pages / nav explore / tag cloud)
   ========================================================================== */
.pill-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill{
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.pill:hover{ color: var(--text); border-color: var(--accent); }

/* ==========================================================================
   TWO-COLUMN LAYOUT (content + inline sidebar widgets)
   ========================================================================== */
.layout{
  display: grid;
  gap: 32px;
}
.widget{ margin-bottom: 28px; }
.widget-title{
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
  margin-bottom: 12px;
}

@media (min-width: 980px){
  .layout.with-aside{
    align-items: start;
  }
  .layout aside{ position: sticky; top: calc(var(--header-h) + 20px); }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 20px;
  background: var(--ink-2);
}
.footer-grid{
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
.footer-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  margin-bottom: 8px;
}
.footer-brand img{ width: 28px; height: 28px; border-radius: 7px; }
.footer-desc{
  color: var(--text-faint);
  font-size: 13.5px;
  max-width: 42ch;
}
.footer-col-title{
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.footer-col ul{ display: grid; gap: 8px; }
.footer-col a{ font-size: 14px; color: var(--text-dim); }
.footer-col a:hover{ color: var(--accent); }

.footer-bottom{
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-faint);
}
.footer-disclosure{
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
  margin-top: 14px;
}

@media (min-width: 760px){
  .footer-grid{ grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ==========================================================================
   MISC
   ========================================================================== */
.empty-note{
  color: var(--text-faint);
  font-size: 13.5px;
  font-style: italic;
}

.back-to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
}
.back-to-top.is-visible{ display: flex; }
.back-to-top svg{ width: 18px; height: 18px; }
