/* Home2 — tree/squirrel concept specific styles */

.tree-hero {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0 0;
  background: linear-gradient(180deg, #C2D5FF 0%, #DCEAFF 80%, #fff 100%);
  overflow: hidden;
}
.tree-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: 640px;
}
.tree-hero__copy { max-width: 580px; padding-bottom: 60px; }
.tree-hero__title {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 6px 0 24px;
  text-wrap: balance;
}
.tree-hero__lead {
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  color: #2b2b2bd9;
  margin: 0 0 28px;
  max-width: 50ch;
  line-height: 1.55;
}
.tree-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.tree-hero__proof {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid #2b2b2b1f;
  max-width: 480px;
}
.tree-hero__proof-num {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.tree-hero__proof-lbl {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
}

/* TREE SCENE */
.tree-scene {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 500/600;
  justify-self: end;
  align-self: end;
}
.tree-scene__bg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Seymour positioned on a branch */
.tree-scene__seymour {
  position: absolute;
  top: 36%;
  left: 32%;
  width: 30%;
  z-index: 3;
  /* --sx/sy: extra translation when pointing; --srot: rotation angle */
  --sx: 0px;
  --sy: 0px;
  --srot: -6deg;
  transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) rotate(var(--srot));
  transform-origin: 50% 50%;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  animation: seymour-bob 4s ease-in-out infinite;
}
.tree-scene:hover .tree-scene__seymour { animation: none; }
.tree-scene__seymour img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 20px #2b2b2b30);
}
@keyframes seymour-bob {
  0%, 100% { transform: translate(-50%, -50%) rotate(-6deg); }
  50%      { transform: translate(-50%, -52%) rotate(-4deg); }
}

/* Speech bubble */
.tree-bubble {
  position: absolute;
  top: 18%;
  left: 52%;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 14px 18px;
  max-width: 220px;
  box-shadow: 0 8px 24px #2b2b2b1f;
  font-size: 13.5px;
  line-height: 1.45;
  z-index: 4;
  animation: bubble-pop 1s ease-out 0.6s both;
}
.tree-bubble::before {
  content: "";
  position: absolute;
  bottom: -10px; left: 24px;
  width: 18px; height: 18px;
  background: var(--paper);
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  transform: rotate(45deg);
}
.tree-bubble strong {
  display: block;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 4px;
}
.tree-bubble span {
  display: block;
  color: var(--ink-2);
}
@keyframes bubble-pop {
  0%   { opacity: 0; transform: scale(.85) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* NUTS = floating data chips on tree branches */
.tree-nut {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 1px 0 #ffffff inset, 0 6px 18px #2b2b2b1f;
  cursor: help;
  z-index: 5;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tree-nut::before {
  content: "";
  position: absolute;
  top: -5px; left: 50%;
  width: 4px; height: 6px;
  background: #2B2B2B;
  border-radius: 2px;
  transform: translateX(-50%);
}
.tree-nut__label { display: block; }
.tree-nut:hover, .tree-nut:focus-visible {
  border-color: var(--ink);
  transform: translateY(-2px);
  outline: none;
  z-index: 10;
}

/* Popover under each nut */
.tree-nut__pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  width: 220px;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  font-family: "Anek Latin", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 12px 32px #2b2b2b40;
  z-index: 20;
}
.tree-nut__pop strong { font-weight: 600; color: var(--lime); }
.tree-nut__pop::before {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--ink);
}
.tree-nut:hover .tree-nut__pop,
.tree-nut:focus-visible .tree-nut__pop {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Individual nut positions on the tree */
.tree-nut--erp  { top: 18%; left: 18%; }
.tree-nut--shop { top: 14%; left: 64%; }
.tree-nut--2ba  { top: 28%; left: 80%; }
.tree-nut--nmd  { top: 38%; left: 8%;  }
.tree-nut--api  { top: 48%; left: 82%; }
.tree-nut--dam  { top: 10%; left: 38%; }

/* Make sure popovers on bottom-right nuts open up-left */
.tree-nut--api .tree-nut__pop,
.tree-nut--2ba .tree-nut__pop {
  left: auto; right: 0;
  transform: translate(0, -4px);
}
.tree-nut--api:hover .tree-nut__pop,
.tree-nut--2ba:hover .tree-nut__pop {
  transform: translate(0, 0);
}
.tree-nut--api .tree-nut__pop::before,
.tree-nut--2ba .tree-nut__pop::before {
  left: auto; right: 18px;
}

@media (max-width: 1100px) {
  .tree-hero__grid { grid-template-columns: 1fr; }
  .tree-scene { max-width: 520px; margin-inline: auto; justify-self: center; }
  .tree-hero__copy { padding-bottom: 32px; }
}
@media (max-width: 640px) {
  .tree-bubble { display: none; }
  .tree-nut__pop { width: 180px; font-size: 12px; }
}
