/* ==========================================================================
   papers.support — Chartreuse Aurora theme
   Inspired by the electric, alive feel of lastappstanding.com, translated
   into a chartreuse academic palette rather than pink.
   Loaded after glassomorphic.css and studio.css so it can retheme both.
   ========================================================================== */

:root {
  /* Chartreuse core */
  --ch-chartreuse: #d7ff4a;
  --ch-chartreuse-bright: #e4ff73;
  --ch-chartreuse-deep: #6f8f1f;
  --ch-chartreuse-ink: #26320d;
  --ch-lime-soft: #f2fbcd;
  --ch-lime-mist: #fbffe9;
  --ch-lime-glow: rgba(196, 242, 54, 0.34);
  --ch-olive-glow: rgba(112, 145, 32, 0.20);

  /* Base surfaces — pale chartreuse paper */
  --bg-primary: #fbffe9;
  --bg-secondary: #f5fbdd;
  --bg-tertiary: #ebf5c9;
  --bg-subtle: #f8fddf;

  --border-light: #eef6d4;
  --border-color: #dce9b9;
  --border-medium: #c6d99d;
  --border-dark: #4b5d27;

  --text-primary: #1b240d;
  --text-secondary: #43502a;
  --text-muted: #6b7850;
  --text-tertiary: #8c9871;

  /* Actions — electric chartreuse with ink text */
  --btn-primary-bg: var(--ch-chartreuse);
  --btn-primary-text: #172006;
  --btn-primary-hover: #c5ef38;
  --btn-secondary-bg: rgba(255, 255, 255, 0.58);
  --btn-secondary-text: var(--text-primary);
  --btn-secondary-border: var(--border-medium);
  --btn-secondary-hover: rgba(255, 255, 255, 0.88);

  --accent-success: #557d19;
  --accent-success-bg: #f2fbcd;
  --accent-success-border: #d4e99c;

  --accent-error: #b44747;
  --accent-error-bg: #fbf1f1;
  --accent-error-border: #edd0d0;

  --shadow-xs: 0 1px 2px rgba(44, 59, 16, 0.05);
  --shadow-sm: 0 1px 3px rgba(44, 59, 16, 0.07), 0 1px 2px rgba(44, 59, 16, 0.04);
  --shadow-md: 0 10px 30px -14px rgba(74, 97, 23, 0.25), 0 3px 9px -4px rgba(74, 97, 23, 0.12);
  --shadow-glow: 0 0 0 1px rgba(173, 216, 50, 0.24), 0 18px 60px -26px rgba(126, 170, 24, 0.48);

  /* Studio tokens */
  --st-accent: #65851a;
  --st-accent-hover: #526e12;
  --st-accent-soft: #f2fbcd;
  --st-accent-softer: #f9feea;
  --st-accent-border: #d9eaa8;
  --st-success: #557d19;
  --st-success-soft: #f2fbcd;
  --st-success-border: #d9eaa8;
  --st-warning: #8a6a18;
  --st-warning-soft: #fff9e6;
  --st-warning-border: #eadba9;
  --st-surface: #fffef8;
  --st-surface-muted: #fbffe9;
  --st-surface-sunken: #f1f8dc;
  --st-overlay: rgba(27, 36, 13, 0.46);
  --accent-studio: #65851a;
  --accent-studio-hover: #526e12;
  --accent-studio-soft: #f2fbcd;
  --accent-studio-border: #d9eaa8;
}

/* --------------------------------------------------------------------------
   Atmosphere
   -------------------------------------------------------------------------- */
html {
  background-color: var(--ch-lime-mist);
}

body {
  background:
    radial-gradient(58rem 42rem at 4% -12%, rgba(218, 255, 86, 0.42), transparent 62%),
    radial-gradient(48rem 38rem at 102% 8%, rgba(167, 217, 56, 0.24), transparent 62%),
    radial-gradient(50rem 36rem at 48% 108%, rgba(240, 255, 185, 0.65), transparent 64%),
    linear-gradient(155deg, #fffef5 0%, #f8ffe2 42%, #eef8d2 100%) !important;
  background-attachment: fixed !important;
  color: var(--text-primary);
  isolation: isolate;
}

body::before {
  display: block !important;
  content: "";
  position: fixed;
  inset: -18vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 28% 34%, rgba(214, 255, 74, 0.38), transparent 68%),
    radial-gradient(closest-side at 74% 62%, rgba(170, 225, 48, 0.23), transparent 70%),
    radial-gradient(closest-side at 52% 92%, rgba(238, 255, 170, 0.50), transparent 72%);
  filter: blur(22px) saturate(1.1);
  animation: ch-aurora-drift 22s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(112, 137, 45, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 137, 45, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 18%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 18%, black 0%, transparent 78%);
}

@keyframes ch-aurora-drift {
  0% { transform: translate3d(-1.5%, -1%, 0) rotate(-2deg) scale(1); }
  50% { transform: translate3d(1.5%, 2%, 0) rotate(2deg) scale(1.05); }
  100% { transform: translate3d(2.5%, -2%, 0) rotate(4deg) scale(1.02); }
}

@keyframes ch-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes ch-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes ch-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(199, 245, 58, 0.16), 0 0 14px rgba(137, 181, 31, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(199, 245, 58, 0.08), 0 0 22px rgba(137, 181, 31, 0.72); }
}

/* --------------------------------------------------------------------------
   Navigation and actions
   -------------------------------------------------------------------------- */
.navbar {
  background: rgba(251, 255, 233, 0.72) !important;
  border-bottom: 1px solid rgba(176, 199, 111, 0.42) !important;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 8px 30px -24px rgba(56, 72, 20, 0.5);
}

.navbar-brand {
  color: var(--text-primary) !important;
}

.navbar-brand .brand-dot {
  color: var(--ch-chartreuse-deep) !important;
}

.navbar-link {
  color: var(--text-secondary) !important;
}

.navbar-link:hover {
  color: var(--text-primary) !important;
  background: rgba(215, 255, 74, 0.38) !important;
}

.navbar-link.active {
  color: var(--ch-chartreuse-ink) !important;
  background: rgba(215, 255, 74, 0.52) !important;
  box-shadow: inset 0 0 0 1px rgba(129, 164, 33, 0.22);
}

.btn-navbar-primary,
.btn-primary,
.btn-primary-glass,
.quick-start-btn {
  background: linear-gradient(135deg, var(--ch-chartreuse-bright), var(--ch-chartreuse)) !important;
  color: var(--ch-chartreuse-ink) !important;
  border: 1px solid rgba(107, 139, 25, 0.28) !important;
  box-shadow: 0 8px 24px -12px rgba(115, 150, 26, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}

.btn-navbar-primary:hover,
.btn-primary:hover,
.btn-primary-glass:hover,
.quick-start-btn:hover {
  background: linear-gradient(135deg, #edff9b, #c9f23c) !important;
  color: var(--ch-chartreuse-ink) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -12px rgba(111, 143, 31, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  filter: saturate(1.06);
}

.btn-outline-glass,
.btn-secondary,
.btn-navbar-login {
  background: rgba(255, 255, 255, 0.48) !important;
  border-color: rgba(143, 171, 74, 0.42) !important;
  color: var(--text-primary) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-outline-glass:hover,
.btn-secondary:hover,
.btn-navbar-login:hover {
  background: rgba(215, 255, 74, 0.34) !important;
  border-color: var(--ch-chartreuse-deep) !important;
}

/* --------------------------------------------------------------------------
   Hero / landing
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  isolation: isolate;
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.hero-section::before {
  width: min(42rem, 82vw);
  aspect-ratio: 1;
  top: -18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(216, 255, 67, 0.35) 0%, rgba(237, 255, 164, 0.16) 42%, transparent 70%);
  animation: ch-float 9s ease-in-out infinite;
}

.hero-section::after {
  width: min(32rem, 72vw);
  aspect-ratio: 1;
  right: -8%;
  bottom: -34%;
  border: 1px solid rgba(129, 164, 33, 0.23);
  box-shadow: 0 0 90px rgba(184, 232, 41, 0.16), inset 0 0 60px rgba(215, 255, 74, 0.10);
  animation: ch-float 13s ease-in-out -3s infinite reverse;
}

.hero-title {
  color: transparent !important;
  background: linear-gradient(112deg, #1c270d 0%, #3c5514 42%, #86ae1e 72%, #b8dd3a 100%) !important;
  background-size: 180% 180% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 5px 24px rgba(201, 244, 62, 0.16));
  animation: ch-gradient-shift 11s ease-in-out infinite;
}

.hero-subtitle {
  color: var(--text-secondary) !important;
}

.free-tier-badge {
  border: 1px solid rgba(129, 164, 33, 0.32) !important;
  background: rgba(255, 255, 255, 0.52) !important;
  color: var(--st-accent, #557d19) !important;
  box-shadow: 0 10px 30px -22px rgba(91, 123, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.quick-start-card {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(137, 170, 62, 0.38) !important;
  box-shadow: 0 22px 60px -34px rgba(56, 72, 20, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
}

.quick-start-card:focus-within {
  border-color: rgba(111, 143, 31, 0.75) !important;
  box-shadow: 0 0 0 4px rgba(198, 241, 58, 0.18), 0 22px 60px -34px rgba(56, 72, 20, 0.5) !important;
}

.quick-start-input,
.quick-start-select {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(151, 179, 88, 0.38) !important;
  color: var(--text-primary) !important;
}

/* --------------------------------------------------------------------------
   Cards, pricing and editor — glass with chartreuse aura
   -------------------------------------------------------------------------- */
.document-card,
.pricing-card,
.lp-editor,
.spotlight-product,
.result-card,
.check-card {
  background: rgba(255, 255, 255, 0.58) !important;
  border-color: rgba(139, 169, 71, 0.34) !important;
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  box-shadow: 0 20px 55px -34px rgba(53, 69, 18, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.document-card:hover,
.pricing-card:hover,
.lp-editor:hover {
  border-color: rgba(116, 150, 34, 0.64) !important;
  box-shadow: 0 26px 70px -32px rgba(96, 128, 22, 0.48), 0 0 0 1px rgba(198, 241, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.document-card.premium,
.pricing-card.popular {
  border-color: rgba(111, 143, 31, 0.72) !important;
  box-shadow: 0 24px 65px -32px rgba(111, 143, 31, 0.52), 0 0 0 1px rgba(198, 241, 58, 0.16) !important;
}

.pricing-card.popular::before,
.document-card.premium::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(215, 255, 74, 0.9), rgba(116, 150, 34, 0.16), rgba(215, 255, 74, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.tag-pill,
.studio-pack .tag-pill,
.badge {
  background: rgba(215, 255, 74, 0.38) !important;
  border-color: rgba(129, 164, 33, 0.28) !important;
  color: #40530f !important;
}

.pricing-card .price .amount {
  color: var(--text-primary) !important;
}

.credit-pill,
.credit-chip {
  background: rgba(255, 255, 255, 0.5) !important;
  border-color: rgba(143, 171, 74, 0.35) !important;
}

.credit-glyph {
  color: var(--ch-chartreuse-deep) !important;
}

.lp-editor-frame,
.lp-editor-bar,
.lp-editor-side,
.lp-editor-ai {
  background: rgba(255, 255, 255, 0.48) !important;
  border-color: rgba(143, 171, 74, 0.30) !important;
}

.lp-editor-textarea {
  background: rgba(255, 255, 255, 0.64) !important;
  color: var(--text-primary) !important;
}

.lp-editor-chip {
  background: rgba(215, 255, 74, 0.42) !important;
  border-color: rgba(129, 164, 33, 0.26) !important;
  color: #40530f !important;
}

/* --------------------------------------------------------------------------
   Studio-specific overlays (tokens handle most of the UI)
   -------------------------------------------------------------------------- */
.studio-subnav,
.st-editor,
.st-shell {
  background: transparent !important;
}

.st-editor-bar,
.st-pane,
.st-panel,
.st-modal,
.st-ai-modal,
.st-drawer,
.st-library-card {
  border-color: rgba(143, 171, 74, 0.28) !important;
}

.st-action-card:hover,
.st-check-card:hover {
  box-shadow: 0 0 0 1px rgba(190, 232, 54, 0.35), 0 8px 24px -16px rgba(98, 128, 20, 0.45) !important;
}

.st-fix-all-btn {
  background: linear-gradient(135deg, rgba(239, 255, 170, 0.92), rgba(215, 255, 74, 0.78)) !important;
  border-color: rgba(111, 143, 31, 0.48) !important;
}

.st-fix-all-btn:hover {
  box-shadow: 0 3px 18px rgba(135, 174, 31, 0.34) !important;
}

.st-brand-mark {
  background: linear-gradient(140deg, #eaff8e 0%, #d0f744 55%, #9fc32a 100%) !important;
  color: #1b240d !important;
  box-shadow: 0 2px 10px rgba(126, 164, 28, 0.32) !important;
}

/* Keep semantic error/warning colours legible against the new paper tone. */
.st-issue-bad,
.st-issue-high,
.st-ai-error {
  background-color: rgba(255, 244, 244, 0.84) !important;
}

.st-issue-mid,
.st-issue-medium {
  background-color: rgba(255, 251, 232, 0.9) !important;
}

/* --------------------------------------------------------------------------
   Accessibility / reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .hero-section::before,
  .hero-section::after,
  .hero-title {
    animation: none !important;
  }
  .btn-navbar-primary:hover,
  .btn-primary:hover,
  .btn-primary-glass:hover,
  .quick-start-btn:hover {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  body::after {
    opacity: 0.35;
    background-size: 30px 30px;
  }
  .hero-section::before {
    width: 90vw;
  }
}
