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

/* Force bloom off unless element has a bloom- class (Surfaces applies --bloom-shadows to every .surface/.button/.chip) */
.surface:not([class*="bloom-"]),
.button:not([class*="bloom-"]),
.chip:not([class*="bloom-"]) {
  --bloom-spread: 0;
  --bloom-intensity: 0;
}

/* Surfaces: ONLY an active bloom class (bloom-weak/mild/strong) may add box-shadow; generic .surface must not */
.surface:not([class*="bloom-"])::before,
.surface:not([class*="bloom-"])::after {
  box-shadow: none;
}

/* Buttons/chips: subtler elevation (Surfaces applies 0 2px 8px + bloom to every .button/.chip > span) */
.button > span,
.chip > span {
  box-shadow: var(--inset-shadows-strong), 0 1px 3px hsl(0 0% 0% / 0.06);
}

/* Generic gentle bloom-on-hover helper */
.hover-bloom{
  transition:
    box-shadow .5s cubic-bezier(0.4, 0, 0.2, 1),
    transform .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-bloom:hover,
.hover-bloom:focus-visible{
  box-shadow:
    0 3px 6px hsl(0 0% 0% / 0.15),
    0 0 0 1px hsl(0 0% 100% / 0.06);
  transform: translateY(-1px);
}

: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 */
}

/* 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;
}

/* Background material: pure black/white, matching canonical background colors */
/* Dark-mode default: solid black */
.background {
  --mat-top:    0 0% 0%;
  --mat-bottom: 0 0% 0%;
  --mat-top-l:  0;
  --mat-bottom-l: 0;
}

@media (prefers-color-scheme: light) {
  /* Light-mode background: solid white */
  .background {
    --mat-top:    0 0% 100%;
    --mat-bottom: 0 0% 100%;
    --mat-top-l:  100;
    --mat-bottom-l: 100;
  }
}

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

/* Page-level sheet: margin so background shows; surfaces style *surfaces*, not background */
[data-surface="page-sheet"],
.page-sheet {
  margin: var(--spacing-lg, 1.5rem) clamp(1.5rem, 5vw, 3rem);
  max-width: min(1280px, 94vw);
  margin-left: auto;
  margin-right: auto;
}

/* Legal blocks: let surface card provide the look; keep layout from .imprint-contact / .legal-info */
.imprint-contact.surface,
.legal-info > div.surface {
  background: transparent;
  border: none;
}

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

.metric img {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--spacing-sm, 1rem);
  display: block;
  opacity: 0.9;
  filter: brightness(0) invert(1);
}

.metric:hover img {
  filter: brightness(0) invert(1);
  opacity: 1;
}

@media (prefers-color-scheme: light) {
  .metric img {
    filter: brightness(0) invert(20%) sepia(100%) saturate(2000%) hue-rotate(210deg) brightness(0.85);
  }
  .metric:hover img {
    filter: brightness(0) invert(20%) sepia(100%) saturate(2000%) hue-rotate(210deg) brightness(0.85);
    opacity: 1;
  }
}

.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;
}

/* Hover-only rows: fade in mapped button rows when the parent surface is active */
[data-surface] > .hover-only-row{
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .25s cubic-bezier(0.4, 0, 0.2, 1),
    transform .25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-surface]:hover > .hover-only-row,
[data-surface]:focus-within > .hover-only-row,
[data-surface] > .hover-only-row.hover{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-1px);
}

/* CARE feature cards: ensure lists sit inside comfortable padding */
[data-surface="feature-card"] ul {
  padding-left: 0.25rem;
}

/* Custom list states */
.custom-list {
  list-style: none;
  margin: 0.5rem 0;
  padding-left: 0;
}

.custom-list li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.7;
  font-size: 1rem;
}

.custom-list li::before {
  position: absolute;
  left: 0;
}

/* Benefits: checkmark */
.custom-list.benefits li::before {
  content: "✓";
  color: hsl(var(--ui-primary-bottom));
  font-weight: 600;
  font-size: 1.05em;
}

/* Open points: empty square */
.custom-list.open-points li::before {
  content: "☐";
  color: hsl(var(--color-text) / 0.8);
  font-size: 0.95em;
}

/* Threats: danger indicator */
.custom-list.threats li::before {
  content: "⚠";
  color: hsl(0 75% 55%);
  font-size: 1em;
}

/* 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;
  /* Explicit background for contact inputs: dark = black, light = white */
  background: #000;
  border: 1px solid var(--input-text);
  box-shadow:
    0 12px 12px -8px hsl(
      from var(--input-text) h s l / .2)
}

@media (prefers-color-scheme: light) {
  input.frame,
  textarea.frame {
    background: #fff;
  }
}

/* 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;
}

