/* ============================================================
   LEAGUE ORCHARD — DESIGN SYSTEM
   "The Orchard": structured grid meets organic growth.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  /* Brand core */
  --navy:        #0D1B2A;
  --navy-700:    #14283d;
  --navy-600:    #1d344d;
  --forest:      #2E7D32;
  --forest-600:  #25692a;
  --field:       #8BC34A;
  --field-300:   #b7dd88;
  --harvest:     #F28C28;
  --harvest-600: #d9761a;
  --chalk:       #E6E8EB;

  /* Neutrals (warm-cool blend toward navy) */
  --ink:         #0D1B2A;
  --slate:       #43536a;
  --mute:        #6b7a90;
  --line:        #e2e6ec;
  --line-soft:   #eef1f5;
  --paper:       #ffffff;
  --paper-2:     #f7f9fb;
  --paper-3:     #f0f4f8;

  /* Semantic */
  --ok:          #2E7D32;
  --warn:        #F28C28;
  --alert:       #d64545;
  --info:        #2f6fb0;

  /* Type */
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem;

  /* Radii */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* Shadows — soft, layered, never harsh */
  --sh-sm: 0 1px 2px rgba(13,27,42,0.04), 0 1px 3px rgba(13,27,42,0.06);
  --sh-md: 0 2px 8px rgba(13,27,42,0.06), 0 8px 24px rgba(13,27,42,0.08);
  --sh-lg: 0 8px 28px rgba(13,27,42,0.10), 0 24px 60px rgba(13,27,42,0.12);
  --sh-glow: 0 6px 24px rgba(46,125,50,0.22);

  --maxw: 1180px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Type ---- */
.display {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
h1,h2,h3,h4 { font-family: var(--ui); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.eyebrow {
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}
.lede { font-size: 1.12rem; color: var(--slate); line-height: 1.7; }
.muted { color: var(--mute); }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: var(--s9) 0; }
.grid { display: grid; gap: 1.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--ui); font-weight: 700; font-size: 0.92rem;
  padding: 0.8rem 1.4rem; border-radius: var(--r-pill);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: var(--sh-glow); }
.btn-primary:hover { background: var(--forest-600); transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 28px rgba(46,125,50,0.35), 0 0 0 1px rgba(46,125,50,0.1); }
.btn-harvest { background: var(--harvest); color: #fff; box-shadow: 0 6px 22px rgba(242,140,40,0.28); }
.btn-harvest:hover { background: var(--harvest-600); transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 28px rgba(242,140,40,0.38), 0 0 0 1px rgba(242,140,40,0.1); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--forest); color: var(--forest); background: rgba(46,125,50,0.03); transform: translateY(-2px); }
.btn-ghost-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.3); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-700); transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1rem; }

/* ---- Badges / pills ---- */
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem; border-radius: var(--r-pill);
}
.tag-green { background: rgba(46,125,50,0.1); color: var(--forest); }
.tag-field { background: rgba(139,195,74,0.18); color: #4e7a16; }
.tag-orange { background: rgba(242,140,40,0.14); color: var(--harvest-600); }
.tag-navy { background: rgba(13,27,42,0.07); color: var(--navy); }
.tag-alert { background: rgba(214,69,69,0.1); color: var(--alert); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---- Cards ---- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.5rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }
.card-flat { box-shadow: var(--sh-sm); }

/* ---- Brand logo lockup ---- */
.lo-logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.lo-logo .mark { width: 34px; height: 34px; flex-shrink: 0; }
.lo-logo .word { font-family: var(--ui); font-weight: 800; letter-spacing: -0.01em; line-height: 1; font-size: 1.15rem; }
.lo-logo .word .lg { color: var(--navy); }
.lo-logo .word .or { color: var(--forest); }
.lo-logo.on-dark .word .lg { color: #fff; }
/* Horizontal lockup image in nav */
.nav-logo-img { height: 60px; width: auto; display: block; flex-shrink: 0; }

/* ---- Top nav (app + marketing) ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { font-size: 0.88rem; font-weight: 600; color: var(--slate); transition: color .15s; }
.nav-links a:hover { color: var(--forest); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }

/* ---- Organic / orchard motifs ---- */
.leaf-bg { position: relative; overflow: hidden; }
.grain::after {
  content:''; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ---- Stat ---- */
.stat .n { font-family: var(--display); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--navy); }
.stat .l { font-size: 0.8rem; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.4rem; }

/* ---- Avatar ---- */
.avatar { border-radius: 50%; background: var(--paper-3); display: grid; place-items: center; font-weight: 800; color: var(--forest); flex-shrink: 0; }
.avatar.sq { border-radius: var(--r-md); }

/* ---- Dividers ---- */
.hr { height: 1px; background: var(--line); border: 0; }

/* ---- Footer ---- */
.foot { background: var(--navy); color: #b9c4d2; padding: var(--s8) 0 var(--s6); }
.foot a { color: #d4dce6; }
.foot a:hover { color: #fff; }

/* ---- App shell (org/team/dashboard) ---- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  background: var(--navy); color: #c4cfdd; padding: 1.5rem 1rem;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand { padding: 0.4rem 0.6rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 1rem; }
.side .group-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #5c6f86; padding: 0 0.6rem; margin: 1.1rem 0 0.35rem; }
.side a.item {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; color: #c4cfdd; transition: background .15s, color .15s;
}
.side a.item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side a.item.active { background: rgba(139,195,74,0.16); color: var(--field); }
.side a.item .ic { width: 18px; text-align: center; opacity: .85; }
.side .side-foot { margin-top: auto; padding-top: 1.2rem; font-size: 0.74rem; color: #5c6f86; border-top: 1px solid rgba(255,255,255,0.08); }
.main { background: var(--paper-2); min-width: 0; }
.main-bar { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 2rem; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.main-body { padding: 2rem; }

/* Demo context switcher (sidebar) */
.demo-ctx { padding: 0.55rem 0.6rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 0.8rem; }
.demo-ctx-label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #5c6f86; margin-bottom: 0.4rem; }
.demo-ctx-pills { display: flex; gap: 0.3rem; }
.demo-ctx-pill { font-size: 0.74rem; font-weight: 600; padding: 0.26rem 0.62rem; border-radius: 999px; color: #7a9bb5; border: 1px solid rgba(255,255,255,0.1); transition: all 0.15s; }
.demo-ctx-pill:hover { color: #fff; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.demo-ctx-pill.active { background: rgba(139,195,74,0.18); color: var(--field); border-color: rgba(139,195,74,0.35); }

/* Demo view pills (po-strip / powered-by strip) */
.demo-strip-pills { display: flex; align-items: center; gap: 0.5rem; }
.demo-strip-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5c6f86; }
.demo-strip-pill { font-size: 0.74rem; font-weight: 600; padding: 0.22rem 0.6rem; border-radius: 999px; color: #7a9bb5; border: 1px solid rgba(255,255,255,0.12); transition: all 0.15s; }
.demo-strip-pill:hover { color: #fff; background: rgba(255,255,255,0.08); }
.demo-strip-pill.active { background: rgba(139,195,74,0.2); color: #8BC34A; border-color: rgba(139,195,74,0.4); }

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 0.75rem 1rem; }
  .side .brand, .side .group-label, .side .side-foot, .side .demo-ctx { display: none; }
  .side a.item { white-space: nowrap; }
  .main-body { padding: 1.25rem; }
}

/* ---- Reveal on load ---- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.d1{animation-delay:.05s}.d2{animation-delay:.12s}.d3{animation-delay:.2s}.d4{animation-delay:.28s}.d5{animation-delay:.36s}.d6{animation-delay:.44s}

/* ============================================================
   PREMIUM DYNAMIC EFFECTS & INTERACTIVE STYLES
   ============================================================ */

/* 1. Animated Gradient Background */
@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.bg-animated-gradient {
  background: linear-gradient(-45deg, var(--navy), var(--navy-700), #16361a, var(--navy-600));
  background-size: 400% 400%;
  animation: gradient-flow 18s ease infinite;
}

/* 2. Parallax Scrolling Particles */
.bg-parallax-stars {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--navy), var(--navy-700));
}
.bg-parallax-stars::before,
.bg-parallax-stars::after,
.bg-parallax-stars .stars-layer-3 {
  content: '';
  position: absolute;
  inset: -100px;
  pointer-events: none;
}
.bg-parallax-stars::before {
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(139, 195, 74, 0.45) 100%, transparent),
    radial-gradient(2px 2px at 30% 40%, rgba(242, 140, 40, 0.35) 100%, transparent),
    radial-gradient(1.5px 1.5px at 50% 15%, rgba(139, 195, 74, 0.5) 100%, transparent),
    radial-gradient(2.5px 2.5px at 70% 60%, rgba(242, 140, 40, 0.45) 100%, transparent),
    radial-gradient(1.5px 1.5px at 90% 30%, rgba(139, 195, 74, 0.45) 100%, transparent),
    radial-gradient(2px 2px at 20% 80%, rgba(139, 195, 74, 0.35) 100%, transparent),
    radial-gradient(2px 2px at 80% 90%, rgba(242, 140, 40, 0.45) 100%, transparent),
    radial-gradient(1.5px 1.5px at 45% 75%, rgba(139, 195, 74, 0.45) 100%, transparent);
  background-size: 400px 400px;
  animation: scroll-particles 45s linear infinite;
  opacity: 0.9;
}
.bg-parallax-stars::after {
  background-image:
    radial-gradient(2.5px 2.5px at 15% 35%, rgba(139, 195, 74, 0.5) 100%, transparent),
    radial-gradient(3px 3px at 40% 70%, rgba(139, 195, 74, 0.45) 100%, transparent),
    radial-gradient(2px 2px at 65% 25%, rgba(242, 140, 40, 0.35) 100%, transparent),
    radial-gradient(3.5px 3.5px at 85% 75%, rgba(139, 195, 74, 0.55) 100%, transparent),
    radial-gradient(2px 2px at 55% 50%, rgba(242, 140, 40, 0.45) 100%, transparent),
    radial-gradient(3px 3px at 25% 85%, rgba(139, 195, 74, 0.45) 100%, transparent);
  background-size: 550px 550px;
  animation: scroll-particles 30s linear infinite reverse;
  opacity: 0.75;
}
.bg-parallax-stars .particles-three {
  position: absolute;
  inset: -100px;
  pointer-events: none;
  background-image:
    radial-gradient(3px 3px at 5% 75%, rgba(242, 140, 40, 0.45) 100%, transparent),
    radial-gradient(4px 4px at 50% 90%, rgba(139, 195, 74, 0.45) 100%, transparent),
    radial-gradient(3px 3px at 95% 15%, rgba(139, 195, 74, 0.55) 100%, transparent),
    radial-gradient(4.5px 4.5px at 75% 35%, rgba(242, 140, 40, 0.45) 100%, transparent),
    radial-gradient(3.5px 3.5px at 35% 45%, rgba(139, 195, 74, 0.55) 100%, transparent);

  background-size: 700px 700px;
  animation: scroll-particles 22s linear infinite;
  opacity: 0.65;
}

@keyframes scroll-particles {
  from { transform: translateY(0); }
  to { transform: translateY(-400px); }
}

/* 3. Soft Organic Radial Gradient Background */
.bg-organic-soft {
  background: radial-gradient(circle at 80% 20%, rgba(139, 195, 74, 0.05) 0%, rgba(255, 255, 255, 1) 70%),
              radial-gradient(circle at 10% 80%, rgba(46, 125, 50, 0.03) 0%, rgba(255, 255, 255, 1) 70%),
              var(--paper);
}

/* Features Section (when dark on animated gradient) */
#features.bg-animated-gradient {
  color: rgba(255, 255, 255, 0.88);
}
#features.bg-animated-gradient h2,
#features.bg-animated-gradient h4 {
  color: #ffffff;
}
#features.bg-animated-gradient .eyebrow {
  color: var(--field);
}
#features.bg-animated-gradient p {
  color: rgba(255, 255, 255, 0.68);
}
