/* =============================================================
   GRAMENA PAPPULU — style.css
   Core: tokens, base, typography, layout, nav, hero, sections
   ============================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --green-950: #0b1a12;
  --green-900: #132a1e;
  --green-800: #1a3828;
  --green-700: #234a33;
  --green-600: #2d523a;
  --green-100: #e1ebe4;
  --green-50:  #f2f7f4;

  --gold-700: #966f21;
  --gold-500: #c89b3c;
  --gold-300: #ead397;
  --gold-100: #f8f3e3;

  --maroon:   #4a1e18;
  --maroon-2: #3a1712;
  --terra:    #d96b27;

  --ivory:    #faf7f0;
  --ivory-2:  #f3efe6;
  --paper:    #ffffff;

  --ink:      #1c211e;
  --ink-soft: #525b56;
  --line:     rgba(26, 56, 40, 0.12);
  --wa:       #25d366;
  --wa-dark:  #1eb257;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-telugu: "Noto Sans Telugu", var(--font-body);

  --container: 1240px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 2px 10px rgba(11, 26, 18, 0.05);
  --shadow-md: 0 18px 40px -18px rgba(11, 26, 18, 0.28);
  --shadow-lg: 0 40px 80px -30px rgba(11, 26, 18, 0.45);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
ul { list-style: none; padding: 0; }
::selection { background: var(--green-800); color: var(--gold-300); }

/* Grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; color: var(--green-900); }
.display { font-family: var(--font-display); }
.telugu { font-family: var(--font-telugu); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-700);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.eyebrow.center::after { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }

.h-xl { font-size: clamp(2.6rem, 6vw, 5rem); }
.h-lg { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.h-md { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); line-height: 1.7; }
.muted { color: var(--ink-soft); }
.serif-accent { font-style: italic; color: var(--gold-700); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; position: relative; }
.section-sm { padding: clamp(3rem, 5vw, 4.5rem) 0; }
.bg-ivory-2 { background: var(--ivory-2); }
.bg-green { background: var(--green-900); color: var(--ivory); }
.bg-green h1,.bg-green h2,.bg-green h3 { color: var(--ivory); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 1.1rem; }
.section-head p { margin-top: 1.1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(250, 247, 240, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px; gap: 2rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-te { font-family: var(--font-telugu); font-weight: 700; font-size: 1.15rem; color: var(--green-800); letter-spacing: 0; }
.brand-en { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold-700); margin-top: 3px; }
.site-header.on-dark:not(.scrolled) .brand-te { color: var(--ivory); }
.site-header.on-dark:not(.scrolled) .nav-links a { color: rgba(250,247,240,0.9); }
.site-header.on-dark:not(.scrolled) .nav-toggle span { background: var(--ivory); }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--green-900);
  position: relative; padding: 4px 0; transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold-500); transition: width 0.35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--green-700); }
.nav-cta { display: flex; align-items: center; gap: 0.8rem; }

.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-900); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--green-950);
  padding: 6rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  display: flex; flex-direction: column;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a { font-family: var(--font-display); font-size: 2rem; color: var(--ivory); padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.mobile-drawer a .idx { font-family: var(--font-mono); font-size: 0.7rem; color: var(--gold-500); margin-right: 1rem; vertical-align: middle; }
.mobile-drawer .drawer-foot { margin-top: auto; color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.mobile-drawer .drawer-foot a { font-family: var(--font-body); font-size: 1rem; border: none; padding: 0.2rem 0; color: var(--gold-300); display: inline; }

/* ---------- HERO SLIDER ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity 1.2s var(--ease), visibility 1.2s var(--ease);
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform: scale(1.08);
  transition: transform 7s ease-out;
}
.hero-slide.active .hero-slide-img { transform: scale(1); }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,26,18,0.15) 0%, rgba(11,26,18,0.05) 40%, rgba(11,26,18,0.55) 78%, rgba(11,26,18,0.86) 100%),
    linear-gradient(100deg, rgba(11,26,18,0.6) 0%, rgba(11,26,18,0.12) 55%, transparent 80%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(4rem, 9vw, 8rem); padding-top: 8rem; }
.hero-copy { max-width: 760px; }
.hero-eyebrow { color: var(--gold-300); margin-bottom: 1.4rem; }
.hero-title {
  color: var(--ivory);
  font-size: clamp(2.9rem, 8vw, 6.6rem);
  line-height: 0.98; letter-spacing: -0.02em; font-weight: 600;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: block; transform: translateY(110%); transition: transform 0.9s var(--ease); }
.hero-title .line.reveal > span { transform: translateY(0); }
.hero-title em { font-style: italic; color: var(--gold-300); }
.hero-desc { color: rgba(250,247,240,0.9); font-size: clamp(1.05rem, 1.7vw, 1.35rem); max-width: 540px; margin-top: 1.6rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

/* fade-in for text block on slide change */
.hero-copy [data-anim] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.hero.animate .hero-copy [data-anim] { opacity: 1; transform: translateY(0); }
.hero.animate .hero-copy [data-anim].d1 { transition-delay: 0.15s; }
.hero.animate .hero-copy [data-anim].d2 { transition-delay: 0.3s; }
.hero.animate .hero-copy [data-anim].d3 { transition-delay: 0.45s; }

/* Slider controls */
.hero-controls {
  position: absolute; z-index: 3; right: clamp(1.5rem, 4vw, 3.5rem); bottom: clamp(4rem, 9vw, 8rem);
  display: flex; align-items: center; gap: 1.2rem;
}
.hero-arrow {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(250,247,240,0.4); color: var(--ivory);
  display: grid; place-items: center; transition: all 0.35s var(--ease);
  backdrop-filter: blur(6px); background: rgba(11,26,18,0.15);
}
.hero-arrow:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--green-950); transform: scale(1.08); }
.hero-arrow svg { width: 20px; height: 20px; }
.hero-dots { position: absolute; z-index: 3; left: clamp(1.5rem, 4vw, 3rem); bottom: clamp(4.4rem, 9vw, 8.4rem); display: flex; gap: 0.7rem; }
.hero-dot { width: 34px; height: 3px; border-radius: 3px; background: rgba(250,247,240,0.3); overflow: hidden; position: relative; }
.hero-dot span { position: absolute; inset: 0; width: 0; background: var(--gold-300); }
.hero-dot.active span { width: 100%; }
.hero-dot.active.play span { animation: dotFill var(--dot-dur, 5.5s) linear forwards; }
@keyframes dotFill { from { width: 0; } to { width: 100%; } }

.hero-scroll { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 1.4rem; color: rgba(250,247,240,0.7); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.hero-scroll .bar { width: 1px; height: 40px; background: linear-gradient(var(--gold-300), transparent); animation: scrollBar 2s ease-in-out infinite; }
@keyframes scrollBar { 0%,100% { opacity: 0.3; transform: scaleY(0.6);} 50% { opacity: 1; transform: scaleY(1);} }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(38px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal].in-now { opacity: 1; transform: none; transition: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.4s; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--green-900); border-top: 1px solid rgba(200,155,60,0.25); border-bottom: 1px solid rgba(200,155,60,0.25); }
.trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.trust-item { padding: 1.9rem 1.4rem; text-align: center; border-right: 1px solid rgba(255,255,255,0.07); }
.trust-item:last-child { border-right: none; }
.trust-item .ti-ico { color: var(--gold-400, var(--gold-500)); margin: 0 auto 0.7rem; width: 26px; height: 26px; color: var(--gold-300); }
.trust-item .ti-t { color: var(--ivory); font-weight: 600; font-size: 0.95rem; }
.trust-item .ti-s { color: rgba(250,247,240,0.6); font-size: 0.78rem; margin-top: 0.2rem; }

/* ---------- About split ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.about-media { position: relative; }
.about-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; }
.about-badge {
  position: absolute; bottom: -28px; left: -28px;
  background: var(--green-900); color: var(--ivory);
  border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow-md);
  border: 1px solid rgba(200,155,60,0.3); max-width: 250px;
}
.about-badge .num { font-family: var(--font-display); font-size: 2.6rem; color: var(--gold-300); line-height: 1; }
.about-badge .lbl { font-size: 0.82rem; color: rgba(250,247,240,0.75); margin-top: 0.3rem; }
.about-list { margin-top: 2rem; display: grid; gap: 1rem; }
.about-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.about-list .tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; margin-top: 3px; }
.about-list .tick svg { width: 14px; height: 14px; }

/* ---------- Section decorative index ---------- */
.chapter-index { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.3em; color: var(--gold-700); }

/* ---------- Story / Siddipet parallax ---------- */
.story { position: relative; overflow: hidden; color: var(--ivory); }
.story-bg { position: absolute; inset: -12% 0; z-index: 0; }
.story-bg img { width: 100%; height: 120%; object-fit: cover; }
.story::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(11,26,18,0.92) 0%, rgba(11,26,18,0.78) 42%, rgba(11,26,18,0.45) 100%); }
.story .container { position: relative; z-index: 2; }
.story-quote { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.2; max-width: 820px; color: var(--ivory); }
.story-quote em { color: var(--gold-300); font-style: italic; }

/* ---------- Final CTA ---------- */
.final-cta { background: var(--green-900); color: var(--ivory); text-align: center; position: relative; overflow: hidden; }
.final-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(200,155,60,0.22), transparent 60%); }
.final-cta .container { position: relative; z-index: 2; }
.final-cta h2 { color: var(--ivory); }
.final-cta .actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: rgba(250,247,240,0.72); padding: clamp(3.5rem,6vw,5.5rem) 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-brand .brand-te { color: var(--ivory); font-size: 1.4rem; }
.footer-brand p { margin-top: 1rem; font-size: 0.9rem; max-width: 300px; }
.footer-col h4 { color: var(--ivory); font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.2rem; font-weight: 600; }
.footer-col a, .footer-col li { font-size: 0.92rem; padding: 0.32rem 0; display: block; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--gold-300); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; }
.footer-bottom .fssai { font-family: var(--font-mono); color: rgba(250,247,240,0.55); }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); display: flex; gap: 0.6rem; align-items: center; }
.breadcrumb a:hover { color: var(--green-700); }
.breadcrumb span { color: var(--gold-700); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 10rem 0 clamp(3rem,6vw,5rem); background: var(--green-900); color: var(--ivory); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% -10%, rgba(200,155,60,0.2), transparent 55%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--ivory); font-size: clamp(2.4rem, 5.5vw, 4.2rem); margin-top: 1rem; }
.page-hero p { color: rgba(250,247,240,0.82); max-width: 600px; margin-top: 1rem; }
.page-hero .breadcrumb { color: rgba(250,247,240,0.6); }
.page-hero .breadcrumb a:hover { color: var(--gold-300); }
.page-hero .breadcrumb span { color: var(--gold-300); }
