/*
Theme Name: Nimma Info Child
Template: astra
Version: 1.0
Description: Custom child theme for nimmainfo.in — Kannada finance explainer site.
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root{
  --ink:      #12263A;
  --gold:     #C8932A;
  --teal:     #1C6B5C;
  --rust:     #A63D2F;
  --paper:    #FFFFFF;
  --mist:     #F3F4F6;
  --charcoal: #1E1E1E;
  --hairline: #DCDEE2;

  --font-kn-head: 'Noto Serif Kannada', serif;
  --font-en-head: 'Source Serif 4', serif;
  --font-kn-body: 'Noto Sans Kannada', sans-serif;
  --font-en-body: 'Inter', sans-serif;
  --font-data:    'IBM Plex Mono', monospace;

  --max-width: 1160px;
}

*{ box-sizing: border-box; }

body{
  font-family: var(--font-kn-body);
  color: var(--charcoal);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  margin: 0;
  background: var(--paper);
}

h1,h2,h3,h4,h5,h6{
  font-family: var(--font-kn-head);
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 .5em 0;
}

a{ color: var(--gold); text-decoration: none; }
a:hover{ color: var(--teal); text-decoration: underline; }
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

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

/* ============================================================
   HEADER (mobile-first — hamburger by default, full nav on desktop)
   ============================================================ */
.ni-header{
  background: var(--ink);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}
.ni-header-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.ni-logo a{
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #fff;
}
.ni-logo-kn{
  font-family: var(--font-kn-head);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 700;
}
.ni-logo-en{
  font-family: var(--font-en-head);
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 700;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 1px;
}
.ni-logo a:hover{ text-decoration: none; color: #fff; }

/* Hamburger button — visible by default (mobile-first) */
.ni-nav-toggle{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  order: 2;
}
.ni-nav-toggle span{
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}
.ni-nav-toggle.is-active span:nth-child(1){ transform: translateY(9px) rotate(45deg); }
.ni-nav-toggle.is-active span:nth-child(2){ opacity: 0; }
.ni-nav-toggle.is-active span:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }

.ni-nav{
  order: 3;
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.ni-nav.is-open{ max-height: 500px; }
.ni-nav-list{
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.ni-nav-list li a{
  display: block;
  color: #EDEFF2;
  font-family: var(--font-en-body);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.ni-nav-list li a:hover{ color: var(--gold); text-decoration: none; }

/* Desktop header (768px+) — full horizontal nav, no hamburger */
@media (min-width: 768px){
  .ni-nav-toggle{ display: none; }
  .ni-nav{
    order: 2;
    flex-basis: auto;
    max-height: none;
    overflow: visible;
  }
  .ni-nav-list{
    flex-direction: row;
    gap: 4px;
    margin: 0;
  }
  .ni-nav-list li a{
    border-top: none;
    padding: 8px 12px;
    border-radius: 4px;
  }
  .ni-nav-list li a:hover{ background: rgba(200,147,42,0.15); }
}

/* ============================================================
   HERO
   ============================================================ */
.ni-hero{
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  margin: 28px 0 40px 0;
  color: inherit;
}
.ni-hero:hover{ text-decoration: none; border-color: var(--gold); }
.ni-hero-img img{ width: 100%; }
.ni-hero-body{ padding: 20px; }
.ni-eyebrow{
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ni-hero-body h1{ font-size: clamp(22px, 5vw, 32px); margin: 8px 0; }
.ni-hero-body p{ color: #444; }

@media (min-width: 768px){
  .ni-hero{ display: flex; align-items: stretch; }
  .ni-hero-img{ flex: 0 0 45%; }
  .ni-hero-img img{ height: 100%; object-fit: cover; }
  .ni-hero-body{ flex: 1; display: flex; flex-direction: column; justify-content: center; }
}

/* ============================================================
   CATEGORY SECTIONS + CARD GRID
   ============================================================ */
.ni-section{ margin: 44px 0; }
.ni-category-eyebrow{
  font-family: var(--font-en-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink);
  border-left: 4px solid var(--gold);
  padding-left: 10px;
  margin: 0 0 16px 0;
  text-transform: uppercase;
}
.ni-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px){
  .ni-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px){
  .ni-grid{ grid-template-columns: repeat(3, 1fr); }
}

.ni-card{
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .15s ease;
  background: var(--paper);
}
.ni-card:hover{ border-color: var(--gold); }
.ni-card a{ color: inherit; display: block; }
.ni-card a:hover{ text-decoration: none; }
.ni-card-img img{ width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ni-card-body{ padding: 14px; }
.ni-card-meta{
  font-family: var(--font-data);
  font-size: 11px;
  color: #5B6572;
}
.ni-card h3{
  font-size: 17px;
  margin: 6px 0 0 0;
}
.ni-card:hover h3{ color: var(--gold); }

.ni-viewall{
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-en-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--teal);
}

/* ============================================================
   DATA FIGURES — signature element for use inside article body
   Wrap numbers like: <span class="data-figure positive">+12.4%</span>
   ============================================================ */
.data-figure{
  font-family: var(--font-data);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--mist);
  color: var(--ink);
}
.data-figure.positive{ color: #fff; background: var(--teal); }
.data-figure.negative{ color: #fff; background: var(--rust); }

/* ============================================================
   ARTICLE / SINGLE POST PAGE
   ============================================================ */
.ni-single{ max-width: 760px; margin: 0 auto; padding: 32px 20px; }
.ni-single .ni-eyebrow{ display: block; margin-bottom: 8px; }
.ni-single h1{ font-size: clamp(24px, 5vw, 36px); }
.ni-single .ni-featured-img{ margin: 20px 0; border-radius: 4px; overflow: hidden; }
.ni-single .entry-content p{ margin: 0 0 1.2em 0; }
.ni-single .entry-content h2{ margin-top: 1.6em; font-size: 24px; }

.ni-author-box{
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 18px;
  margin-top: 32px;
  background: var(--mist);
}
.ni-author-box .ni-author-name{
  font-family: var(--font-en-head);
  font-weight: 700;
  color: var(--ink);
}

.ni-disclaimer-inline{
  border-left: 4px solid var(--rust);
  background: var(--mist);
  padding: 12px 16px;
  font-size: 14px;
  color: #444;
  margin: 28px 0;
}

/* ============================================================
   GENERIC PAGE CONTENT (About, Privacy, Terms, Disclaimer)
   ============================================================ */
.ni-page-content{
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 60px 20px;
}
.ni-page-content h1{ font-size: clamp(24px, 5vw, 32px); margin-bottom: .8em; }
.ni-page-content h2{ font-size: 20px; margin-top: 1.6em; }
.ni-page-content p, .ni-page-content li{ color: #333; }
.ni-page-content .disclaimer-box{
  border-left: 4px solid var(--rust);
  background: var(--mist);
  padding: 16px 18px;
  margin: 20px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.ni-footer{
  background: var(--ink);
  color: #C7CCD3;
  margin-top: 60px;
}
.ni-footer-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px;
  text-align: center;
}
.ni-footer-list{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 0;
  margin: 0 0 16px 0;
}
.ni-footer-list a{ color: #EDEFF2; font-family: var(--font-en-body); font-size: 14px; }
.ni-footer-list a:hover{ color: var(--gold); }
.ni-disclaimer-line{ font-size: 13px; max-width: 640px; margin: 0 auto 12px auto; }
.ni-disclaimer-line a{ color: var(--gold); }
.ni-copyright{ font-size: 12px; color: #8A93A0; margin: 0; }

/* ============================================================
   ACCESSIBILITY / MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}
