/**
 * Surfaces Tokens Override
 * 
 * Overrides Surfaces color tokens to match Intelygence brand colors.
 * This file should be loaded after tokens.css.
 */

:root {
  /* === Recolor primitives === */
  /* Primary: Intelygence blue accent (#4A90E2 to #6BA3F0) */
  --ui-primary-top:    217 72% 59%;  /* #4A90E2 */
  --ui-primary-bottom: 217 82% 68%;  /* #6BA3F0 */
  --ui-primary-text:    0 0% 100%;    /* White text on primary */

  /* Secondary: Slightly lighter blue for secondary elements */
  --ui-secondary-top:    217 75% 65%;  /* Lighter blue */
  --ui-secondary-bottom: 217 70% 55%;  /* Slightly darker */
  --ui-secondary-text:   0 0% 100%;    /* White text on secondary */

  /* Contrast: Neutral grays for contrast elements */
  --ui-contrast-top:    0 0% 85%;     /* Light gray */
  --ui-contrast-bottom: 0 0% 62%;    /* Medium gray */
  --ui-contrast-text:   0 0% 10%;    /* Dark text */
}

@media (prefers-color-scheme: light) {
  :root {
    /* Light mode: Darker blues for better contrast */
    --ui-primary-top:    217 85% 45%;  /* Darker blue #2563EB */
    --ui-primary-bottom: 217 90% 55%;  /* Medium blue #3B82F6 */
    --ui-primary-text:   0 0% 100%;    /* White text */

    --ui-secondary-top:    217 80% 50%;  /* Medium blue */
    --ui-secondary-bottom: 217 75% 40%;   /* Darker blue */
    --ui-secondary-text:   0 0% 100%;     /* White text */

    --ui-contrast-top:    0 0% 20%;    /* Dark gray */
    --ui-contrast-bottom: 0 0% 15%;    /* Darker gray */
    --ui-contrast-text:   0 0% 95%;    /* Light text */
  }
}

/* Card layout fixes for Intelygence */
/* Make Surfaces cards with pack class use flexbox for bottom-aligned buttons */
.pack {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Push button containers to bottom of card and center them */
.pack .mt-3 {
  margin-top: auto;
  padding-top: var(--spacing-md, 1.5rem);
  display: flex;
  justify-content: center;
}

/* Ensure ul elements grow to fill space */
.pack ul {
  flex-grow: 1;
}

.container.mt-4 {
  padding-bottom: 3rem;
}

/* Proof metric styling */
.metric {
  text-align: center;
}

.metric object {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--spacing-sm, 1rem);
  display: block;
  opacity: 0.9;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px hsl(var(--ui-primary-top) / 0.3));
}

.metric:hover object {
  filter: brightness(0) invert(1) drop-shadow(0 0 12px hsl(var(--ui-primary-top) / 0.5));
}

@media (prefers-color-scheme: light) {
  .metric object {
    filter: brightness(0) invert(20%) sepia(100%) saturate(2000%) hue-rotate(210deg) brightness(0.85) drop-shadow(0 0 6px hsl(var(--ui-primary-top) / 0.25));
  }
  .metric:hover object {
    filter: brightness(0) invert(20%) sepia(100%) saturate(2000%) hue-rotate(210deg) brightness(0.85) drop-shadow(0 0 10px hsl(var(--ui-primary-top) / 0.4));
  }
}

.metric .num {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: hsl(var(--ui-primary-bottom));
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-xs, 0.5rem);
}

.metric .note {
  color: hsl(var(--color-text));
  font-size: 0.9375rem;
  margin-top: var(--spacing-xs, 0.5rem);
  font-weight: 500;
}

/* Process step styling */
.step {
  display: flex;
  flex-direction: column;
}

.step .n {
  font-weight: 700;
  color: hsl(var(--ui-primary-bottom));
  margin-bottom: var(--spacing-sm, 1rem);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.step  p {
  margin: 0;
  color: hsl(var(--color-text));
  line-height: 1.7;
  font-size: 1rem;
}

/* Testimonial author styling */
.who {
  color: hsl(var(--color-text) / 0.7);
  font-size: 0.9375rem;
  font-weight: 400;
  margin-top: auto;
  letter-spacing: -0.01em;
  text-align: center;
}

.who strong {
  color: hsl(var(--color-text));
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
}

.who img {
  margin: 0 auto 0.5rem;
  display: block;
}

.window h4 {
  margin: auto;
  margin-bottom: var(--spacing-sm, 1rem);
}

/* Center buttons in CTA band */
.band[data-surface] > div:last-child {
  display: flex;
  justify-content: center;
}

/* Form input styling - style the frame class when used on inputs */
input.frame,
textarea.frame {
  /* Default values if not set by state - use HSL triple format for from syntax */
  --input-text: hsl(210 10% 15%);
  
  width: 100%;
  padding: 0.875rem 1.125rem;
  margin-bottom: var(--spacing-sm, 1rem);
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  background: hsl(from var(--input-text) h s 90%);
  border: 1px solid var(--input-text);
  box-shadow:
    0 12px 12px -8px hsl(
      from var(--input-text) h s l / .2)
}

/* Override Surfaces pseudo-elements for inputs to show real border */
input.frame::before,
textarea.frame::before {
  display: none !important;
}

input.frame::after,
textarea.frame::after {
  display: none !important;
}

input.frame:focus,
textarea.frame:focus {
  --input-background: hsl(210, 100%, 99%);
  --input-text: hsl(210 100% 20%);
}

input.frame:placeholder-shown,
textarea.frame:placeholder-shown {
  --input-text: hsl(210 10% 60%);
}

input.frame::placeholder,
textarea.frame::placeholder {
  --input-text: hsl(210 10% 60%);
}

input.frame:invalid:not(:placeholder-shown),
textarea.frame:invalid:not(:placeholder-shown) {
  --input-text: hsl(0 100% 20%);
}

input.frame:valid:not(:focus),
textarea.frame:valid:not(:focus) {
  --input-text: hsl(210 60% 15%);
}



/* List styling for window surfaces */
.window ul {
  list-style: none;
  padding-left: 0;
  margin: var(--spacing-md, 1.5rem) 0 0 0;
}

.window ul li {
  position: relative;
  padding-left: 1.5rem;
  margin: 0.625rem 0;
  line-height: 1.7;
  font-size: 1rem;
  color: hsl(var(--color-text) / 0.8);
}

.window ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: hsl(var(--ui-primary-bottom));
  font-weight: 600;
  font-size: 1.1em;
}

