/* ============================================================
   Nestiy — green theme (loaded last on every page)
   Matches the official Nestiy logo's green and the website's character, Eggi (brand/eggi/):
   a white robot head with a black screen face and glowing cyan eyes.
     dark  = deep forest night with soft green and cyan lights
     light = fresh mint and white with Green's roof green (#1E7A3A)
   Fresh green actions, cyan accents, frosted-glass cards with a faint glow and bold rounded headings.
   The drifting lights are drawn by assets/js/fx.js.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,700;0,800;0,900;1,800&display=swap');

:root{
  --font-head:'Nunito','Inter',system-ui,sans-serif;
  --nf-peach:#7BE3A4; --nf-gold:#A9F0C6; --nf-coral:#5DE1E8; --nf-coral-deep:#1E7A3A;
  --nf-teal:#6CC4D8; --nf-lavender:#8FE3C9; --nf-pink:#F2C9E4; --nf-mint:#7EE0B5;
}
h1, h2, h3, h4, .brand span{ font-family:var(--font-head); }
h1, h2{ font-weight:900; letter-spacing:-0.02em; }
h3, h4{ font-weight:800; letter-spacing:-0.01em; }

/* ---------- dark: forest night ---------- */
html:not([data-theme="light"]){
  --nf-ink-on-glow:#05281A;
  background-color:#06140F;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(230,255,240,0.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 68% 9%, rgba(230,255,240,0.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 84% 34%, rgba(200,250,240,0.75), transparent 60%),
    radial-gradient(1.1px 1.1px at 32% 62%, rgba(220,255,235,0.6), transparent 60%),
    radial-gradient(1.3px 1.3px at 92% 78%, rgba(230,255,240,0.6), transparent 60%),
    radial-gradient(1px 1px at 48% 88%, rgba(200,250,240,0.6), transparent 60%),
    radial-gradient(900px 620px at 88% -6%, rgba(110,220,150,0.20), transparent 62%),
    radial-gradient(1000px 700px at -6% 30%, rgba(40,180,120,0.20), transparent 60%),
    radial-gradient(900px 640px at 60% 112%, rgba(100,190,220,0.16), transparent 60%),
    linear-gradient(170deg, #06140F 0%, #0B2219 42%, #0D2A20 78%, #0F3024 100%);
  background-size:auto; background-repeat:no-repeat;
  background-attachment:fixed;
}
html:not([data-theme="light"]) body{ color:#E6F4EC; }
html:not([data-theme="light"]) em.accent, html:not([data-theme="light"]) .accent{
  font-family:var(--font-head); font-style:normal; font-weight:900;
  background:linear-gradient(100deg, #C8F7DA 0%, #7BE3A4 30%, #5DE1E8 62%, #8FE3C9 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  filter:drop-shadow(0 0 18px rgba(123,227,164,0.25));
}
html:not([data-theme="light"]) .btn-primary{
  background:linear-gradient(135deg, #C8F7DA 0%, #7BE3A4 45%, #3FC98A 100%) !important;
  color:#05281A !important; border-color:transparent !important;
  box-shadow:0 10px 30px -10px rgba(110,220,150,0.55), 0 0 0 1px rgba(180,245,210,0.35) inset !important;
}
html:not([data-theme="light"]) .btn-primary:hover{ box-shadow:0 14px 38px -10px rgba(110,220,150,0.75), 0 0 0 1px rgba(180,245,210,0.5) inset !important; }
html:not([data-theme="light"]) .site-header{
  background:rgba(7,24,17,0.62) !important; border-bottom:1px solid rgba(143,227,201,0.14) !important;
}
/* frosted-glass cards with a faint green glow on the rim */
html:not([data-theme="light"]) :is(.feature-card, .wp-action-card, .ai-card, .step, .sh-card, .sh-item, .adm-card, .hm-card, .flow-panel, .na-box, .modal){
  box-shadow:0 30px 60px -34px rgba(2,10,6,0.9), 0 0 0 1px rgba(143,227,201,0.10), 0 0 40px -22px rgba(123,227,164,0.35);
}

/* ---------- light: fresh mint ---------- */
html[data-theme="light"]{
  --nf-ink-on-glow:#fff;
  background-color:#EAF7EF;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 22%, rgba(80,170,130,0.5), transparent 60%),
    radial-gradient(1.2px 1.2px at 72% 12%, rgba(120,210,190,0.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 88% 52%, rgba(80,170,130,0.45), transparent 60%),
    radial-gradient(1.2px 1.2px at 36% 70%, rgba(93,225,232,0.5), transparent 60%),
    radial-gradient(800px 520px at 86% -4%, rgba(150,235,185,0.75), transparent 62%),
    radial-gradient(900px 600px at -8% 24%, rgba(143,227,201,0.55), transparent 60%),
    radial-gradient(1000px 640px at 50% 110%, rgba(255,226,214,0.75), transparent 62%),
    radial-gradient(700px 360px at 30% 40%, rgba(255,255,255,0.65), transparent 70%),
    linear-gradient(180deg, #D8F0E2 0%, #E7F5EC 40%, #F3FBF6 75%, #FFF8EC 100%);
  background-size:auto; background-repeat:no-repeat;
  background-attachment:fixed;
}
html[data-theme="light"] em.accent, html[data-theme="light"] .accent{
  font-family:var(--font-head); font-style:normal; font-weight:900;
  background:linear-gradient(100deg, #2E9B52 0%, #1E7A3A 40%, #0C9AA8 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
html[data-theme="light"] .btn-primary{
  background:linear-gradient(135deg, #3DAA5F 0%, #278A47 50%, #1E7A3A 100%) !important;
  color:#fff !important; border-color:transparent !important;
  box-shadow:0 12px 28px -12px rgba(30,122,58,0.55) !important;
}
html[data-theme="light"] .site-header{ background:rgba(255,255,255,0.6) !important; border-bottom:1px solid rgba(12,154,168,0.12) !important; }
html[data-theme="light"] :is(.feature-card, .wp-action-card, .ai-card, .step, .sh-card, .sh-item, .adm-card, .hm-card, .flow-panel){
  box-shadow:0 24px 50px -30px rgba(18,56,42,0.28), 0 0 0 1px rgba(255,255,255,0.6) inset;
}
html[data-theme="light"] .section-forest{ background:linear-gradient(135deg, rgba(18,56,42,0.95), rgba(20,110,70,0.9)) !important; }
/* the home page keeps a mint highlight for "saved" / "fits budget" */
html[data-theme="light"] .hm{ --c-mint:#1E9E78; --c-lime:#1E7A3A; }
/* success states stay mint (a calm "all good") */
html[data-theme="light"] :is(.sh-status.within, .sh-seen){ color:#1E8A6A; }
html:not([data-theme="light"]) :is(.sh-status.within){ color:var(--nf-mint); }

/* ---------- Nestiy floating in page heroes ---------- */
@keyframes nfFloat{ 0%, 100%{ transform:translateY(0) rotate(-2deg); } 50%{ transform:translateY(-14px) rotate(2deg); } }
@keyframes nfTwinkle{ 0%, 100%{ opacity:0; transform:scale(.4) rotate(0deg); } 50%{ opacity:1; transform:scale(1) rotate(45deg); } }
@keyframes nfAura{ 0%, 100%{ opacity:.65; transform:scale(1); } 50%{ opacity:1; transform:scale(1.08); } }
.page-hero .container.has-nestiy{ position:relative; }
.nestiy-hero{ position:absolute; right:0; top:50%; width:250px; height:250px; margin-top:-125px; pointer-events:none; z-index:1; }
.nestiy-hero::before{
  content:""; position:absolute; inset:14%; border-radius:50%;
  background:radial-gradient(circle, rgba(140,235,180,0.55), rgba(255,190,140,0.18) 45%, transparent 70%);
  filter:blur(6px); animation:nfAura 5s ease-in-out infinite;
}
.nestiy-hero-img{ position:relative; width:100%; height:100%; animation:nfFloat 6s ease-in-out infinite; filter:drop-shadow(0 18px 24px rgba(6,30,20,0.25)); }
.nf-spark{ position:absolute; width:16px; height:16px; z-index:2; animation:nfTwinkle 3.2s ease-in-out infinite; }
.nf-spark::before{
  content:""; position:absolute; inset:0; background:#B8FFD6;
  clip-path:polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter:drop-shadow(0 0 6px rgba(255,214,160,0.9));
}
.nf-spark.s1{ left:6%; top:16%; animation-delay:.2s; }
.nf-spark.s2{ right:6%; top:8%; width:11px; height:11px; animation-delay:1.3s; }
.nf-spark.s3{ right:14%; bottom:14%; width:13px; height:13px; animation-delay:2.1s; }
html[data-theme="light"] .nf-spark::before{ background:#F7A64F; filter:drop-shadow(0 0 4px rgba(247,166,79,0.6)); }
@media (min-width: 981px){
  .page-hero .container.has-nestiy > h1, .page-hero .container.has-nestiy > .lede{ max-width:min(640px, calc(100% - 290px)); }
}
@media (max-width: 980px){
  .nestiy-hero{ position:relative; top:auto; right:auto; margin:6px 0 -10px auto; width:150px; height:150px; float:none; }
  .page-hero .container.has-nestiy{ display:flex; flex-direction:column; }
  .page-hero .container.has-nestiy > .nestiy-hero{ order:-1; align-self:flex-end; margin:-6px 0 -40px; }
}
@media (prefers-reduced-motion: reduce){ .nestiy-hero-img, .nf-spark, .nestiy-hero::before{ animation:none !important; } .nf-spark{ opacity:.8; } }

/* ---------- Nestiy beside the home orbit (the official logo stays in the centre) ---------- */
.hm-nestiy{ position:absolute; right:-7%; bottom:-11%; width:180px; height:180px; z-index:3; pointer-events:none; }
.hm-nestiy::before{
  content:""; position:absolute; inset:12%; border-radius:50%;
  background:radial-gradient(circle, rgba(140,235,180,0.5), rgba(255,190,140,0.15) 48%, transparent 70%);
  filter:blur(6px); animation:nfAura 5s ease-in-out infinite;
}
.hm-nestiy img{ position:relative; width:100%; height:100%; animation:nfFloat 6s ease-in-out infinite; filter:drop-shadow(0 16px 22px rgba(4,20,12,0.3)); }
@media (max-width: 980px){ .hm-nestiy{ right:2%; bottom:-2%; width:150px; height:150px; } }
@media (max-width: 560px){ .hm-nestiy{ right:0; bottom:2%; width:118px; height:118px; } }
.hm-bubble{
  position:absolute; right:68%; top:4%; white-space:nowrap; padding:8px 14px; border-radius:16px 16px 4px 16px;
  font:800 0.86rem/1.2 var(--font-head); color:#05281A; background:linear-gradient(135deg, #EFFFF5, #CFF7DE);
  box-shadow:0 10px 24px -10px rgba(10,40,25,0.45); animation:nfFloat 6s ease-in-out infinite reverse;
}
html[data-theme="light"] .hm-bubble{ background:#fff; color:#12382A; box-shadow:0 10px 24px -12px rgba(18,56,42,0.35); }
@media (max-width: 560px){ .hm-bubble{ right:62%; top:-6%; font-size:0.74rem; padding:6px 10px; } }

/* ---------- Nestiy in the footer ---------- */
.nestiy-footer{ display:flex; align-items:center; gap:10px; margin-top:16px; font-size:0.84rem; opacity:.92; }
.nestiy-footer img{ width:58px; height:58px; flex:0 0 auto; animation:nfFloat 7s ease-in-out infinite; }

/* ---------- Nestiy in states (sign-in, loading, empty, error) ---------- */
.nestiy-state{ display:block; margin:0 auto 8px; width:120px; height:120px; animation:nfFloat 6s ease-in-out infinite; }
.nestiy-state.sm{ width:84px; height:84px; }
.sh-progress .nestiy-state + .sh-spinner{ display:none; }
.sh-progress .nestiy-state{ width:140px; height:140px; }
.nestiy-err{ float:left; width:44px; height:44px; margin:-6px 10px -6px -4px; }
.sh-error.show::after{ content:""; display:block; clear:both; }
.sh-empty .nestiy-state{ margin-bottom:4px; }
.sh-empty{ text-align:center; }
