@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import "tailwindcss";

/* --- Theme (Tailwind v4 semantic tokens) --- */
@theme {
  --color-border: hsl(var(--border));
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));
  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));
  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --animate-checkbox-pop: checkbox-pop 200ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes checkbox-pop {
  from { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  to { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) skewX(-12deg); }
  100% { transform: translateX(250%) skewX(-12deg); }
}

@keyframes float-blob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.04); }
}

/* --- Base layer: variables and global elements --- */
@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 220 15% 5%;
    --card: 0 0% 100%;
    --card-foreground: 220 15% 5%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 15% 5%;
    --primary: 140 38% 40%;
    --primary-foreground: 0 0% 100%;
    --secondary: 220 10% 96%;
    --secondary-foreground: 220 15% 5%;
    --muted: 220 10% 96%;
    --muted-foreground: 220 10% 40%;
    --accent: 140 38% 40%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 220 10% 90%;
    --input: 220 10% 90%;
    --ring: 140 38% 40%;
    --radius: 0.75rem;
  }

  .dark {
    --background: 220 15% 5%;
    --foreground: 0 0% 100%;
    --card: 220 12% 8%;
    --card-foreground: 0 0% 100%;
    --popover: 220 12% 8%;
    --popover-foreground: 0 0% 100%;
    --primary: 140 38% 40%;
    --primary-foreground: 0 0% 100%;
    --secondary: 220 10% 12%;
    --secondary-foreground: 0 0% 100%;
    --muted: 220 10% 15%;
    --muted-foreground: 220 10% 60%;
    --accent: 140 38% 40%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 220 10% 18%;
    --input: 220 10% 18%;
    --ring: 140 38% 40%;
  }

  * {
    border-color: hsl(var(--border));
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
  }

  .bg-navy {
    background-color: hsl(var(--background));
  }

  .dark .bg-navy {
    background-color: #0c0d10;
  }

  /* Headings: font and weight only; color is set below (unlayered) for visibility */
  h1, h2, h3, h4, h5, h6 {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  a {
    color: #428b4d;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  a:hover {
    color: #357a3d;
  }

  button {
    font-family: inherit;
    cursor: pointer;
  }

  input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: #000;
  }

  input:focus, textarea:focus {
    outline: none;
  }

  *:focus-visible {
    outline: 2px solid #428b4d;
    outline-offset: 2px;
  }

  .font-mono {
    font-family: "JetBrains Mono", monospace;
  }

  section {
    position: relative;
    width: 100%;
  }

  /* Landing: consistent section container and headers */
  .landing-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .landing-section-eyebrow {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: #428b4d;
  }
  .landing-section-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.875rem, 4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: #0a0a0a;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

/* --- Input/textarea typed text: always black --- */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select {
  color: #000 !important;
}

/* --- Layout: grid-stack --- */
/* Widgets section: align header/instruction with grid using same horizontal padding */
.widgets-section-header {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Wrapper: uniform padding so grid has equal space on all sides */
.grid-widget-grid-wrapper {
  padding: 1rem;
  margin-top: 0;
}

/* Grid: no negative margin so outer spacing stays uniform */
.grid-widget-grid-wrapper .grid-stack-responsive {
  margin: 0 !important;
}

/* Same gap between widgets on all sides */
.grid-stack-responsive > .grid-stack-item {
  padding: 0.5rem !important;
}

.grid-stack-responsive .grid-stack-item-content {
  height: 100%;
}

/* Resize handle: invisible but still draggable (bottom-right) */
.grid-stack-responsive .grid-stack-item > .ui-resizable-se {
  bottom: 0 !important;
  right: 0 !important;
  width: 24px !important;
  height: 24px !important;
  background: none !important;
  border: none !important;
  border-radius: 0;
  cursor: se-resize;
  opacity: 0;
}
.grid-stack-responsive .grid-stack-item > .ui-resizable-se:hover {
  opacity: 0;
}

@media (max-width: 1023px) {
  .widgets-section-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .grid-widget-grid-wrapper {
    padding: 0.75rem;
  }
  .grid-widget-grid-wrapper .grid-stack-responsive {
    margin: 0 !important;
  }
  .grid-stack-responsive > .grid-stack-item {
    padding: 0.5rem !important;
  }
}

@media (max-width: 639px) {
  .widgets-section-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .grid-widget-grid-wrapper {
    padding: 0.5rem;
  }
  .grid-widget-grid-wrapper .grid-stack-responsive {
    margin: 0 !important;
  }
  .grid-stack-responsive > .grid-stack-item {
    padding: 0.5rem !important;
  }
}

/* --- Scrollbar (default light theme) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Force light scrollbar on specific containers (avoids black scrollbar in some contexts) */
.scrollbar-light {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.scrollbar-light::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-light::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.scrollbar-light::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.scrollbar-light::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
  background: #0c0d10;
}

.dark ::-webkit-scrollbar-thumb {
  background: #1c1d24;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #2a2b36;
}

.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  * {
    -webkit-overflow-scrolling: touch;
  }
  .scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  .scrollbar-thin::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
  }
  .scrollbar-thin::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
  }
  .scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
  }
}

/* --- Selection --- */
::selection {
  background-color: #428b4d;
  color: white;
}

::-moz-selection {
  background-color: #428b4d;
  color: white;
}

.dark ::selection {
  background: rgba(66, 139, 77, 0.3);
  color: #ffffff;
}

.dark ::-moz-selection {
  background: rgba(66, 139, 77, 0.3);
  color: #ffffff;
}

/* --- Keyframes --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-8px); }
  to { transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-slow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(66, 139, 77, 0.2); }
  50% { box-shadow: 0 0 40px rgba(66, 139, 77, 0.4); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer-glass {
  0% { 
    background-position: -200% 0;
    transform: translateX(-100%) skewX(-12deg);
  }
  100% { 
    background-position: 200% 0;
    transform: translateX(250%) skewX(-12deg);
  }
}

@keyframes float-blob-slow {
  0%, 100% { 
    transform: translateY(0) scale(1) rotate(0deg); 
  }
  33% { 
    transform: translateY(-12px) scale(1.02) rotate(120deg); 
  }
  66% { 
    transform: translateY(-8px) scale(1.01) rotate(240deg); 
  }
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(66, 139, 77, 0.1), 0 0 40px rgba(66, 139, 77, 0.05);
  }
  50% { 
    box-shadow: 0 0 30px rgba(66, 139, 77, 0.2), 0 0 60px rgba(66, 139, 77, 0.1);
  }
}

/* --- Utilities --- */
.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-fadeIn {
  animation: fadeIn 0.25s ease-out;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

.animate-glow {
  animation: glow 3s ease-in-out infinite;
}

.animate-shimmer-glass {
  animation: shimmer-glass 3s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  background-size: 200% 100%;
}

.animate-float-blob-slow {
  animation: float-blob-slow 8s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 4s ease-in-out infinite;
}

.touch-manipulation {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.text-balance {
  text-wrap: balance;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.pin-spacer {
  background-color: transparent !important;
}

.decorative {
  user-select: none;
  pointer-events: none;
}

@media (hover: none) {
  .hover\:shadow-glow:hover {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: white;
  }
  .no-print {
    display: none !important;
  }
}

/* --- Brand / app utilities --- */
.text-orange { color: #428b4d; }
.text-orange-light { color: #5ba366; }
.bg-orange { background-color: #428b4d; }
.bg-orange-dark { background-color: #3a7a42; }
.border-orange { border-color: #428b4d; }
.hover\:bg-orange-dark:hover { background-color: #3a7a42; }
.hover\:border-orange\/30:hover { border-color: rgba(66, 139, 77, 0.3); }
.shadow-glow { box-shadow: 0 0 40px rgba(66, 139, 77, 0.25); }

.text-gradient-orange {
  background: linear-gradient(135deg, #428b4d 0%, #5ba366 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ascii-grid {
  background-image:
    linear-gradient(rgba(66, 139, 77, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 139, 77, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.dark .ascii-grid {
  background-image:
    linear-gradient(rgba(66, 139, 77, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 139, 77, 0.03) 1px, transparent 1px);
}

.code-block {
  background: #0d0e12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(66, 139, 77, 0.3), transparent);
}

.tab-active {
  background: rgba(66, 139, 77, 0.15);
  border-color: rgba(66, 139, 77, 0.5);
  color: #428b4d;
}

.metric-card {
  background: linear-gradient(135deg, rgba(66, 139, 77, 0.05) 0%, transparent 100%);
  border: 1px solid rgba(66, 139, 77, 0.15);
}

.syntax-keyword { color: #c678dd; }
.syntax-string { color: #98c379; }
.syntax-function { color: #61afef; }
.syntax-comment { color: #5c6370; }
.syntax-number { color: #d19a66; }

/* --- Oxyfinz logo in header: always visible in light and dark --- */
/* Oxyfinz logo: same black as headings everywhere */
.oxyfinz-logo,
.oxyfinz-logo span {
  color: #000;
  transition: color 0.2s ease;
}
.oxyfinz-logo:hover,
.oxyfinz-logo:hover span {
  color: #428b4d;
}

/* --- FAQ: same black as headings (questions, intro, answers) --- */
.faq-question,
.faq-intro,
.faq-answer {
  color: #000;
}

/* --- Legal page: same black as headings everywhere --- */
.legal-sidebar-label {
  color: #000;
}

.legal-sidebar-link {
  color: #000;
}
.legal-sidebar-link:hover {
  color: #000;
}

.legal-sidebar-link-active {
  color: #428b4d;
}
.dark .legal-sidebar-link-active,
html.dark .legal-sidebar-link-active {
  color: #5ba366;
}

.legal-back-link {
  color: #428b4d;
}
.dark .legal-back-link,
html.dark .legal-back-link {
  color: #5ba366;
}

.legal-page-title {
  color: #000;
}

.legal-page-date {
  color: #000;
}

.legal-prose h1,
.legal-prose h2,
.legal-prose h3,
.legal-prose h4,
.legal-prose h5,
.legal-prose h6 {
  color: #000;
}
.legal-prose p,
.legal-prose li {
  color: #000;
}
.legal-prose strong {
  color: #000;
}
.legal-prose a {
  color: #428b4d;
}
.dark .legal-prose a,
html.dark .legal-prose a {
  color: #5ba366;
}

/* --- Header nav links (Product, Resource, About Us, Contact): same black as headings --- */
.header-nav-link {
  color: #000;
}

.header-login-btn {
  color: #000;
}

/* --- Contact section: Email us / Call us labels and values --- */
.contact-info-label,
.contact-info-value {
  color: #000;
}

/* --- Footer links: same black as headings (Legal footer + Contact section) --- */
.footer-category {
  color: #000;
}
.footer-link {
  color: #000;
}
.footer-copyright {
  color: #000;
}

/* --- Headings: black everywhere (dashboard and app-wide) --- */
h1, h2, h3, h4, h5, h6 {
  color: #000;
}
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #000;
}

/* Pricing section: dark background — force light text and primary accents */
#pricing {
  background-color: #0c0d10 !important;
}
#pricing h1, #pricing h2, #pricing h3, #pricing h4, #pricing h5, #pricing h6 {
  color: #fff;
}
#pricing .text-white {
  color: #fff !important;
}
#pricing .text-primary {
  color: #428b4d !important;
}
#pricing .bg-primary {
  background-color: #428b4d !important;
}
#pricing .border-primary\/50 {
  border-color: rgba(66, 139, 77, 0.5) !important;
}
#pricing .hover\:bg-primary\/10:hover {
  background-color: rgba(66, 139, 77, 0.1) !important;
}

/* Security section: same dark background and primary accents as Pricing */
#data-security-compliance {
  background-color: #0c0d10 !important;
}
#data-security-compliance .text-primary {
  color: #428b4d !important;
}
#data-security-compliance .text-white {
  color: #fff !important;
}
#data-security-compliance h1,
#data-security-compliance h2,
#data-security-compliance h3,
#data-security-compliance h4,
#data-security-compliance h5,
#data-security-compliance h6 {
  color: #fff !important;
}
#data-security-compliance .bg-surface {
  background-color: #111216 !important;
}
#data-security-compliance .bg-primary\/10 {
  background-color: rgba(66, 139, 77, 0.1) !important;
}

/* --- Tailwind layer utilities (theme-aware) --- */
@layer utilities {
  .border-border {
    border-color: hsl(var(--border));
  }
  .bg-background {
    background-color: hsl(var(--background));
  }
  .text-foreground {
    color: hsl(var(--foreground));
  }

  .text-gradient {
    @apply bg-clip-text text-transparent;
    background-image: linear-gradient(135deg, #ffffff 0%, #428b4d 100%);
  }

  .text-gradient-orange {
    @apply bg-clip-text text-transparent;
    background-image: linear-gradient(135deg, #428b4d 0%, #5ba366 100%);
  }

  .text-white {
    color: rgb(17 24 39);
  }
  .dark .text-white {
    color: rgb(255 255 255);
  }

  .text-text-secondary {
    color: rgb(75 85 99);
  }
  .dark .text-text-secondary {
    color: rgb(156 163 175);
  }

  .text-text-muted {
    color: rgb(107 114 128);
  }
  .dark .text-text-muted {
    color: rgb(107 114 128);
  }

  .bg-surface { background-color: #f8f9fa; }
  .dark .bg-surface { background-color: #111216; }

  .bg-surface-elevated { background-color: #ffffff; }
  .dark .bg-surface-elevated { background-color: #16171c; }

  .bg-surface-highlight { background-color: #f0f1f3; }
  .dark .bg-surface-highlight { background-color: #1c1d24; }

  .border-subtle { border-color: rgb(229 231 235); }
  .dark .border-subtle { border-color: rgba(255, 255, 255, 0.08); }

  .glow-orange {
    box-shadow: 0 0 40px rgba(66, 139, 77, 0.25);
  }

  .terminal-bg {
    background: linear-gradient(180deg, #0f1014 0%, #0c0d10 100%);
  }

  .glow-text {
    text-shadow: 0 0 40px rgba(66, 139, 77, 0.5);
  }
}

