@custom-variant dark (&:is(.dark *));

:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #10416A;
  --primary-foreground: #ffffff;
  --secondary: #238DC1;
  --secondary-foreground: #ffffff;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #89A2D9;
  --accent-foreground: #10416A;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: #10416A;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
  
  /* CloudLogics Brand Colors */
  --cl-dark-blue: #10416A;
  --cl-blue: #238DC1;
  --cl-turquoise: #89A2D9;
  --cl-sky-blue: #CAF4FF;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-input-background: var(--input-background);
  --color-switch-background: var(--switch-background);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
    font-family: 'Open Sans', 'Roboto', sans-serif;
  }

  /**
  * Default typography styles for HTML elements (h1-h4, p, label, button, input).
  * These are in @layer base, so Tailwind utility classes (like text-sm, text-lg) automatically override them.
  */

  html {
    font-size: var(--font-size);
  }

  h1, h2, h3, h4 {
    font-family: 'Barlow', 'Roboto', sans-serif;
  }

  h1 {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1.2;
  }

  h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.3;
  }

  h3 {
    font-size: var(--text-lg);
    font-weight: 500;
    line-height: 1.4;
  }

  h4 {
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.5;
  }

  p {
    font-family: 'Open Sans', 'Roboto', sans-serif;
  }

  label {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  button {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
  }

  input {
    font-size: var(--text-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
  }
}

@keyframes liquidFloat1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(100px, -50px) scale(1.2);
  }
  66% {
    transform: translate(-50px, 80px) scale(1.1);
  }
}

@keyframes liquidFloat2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-80px, 60px) scale(1.15);
  }
  66% {
    transform: translate(90px, -70px) scale(1.25);
  }
}

@keyframes liquidFloat3 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(70px, -40px) scale(1.2);
  }
  66% {
    transform: translate(-60px, 90px) scale(1.1);
  }
}

.liquid-blob-1 {
  animation: liquidFloat1 8s ease-in-out infinite;
}

.liquid-blob-2 {
  animation: liquidFloat2 10s ease-in-out infinite;
}

.liquid-blob-3 {
  animation: liquidFloat3 12s ease-in-out infinite;
}
/* =========================
   Liquid Hero Tech (no loops, no bubbles)
   ========================= */

/* Waves */
.cl-liquid-waves { opacity: 0.20; overflow: hidden; }
.cl-liquid-waves::before{
  content:"";
  position:absolute;
  inset:-50% 0;
  background: linear-gradient(to bottom, transparent, rgba(35,141,193,0.30), transparent);
  animation: clWavesMove 12s ease-in-out infinite;
}
@keyframes clWavesMove{
  0%,100% { transform: translateY(0%); }
  50%     { transform: translateY(-25%); }
}

/* Distortion glaze */
.cl-distortion{
  animation: clDistort 8s ease-in-out infinite;
  background: linear-gradient(to bottom right, rgba(137,210,217,0.18), transparent, rgba(35,141,193,0.18));
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
@keyframes clDistort{
  0%,100% { transform: scale(1); opacity: 0.10; }
  50%     { transform: scale(1.02); opacity: 0.15; }
}

/* Rings */
.cl-ring-a{ animation: clRingSpinA 20s linear infinite; }
.cl-ring-b{ animation: clRingSpinB 20s linear infinite; }
@keyframes clRingSpinA{0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }
@keyframes clRingSpinB{0%{transform:rotate(360deg)} 100%{transform:rotate(0deg)} }

/* =========================
   Grid tiles: COLUMN-BASED pulse (12x12)
   ========================= */

/* Optional: ensure the grid container doesn't affect layout */
#grid-container{
  pointer-events: none;
}

/* Your tiles already have border/bg inline; this animates them */
#grid-container .cl-tile{
  transform-origin: center;
  will-change: opacity, filter, transform;

  animation: clColumnPulse var(--cl-dur, 5.6s) ease-in-out infinite;
  animation-delay: var(--cl-col-delay, 0s);

  filter: brightness(1);
}

@keyframes clColumnPulse{
  0%{
    opacity: 0.06;
    transform: scale(0.975);
    filter: brightness(0.98);
  }
  18%{
    opacity: 0.20;
    transform: scale(0.985);
    filter: brightness(1.02);
  }
  42%{
    opacity: 0.34;
    transform: scale(1.000);
    filter: brightness(1.10);
  }
  58%{
    opacity: 0.26;
    transform: scale(0.992);
    filter: brightness(1.05);
  }
  78%{
    opacity: 0.10;
    transform: scale(0.982);
    filter: brightness(1.00);
  }
  100%{
    opacity: 0.06;
    transform: scale(0.975);
    filter: brightness(0.98);
  }
}