/* Krishi Crown - theme upgrade. Loaded after style.css; delete the <link> in base.html to go back to the old look. */

/* ---- Header: soft glass bar with a gold edge ---- */
.site-head { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: 0 1px 0 rgba(226,166,38,.35), 0 8px 24px -18px rgba(15,53,36,.45); }
.site-head nav a { transition: background .2s, color .2s, transform .2s; }
.site-head nav a:hover { background: var(--brand); color: var(--brand-fg); transform: translateY(-1px); }

/* ---- Hero: deep green with glowing light, rings and a soft vignette ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 4rem 0 3.6rem;
  background-color: #08261a;
  background-image:
    radial-gradient(46rem 26rem at 88% -8%, rgba(240,185,58,.30), transparent 62%),
    radial-gradient(40rem 28rem at -6% 112%, rgba(98,196,142,.32), transparent 62%),
    radial-gradient(30rem 20rem at 55% 55%, rgba(27,110,70,.35), transparent 70%),
    linear-gradient(135deg, #0a2a1c 0%, #0f4029 52%, #0a2e1f 100%),
    repeating-linear-gradient(100deg, transparent 0 26px, rgba(255,255,255,.028) 26px 28px); }
.hero::before { content: ""; position: absolute; z-index: -1; right: -9rem; top: -9rem; width: 28rem; height: 28rem; border-radius: 50%;
  border: 2px solid rgba(240,185,58,.28); box-shadow: 0 0 0 2.2rem rgba(240,185,58,.05), 0 0 0 4.6rem rgba(240,185,58,.035); }
.hero::after { content: ""; position: absolute; z-index: -1; left: -7rem; bottom: -11rem; width: 24rem; height: 24rem; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(98,196,142,.35), rgba(98,196,142,0) 68%); }
.hero .wrap { position: relative; z-index: 1; }

.hero .eyebrow { display: inline-block; padding: .3rem .8rem; border-radius: 999px; background: rgba(240,185,58,.12); border: 1px solid rgba(240,185,58,.4); letter-spacing: .16em; }
.hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero h1 em { background: linear-gradient(92deg, #ffd978 0%, #f0b93a 45%, #e2a626 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.hero-logo { box-shadow: 0 14px 34px -14px rgba(0,0,0,.65), 0 0 0 4px rgba(255,255,255,.08); }

.btn { transition: transform .18s ease, box-shadow .18s ease, background .2s, filter .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, #f6c850, #e2a626); box-shadow: 0 10px 22px -10px rgba(226,166,38,.9); }
.btn-gold:hover { box-shadow: 0 14px 28px -10px rgba(226,166,38,1); }
.btn-primary { box-shadow: 0 8px 18px -10px rgba(29,90,58,.9); }
.hero .btn-ghost { backdrop-filter: blur(4px); background: rgba(255,255,255,.06); border-color: rgba(233,243,236,.35); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(233,243,236,.7); }

/* ---- "Our Products" panel ---- */
.ledger { border-radius: 1.1rem; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 2rem 4rem -1.6rem rgba(0,0,0,.7), 0 0 0 6px rgba(255,255,255,.05); position: relative; }
.ledger::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: 1.1rem 1.1rem 0 0; background: linear-gradient(90deg, #62c48e, #f0b93a); }
.ledger h2 { font-size: 1.15rem; }

/* ---- Cards and link cards: lift on hover ---- */
.card, .linkcard, .kpi { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s; }
.linkcard:hover, a.kpi:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(15,53,36,.55); }
.card { box-shadow: 0 1px 0 rgba(15,53,36,.04), 0 12px 26px -22px rgba(15,53,36,.5); }
.section h2 { position: relative; padding-bottom: .55rem; }
.section h2::after { content: ""; display: block; width: 3.2rem; height: 4px; border-radius: 4px; margin-top: .5rem; background: linear-gradient(90deg, var(--brand), var(--gold)); }

/* ---- Footer ---- */
.site-foot { background: linear-gradient(135deg, #0a2a1c 0%, #0f3d29 100%); border-top: 3px solid var(--gold); }

/* ---- Dark theme tweaks ---- */
:root[data-theme="dark"] .site-head { box-shadow: 0 1px 0 rgba(240,185,58,.25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-head { box-shadow: 0 1px 0 rgba(240,185,58,.25); } }

@media (prefers-reduced-motion: reduce) { .btn, .card, .linkcard, .kpi, .site-head nav a { transition: none; } .btn:hover, .linkcard:hover, a.kpi:hover { transform: none; } }
@media (max-width: 34rem) { .hero { padding: 2.6rem 0 2.2rem; } .hero::before { width: 18rem; height: 18rem; right: -8rem; top: -8rem; } }

/* ======================= Animated nature scene in the hero ======================= */
.hero-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,38,26,0) 40%, rgba(226,166,38,.20) 100%); }
.hero-fx > * { position: absolute; }

/* sunrise: glowing sun with slowly turning rays */
.hero-fx .sun { right: 15%; top: 9%; width: 6.5rem; height: 6.5rem; border-radius: 50%;
  background: radial-gradient(circle, #fff3c0 0 24%, #f7c948 50%, rgba(247,201,72,0) 72%); animation: kcPulse 6s ease-in-out infinite; }
.hero-fx .sun::before { content: ""; position: absolute; inset: -6rem; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,226,140,.20) 0 4deg, transparent 4deg 14deg);
  -webkit-mask-image: radial-gradient(circle, transparent 20%, #000 34%, transparent 68%); mask-image: radial-gradient(circle, transparent 20%, #000 34%, transparent 68%);
  animation: kcSpin 90s linear infinite; }
@keyframes kcPulse { 50% { transform: scale(1.12); filter: brightness(1.15); } }

/* clouds drifting across */
.hero-fx .cloud { left: -30%; width: 14rem; opacity: .9; animation: kcCloud linear infinite; }
.hero-fx .cloud svg { width: 100%; display: block; }
@keyframes kcCloud { to { left: 112%; } }

/* birds flying past */
.hero-fx .bird { left: -8%; width: 2.2rem; animation: kcFly linear infinite; }
.hero-fx .bird svg { width: 100%; display: block; overflow: visible; animation: kcFlap .55s ease-in-out infinite alternate; transform-origin: 50% 70%; }
.hero-fx .bird path { fill: none; stroke: #eaf6ee; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes kcFly { to { left: 108%; } }
@keyframes kcFlap { from { transform: scaleY(1); } to { transform: scaleY(.35); } }

/* rolling hills (seamless loop) */
.hero-fx .hills { left: 0; bottom: 0; width: 200%; height: 46%; animation: kcHills linear infinite; }
.hero-fx .hills.far { height: 52%; animation-duration: 150s; opacity: .55; }
.hero-fx .hills.near { height: 38%; animation-duration: 90s; }
.hero-fx .hills svg { width: 100%; height: 100%; display: block; }
@keyframes kcHills { to { transform: translateX(-50%); } }

/* wheat field swaying in the wind */
.hero-fx .field { left: 0; right: 0; bottom: 0; height: 9rem; opacity: .9; }
.hero-fx .stalk { position: absolute; display: block; bottom: -6px; width: 3px; border-radius: 3px; transform-origin: 50% 100%;
  background: linear-gradient(180deg, #d8b650, #4f7d37); animation: kcWind 3.4s ease-in-out infinite alternate; }
.hero-fx .stalk i { position: absolute; left: 50%; top: -17px; width: 11px; height: 24px; margin-left: -5.5px; border-radius: 55% 55% 50% 50% / 75% 75% 30% 30%;
  background: repeating-linear-gradient(160deg, #f1d36f 0 3px, #c79a2e 3px 5px); box-shadow: 0 0 8px rgba(240,185,58,.35); }
@keyframes kcWind { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* fireflies */
.hero-fx .fly { width: 4px; height: 4px; border-radius: 50%; background: #fff0a8; box-shadow: 0 0 10px 3px rgba(255,226,110,.8); animation: kcTwinkle ease-in-out infinite alternate, kcFloat ease-in-out infinite alternate; }
@keyframes kcTwinkle { from { opacity: .1; } to { opacity: 1; } }
@keyframes kcFloat { from { transform: translate(-14px, 8px); } to { transform: translate(18px, -16px); } }

.hero::before { animation: kcSpin 70s linear infinite; }
@keyframes kcSpin { to { transform: rotate(360deg); } }
.hero .wrap { z-index: 2; }

/* still picture for visitors who prefer less motion */
.hero-fx.calm * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
@media (max-width: 40rem) { .hero-fx .sun { right: 6%; top: 4%; width: 4.5rem; height: 4.5rem; } .hero-fx .field { height: 6rem; } .hero-fx .cloud { width: 9rem; } }
/* leave room at the bottom so the wheat field never covers the text */
.hero { padding-bottom: 7.6rem; }
@media (max-width: 40rem) { .hero { padding-bottom: 5.4rem; } }

/* "Install app" button */
.install-chip { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; border: 0; border-radius: 999px; padding: .7rem 1.2rem; font-weight: 700; font-size: .95rem;
  background: linear-gradient(180deg, #f6c850, #e2a626); color: #3d2a03; box-shadow: 0 12px 26px -10px rgba(0,0,0,.6); cursor: pointer; }
.install-chip:hover { filter: brightness(1.06); }
