/* ========================================
   SHARED CSS - Grona Brand Styles
   ======================================== */
/* Include this file in the <head> section of all pages */

/* BRAND TOKENS */
:root {
  --green-900: #0f3e35; /* deep evergreen */
  --green-800: #0b6b53; /* brand primary */
  --green-400: #7fd97a; /* leaf */
  --brand-lime: #bce55d; /* Bright lime used in hero "improving." */
  --brand-lime-rgb: 188, 229, 93; /* #bce55d converted for rgba usage */
  --ink: #0f172a; /* headings */
  --muted: #5b6475; /* body */
  --line: #e8ecef; /* borders */
  --bg: #ffffff; /* page */
  --bg-soft: #f6fbf8; /* sections */
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 107, 83, 0.1);
  --max: 1120px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 92px;
  --ff-display: "Oracle ABC", "Poppins", ui-sans-serif, system-ui,
    -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif;
  --ff-body: "Oracle ABC", "Inter", ui-sans-serif, system-ui,
    -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif;
  --carousel-interval: 10s;
  --carousel-interval-ms: 10000;
  --hero-bg: radial-gradient(
    1000px 600px at 50% 0%,
    #eef6ff 0%,
    #f8fbff 40%,
    #ffffff 100%
  );
  --hero-text: #0f172a;
  --hero-muted: #475569;
  --rotating-green: #064E3D;
  --rotating-shimmer: rgba(6, 78, 61, 0.28);
  --header-height: 80px;
  --navbar-height: 80px;
  --banner-height: 44px;
  --announcement-offset: 0px;
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-float: cubic-bezier(0.55, 0.03, 0.25, 0.99);
}

/* Dark mode variables */
[data-theme="dark"] {
  --green-800: #bbe55b; /* vibrant light green - matches logo exactly */
  --brand-lime: #bce55d; /* Keep hero lime consistent in dark mode */
  --ink: #f8fafc; /* headings - light */
  --muted: #94a3b8; /* body - lighter gray */
  --line: #334155; /* borders - dark gray */
  --bg: #0f172a; /* page - dark blue */
  --bg-soft: #1e293b; /* sections - darker blue */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --hero-bg: radial-gradient(
    1200px 700px at 50% -10%,
    #101826 0%,
    #0b1220 40%,
    #070c17 100%
  );
  --hero-text: #f8fafc;
  --hero-muted: #a6b0bf;
  --rotating-green: #BCE55D;
  --rotating-shimmer: rgba(188, 229, 93, 0.35);
}

/* RESET */
* {
  box-sizing: border-box;
}
html:focus-within {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--ff-body);
  line-height: 1.6;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--green-800);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.link-underline {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.link-underline:hover,
.link-underline:focus-visible {
  border-bottom-color: var(--green-800);
  text-decoration: none;
}

/* LAYOUT */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.section {
  padding: var(--space-8) 0;
}

/* TYPOGRAPHY */
h1,
h2,
h3 {
  font-family: var(--ff-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}
h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.1;
}
h2 {
  font-size: clamp(26px, 3vw, 34px);
}
h3 {
  font-size: clamp(20px, 2.2vw, 22px);
}
p {
  margin: 0 0 var(--space-3);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--green-800);
  color: #fff !important;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
[data-theme="dark"] .navbar {
  background: transparent;
  border-bottom: 1px solid rgba(51, 65, 85, 0.62);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--navbar-height);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  height: 75px;
  width: auto;
}
.spacer {
  flex: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links a {
  color: var(--ink);
  font-weight: 700;
}
.nav-cta-join-beta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  margin-left: 16px;
  border: 1.5px solid transparent;
  background: transparent;
  color: inherit;
  transition: all 0.18s ease-out;
  will-change: transform, box-shadow;
}
.nav-cta-join-beta:active,
.btn-beta:active {
  transform: scale(0.97);
}
/* Brand primary green: Light mode #0b6b53 (--green-800), Dark mode #bbe55b (--green-800) */
/* This matches the rotating text "improving." color in dark mode */
html:not(.dark) .btn-beta,
html[data-theme="light"] .btn-beta {
  background: transparent;
  color: var(--green-800); /* #0b6b53 - brand primary green */
  border: 1.5px solid var(--green-800); /* #0b6b53 - brand primary green */
  border-radius: 8px;
  font-weight: 500;
  box-shadow: none;
  transition: all 0.18s ease-out;
}
html:not(.dark) .btn-beta:hover,
html[data-theme="light"] .btn-beta:hover {
  background: var(--green-800); /* #0b6b53 - brand primary green */
  color: #ffffff;
  border-color: var(--green-800); /* #0b6b53 - brand primary green */
}
html.dark .btn-beta,
html[data-theme="dark"] .btn-beta {
  /* Dark mode uses --green-800 which is #bbe55b - bright lime green matching "improving." */
  background: rgba(187, 229, 91, 0.08);
  border: 1.5px solid rgba(187, 229, 91, 0.55);
  color: var(--green-800); /* #bbe55b - bright lime green */
  border-radius: 8px;
  font-weight: 500;
  animation: betaPulse 3.2s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(187, 229, 91, 0.45);
  transition: all 0.18s ease-out;
}
html.dark .btn-beta:hover,
html[data-theme="dark"] .btn-beta:hover {
  background: rgba(187, 229, 91, 0.2);
  border-color: rgba(187, 229, 91, 0.85);
  color: #ffffff;
}
@keyframes betaPulse {
  0% {
    box-shadow: 0 0 16px rgba(187, 229, 91, 0.45);
  }
  50% {
    box-shadow: 0 0 20px rgba(187, 229, 91, 0.55);
  }
  100% {
    box-shadow: 0 0 16px rgba(187, 229, 91, 0.45);
  }
}
.menu-btn {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  background: var(--bg-soft);
}
[data-theme="dark"] .theme-toggle {
  color: #fff;
}

/* FOOTER */
.final-footer {
  background: #f6f7f7;
  padding: 80px 0 56px;
  color: #334155;
}
[data-theme="dark"] .final-footer {
  background: radial-gradient(140% 140% at 50% 0%, #050c1b 0%, #01030a 85%);
  color: rgba(226, 232, 240, 0.92);
}
.final-footer .footer-shell {
  display: grid;
  gap: var(--space-4);
  font-size: 0.9rem;
  line-height: 1.5;
}
.footer-columns {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.footer-brand {
  padding-right: var(--space-6);
}
.footer-logo img {
  width: auto;
  height: 45px;
  margin-bottom: 1.4rem;
}
.footer-tagline {
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  color: #475569;
  font-weight: 400;
  opacity: 0.9;
}
.footer-heading {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #0f172a;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.footer-link {
  color: #0f172a;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  margin-top: 10px;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--green-400);
  outline: none;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  padding-top: var(--space-3);
  font-size: 0.85rem;
  color: #64748b;
}

[data-theme="dark"] .footer-tagline {
  color: rgba(248, 250, 252, 0.9);
}
[data-theme="dark"] .footer-heading {
  color: rgba(148, 163, 184, 0.9);
}
[data-theme="dark"] .footer-link {
  color: rgba(226, 232, 240, 0.8);
}
[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(148, 163, 184, 0.25);
  color: rgba(148, 163, 184, 0.75);
}

/* Mobile Menu base */
.mobile-menu {
  display: none;
}
.mobile-nav-links {
  display: none;
}
.mobile-menu-panel {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  :root {
    --navbar-height: 64px;
    --header-height: 64px;
    --banner-height: 44px;
  }
  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }
  .footer-brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1001;
  }
  
  /* Mobile Menu Overlay + Drawer */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
  }
  
  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu-panel {
    display: flex;
    flex-direction: column;
    width: min(360px, 84%);
    height: 100%;
    background: var(--bg);
    box-shadow: -12px 0 30px rgba(15, 23, 42, 0.14);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-soft);
    padding: calc(var(--navbar-height) + var(--space-5)) var(--space-5) var(--space-5);
    overflow-y: auto;
    position: relative;
  }

  .mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
  }
  
  /* Show mobile-nav-links when inside mobile-menu */
  .mobile-menu .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 100%;
    text-align: left;
  }
  
  .mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--space-3) 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid rgba(148, 163, 184, 0.5);
    transition: color 0.2s ease;
  }

  .mobile-nav-links a:last-child {
    border-bottom: 0;
  }

  .mobile-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(11, 107, 83, 0.08);
    color: var(--green-800);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mobile-nav-label {
    flex: 1;
  }
  
  .mobile-nav-links a:hover,
  .mobile-nav-links a:focus-visible {
    color: var(--green-800);
  }
  
  /* Menu Button Animation */
  .menu-btn svg {
    transition: opacity 0.3s ease;
  }
  
  .menu-btn.open svg line {
    transition: all 0.3s ease;
  }
  
  .menu-btn.open svg line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
    transform-origin: center;
  }
  
  .menu-btn.open svg line:nth-child(2) {
    opacity: 0;
  }
  
  .menu-btn.open svg line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    transform-origin: center;
  }
}

@media (max-width: 560px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}

[data-theme="dark"] .mobile-menu {
  background: rgba(2, 6, 23, 0.7);
}
[data-theme="dark"] .mobile-menu-panel {
  background: var(--bg);
  box-shadow: -12px 0 30px rgba(2, 6, 23, 0.55);
}
[data-theme="dark"] .mobile-nav-links a {
  border-bottom-color: rgba(51, 65, 85, 0.6);
}
[data-theme="dark"] .mobile-nav-icon {
  background: rgba(188, 229, 93, 0.15);
  color: var(--green-800);
}

/* ========================================
   SHADCN COMPONENTS
   ======================================== */

/* Background Beams Component */
.background-beams {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.background-beams svg {
  height: 100%;
  width: 100%;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.background-beams path {
  stroke-width: 0.5;
  stroke-opacity: 0.4;
  fill: none;
}

.background-beams path.main-path {
  stroke: url(#paint0_radial);
  stroke-opacity: 0.05;
}

.background-beams .animated-path {
  stroke: url(#linearGradient);
  animation: beamMove 10s ease-in-out infinite;
}

@keyframes beamMove {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.6;
  }
}

[data-theme="dark"] .background-beams path {
  stroke-opacity: 0.3;
}

[data-theme="dark"] .background-beams .animated-path {
  stroke-opacity: 0.5;
}

/* 3D Card Component */
.card-3d-container {
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}

.card-3d-wrapper {
  position: relative;
  transition: transform 0.2s ease-linear;
  transform-style: preserve-3d;
}

.card-3d-body {
  transform-style: preserve-3d;
  position: relative;
}

.card-3d-item {
  transition: transform 0.2s ease-linear;
  will-change: transform;
}

.pricing-card.card-3d-enabled {
  position: relative;
  transition: transform 0.2s ease;
}

.pricing-card.card-3d-enabled:hover {
  z-index: 10;
}

.use-case-card.card-3d-enabled {
  position: relative;
  transition: transform 0.2s ease;
}

/* Animated Tooltip Component */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-trigger {
  cursor: pointer;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .tooltip-content {
  background: var(--bg-soft);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tooltip-content::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}

[data-theme="dark"] .tooltip-content::before {
  border-top-color: var(--bg-soft);
}

.tooltip-container:hover .tooltip-content,
.tooltip-container[aria-expanded="true"] .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.tooltip-content.tooltip-top {
  bottom: 100%;
  top: auto;
  margin-bottom: 8px;
  margin-top: 0;
}

.tooltip-content.tooltip-bottom {
  top: 100%;
  bottom: auto;
  margin-top: 8px;
  margin-bottom: 0;
}

.tooltip-content.tooltip-bottom::before {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--ink);
}

[data-theme="dark"] .tooltip-content.tooltip-bottom::before {
  border-bottom-color: var(--bg-soft);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  width: 20%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--green-400), transparent);
}

[data-theme="dark"] .tooltip-content::after {
  background: linear-gradient(to right, transparent, var(--green-800), transparent);
}

/* Button Enhancements */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: visible;
}

.icon-button:hover {
  background: rgba(11, 107, 83, 0.1);
  transform: scale(1.05);
}

.icon-button:active {
  transform: scale(0.95);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .icon-button:hover {
  background: rgba(187, 229, 91, 0.1);
}

.corner-accent-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  overflow: hidden;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: var(--green-800);
  color: white;
  border: none;
  cursor: pointer;
}

.corner-accent-button:hover {
  background: var(--green-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 107, 83, 0.3);
}

[data-theme="dark"] .corner-accent-button {
  background: var(--green-800);
  color: var(--ink);
}

[data-theme="dark"] .corner-accent-button:hover {
  background: var(--green-400);
  color: var(--ink);
}

.corner-accent-button::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: var(--green-900);
  border-radius: 0 8px 0 16px;
  transition: all 0.5s ease;
  z-index: 1;
}

.corner-accent-button:hover::before {
  transform: translate(4px, -4px);
}

[data-theme="dark"] .corner-accent-button::before {
  background: var(--green-400);
}

.corner-accent-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 16px;
  height: 16px;
  background: var(--green-900);
  border-radius: 16px 0 8px 0;
  transition: all 0.5s ease;
  z-index: 1;
}

.corner-accent-button:hover::after {
  transform: translate(-4px, 4px);
}

[data-theme="dark"] .corner-accent-button::after {
  background: var(--green-400);
}

.corner-accent-button span,
.corner-accent-button {
  position: relative;
  z-index: 2;
}

.magnetic-button {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-button:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Sparkles Component */
.sparkles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--green-400);
  border-radius: 50%;
  opacity: 0;
  animation: sparkleAnimation 2s ease-in-out infinite;
}

[data-theme="dark"] .sparkle {
  background: var(--green-800);
}

@keyframes sparkleAnimation {
  0%, 100% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1) translateY(-20px);
  }
}

.btn-sparkles {
  position: relative;
  overflow: visible;
}

.btn-sparkles::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    var(--green-400), 
    var(--green-800), 
    var(--green-400), 
    var(--green-800));
  background-size: 400% 400%;
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  animation: sparkleBorder 3s ease infinite;
  transition: opacity 0.3s ease;
}

.btn-sparkles:hover::before {
  opacity: 0.6;
}

@keyframes sparkleBorder {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.form-embed-crop {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  height: 700px;
}

.form-embed-crop iframe {
  display: block;
  transform: translateY(-85px);
  height: 850px;
}
