/* ==========================================================================
   components.css  |  Reusable pieces of the Fancivo design
   (glass surfaces, gradient text, buttons, chips, form controls, icons)
   ========================================================================== */


/* 1. GLASS SURFACES -------------------------------------------------------- */

/* .btn-glass shares the same look, so the surface rules are grouped.
   .nav-pill::before = the navbar's glass layer (see sections.css, "2. HEADER / NAVBAR"). */
.glass,
.btn-glass,
.nav-pill::before {
  --glass-bg: rgba(255, 255, 255, .06);
  --glass-shadow: inset 0 1px rgba(255, 255, 255, .14), 0 24px 60px -32px rgba(0, 0, 0, .65);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
          backdrop-filter: blur(24px) saturate(150%);
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--glass-shadow);
}

.glass-strong {
  -webkit-backdrop-filter: blur(32px) saturate(160%);
          backdrop-filter: blur(32px) saturate(160%);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 32px 80px -36px rgba(0, 0, 0, .7);
}

.glass-chip {
  -webkit-backdrop-filter: blur(16px) saturate(150%);
          backdrop-filter: blur(16px) saturate(150%);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}


/* 2. GRADIENT TEXT ("aurora") ------------------------------------------------ */
.text-aurora {
  background: linear-gradient(100deg, var(--aurora-3) 0%, var(--primary) 45%, var(--aurora-4) 90%);
  color: transparent;
  -webkit-background-clip: text;
          background-clip: text;
}


/* 3. ICONS (inline Lucide SVGs, coloured through currentColor) ---------------- */
.icon {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm   { width: .875rem; height: .875rem; }   /* 14px */
.icon-lg   { width: 1.5rem;  height: 1.5rem;  }   /* 24px */
.icon-bold { stroke-width: 3; }


/* 4. BUTTONS ----------------------------------------------------------------
   Built on Bootstrap's .btn. Sizing is done with Bootstrap's own button
   variables, so .btn-sm / .btn-lg keep working:
     .btn-sm  -> navbar CTA        (default) -> hero / careers CTA
     .btn-lg  -> form submit                                                   */

/* 4a. Gradient (blue -> violet) button with glow */
.btn-aurora {
  --bs-btn-padding-x: 1.75rem;
  --bs-btn-padding-y: .875rem;
  --bs-btn-font-size: .875rem;
  --bs-btn-font-weight: 700;
  --bs-btn-line-height: 1.4285714;
  --bs-btn-border-width: 0;
  --bs-btn-border-radius: 9999px;
  --bs-btn-color: var(--primary-foreground);
  --bs-btn-hover-color: var(--primary-foreground);
  --bs-btn-active-color: var(--primary-foreground);
  --bs-btn-bg: transparent;
  --bs-btn-hover-bg: transparent;
  --bs-btn-active-bg: transparent;
  --bs-btn-focus-box-shadow: var(--btn-glow);   /* focus keeps the resting glow (see 4c) */

  --btn-glow: 0 0 0 1px rgba(255, 255, 255, .1) inset,
              0 12px 48px -12px var(--aurora-1),
              0 12px 80px -24px var(--aurora-2);
  --btn-hover-scale: 1.03;
  --btn-active-scale: .98;

  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-align: start;       /* Bootstrap's .btn centres wrapped text; the design left-aligns it */
  background-image: linear-gradient(to right, var(--aurora-2), var(--aurora-1));
  box-shadow: var(--btn-glow);
  transition: transform .15s var(--ease-standard);
}

@supports (background-image: linear-gradient(to right in oklab, red, blue)) {
  .btn-aurora {
    background-image: linear-gradient(to right in oklab, var(--aurora-2), var(--aurora-1));
  }
}

@supports (color: color-mix(in lab, red, red)) {
  .btn-aurora {
    --btn-glow: 0 0 0 1px rgba(255, 255, 255, .1) inset,
                0 12px 48px -12px color-mix(in oklab, var(--aurora-1) 65%, transparent),
                0 12px 80px -24px color-mix(in oklab, var(--aurora-2) 55%, transparent);
  }
}

/* Every :hover effect sits inside (hover: hover), exactly like the original (Tailwind v4):
   on touch screens a tap must not leave the element stuck in its hover state. */
@media (hover: hover) {
  .btn-aurora:hover { transform: scale(var(--btn-hover-scale)); }
}
.btn-aurora:active { transform: scale(var(--btn-active-scale)); }

/* nav / careers CTA: smaller, softer glow */
.btn-aurora-soft {
  --btn-glow: 0 8px 40px -16px var(--aurora-2);
}
@supports (color: color-mix(in lab, red, red)) {
  .btn-aurora-soft {
    --btn-glow: 0 8px 40px -16px color-mix(in oklab, var(--aurora-2) 55%, transparent);
  }
}

.btn-aurora.btn-sm {
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: .625rem;
  --bs-btn-font-size: .875rem;
  --bs-btn-border-radius: 9999px;
}

.btn-aurora.btn-lg {
  --bs-btn-padding-x: 2rem;
  --bs-btn-padding-y: 1rem;
  --bs-btn-font-size: .875rem;
  --bs-btn-border-radius: 9999px;
  --btn-hover-scale: 1.01;
  --btn-active-scale: .99;
}

/* arrow / send icon nudges to the right on hover */
.btn-aurora .icon {
  transition: transform .15s var(--ease-standard);
}
@media (hover: hover) {
  .btn-aurora:hover .icon {
    transform: translateX(.125rem);
  }
}

/* 4b. Glass (outline-ish) button */
.btn-glass {
  --bs-btn-padding-x: 1.75rem;
  --bs-btn-padding-y: .875rem;
  --bs-btn-font-size: .875rem;
  --bs-btn-font-weight: 700;
  --bs-btn-line-height: 1.4285714;
  --bs-btn-border-width: 1px;
  --bs-btn-border-radius: 9999px;
  --bs-btn-color: var(--foreground);
  --bs-btn-hover-color: var(--foreground);
  --bs-btn-active-color: var(--foreground);
  --bs-btn-bg: var(--glass-bg);
  --bs-btn-hover-bg: var(--glass-bg);      /* Bootstrap uses these on :hover, :focus-visible and :active, */
  --bs-btn-active-bg: var(--glass-bg);     /* the lighter hover fill is added below, hover devices only   */
  --bs-btn-border-color: rgba(255, 255, 255, .1);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .1);
  --bs-btn-active-border-color: rgba(255, 255, 255, .1);
  --bs-btn-focus-box-shadow: var(--glass-shadow);   /* focus keeps the resting shadow (see 4c) */

  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-align: start;
  transition: background-color .15s var(--ease-standard);
}
@media (hover: hover) {
  .btn-glass.btn:hover {
    background-color: rgba(255, 255, 255, .1);
  }
}


/* 4c. Keyboard focus
   The original design keeps the browser's default focus ring on links and buttons.
   Bootstrap replaces it with a coloured glow, so the outline is handed back to the browser.
   (The buttons' box-shadow already stays the same on focus, via --bs-btn-focus-box-shadow.) */
.btn:focus-visible,
.nav-link:focus-visible {
  outline: revert;
}
.nav-link:focus-visible {
  box-shadow: none;
}


/* 4d. Round glass icon button (hamburger that opens the side menu, close button inside it) */
.btn-icon-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--foreground);
  background-color: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9999px;
  transition: background-color .15s var(--ease-standard);
}
.btn-icon-glass .icon {
  width: 1.25rem;
  height: 1.25rem;
}
@media (hover: hover) {
  .btn-icon-glass:hover {
    background-color: rgba(255, 255, 255, .1);
  }
}


/* 5. EYEBROW CHIP (small uppercase label above a heading) --------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem 1rem;
  font-size: .75rem;
  line-height: 1.3333333;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-lg {                     /* hero variant */
  padding-top: .5rem;
  padding-bottom: .5rem;
  letter-spacing: .18em;
}


/* 6. TAG PILLS ---------------------------------------------------------------- */

/* glass pills (hero + about) */
.tag-glass {
  padding: .375rem 1rem;
  font-size: .75rem;
  line-height: 1.3333333;
  font-weight: 600;
  color: var(--muted-foreground);
}
.tag-glass-strong {               /* brighter text (about section) */
  color: var(--foreground);
}

/* flat pills inside the service cards */
.tag-flat {
  padding: .25rem .75rem;
  font-size: .75rem;
  line-height: 1.3333333;
  font-weight: 500;
  color: var(--muted-foreground);
  background-color: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1);   /* 1px ring */
}


/* 7. LOGO ------------------------------------------------------------------- */
.logo-surface {
  display: inline-flex;
  padding: .375rem .625rem;
  border-radius: var(--radius-md);
  background-color: var(--logo-surface);
}
.logo-img {
  width: 10rem;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
@media (min-width: 640px) {
  .logo-img { width: 11rem; }
}


/* 8. FORM CONTROLS (Bootstrap .form-control, restyled as glass) ---------------- */
.form-control-glass {
  padding: .75rem 1rem;
  font-size: .875rem;
  line-height: 1.4285714;
  color: var(--foreground);
  background-color: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-xl);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: color .15s var(--ease-standard),
              background-color .15s var(--ease-standard),
              border-color .15s var(--ease-standard);
}

.form-control-glass::placeholder {
  color: var(--muted-foreground);
  opacity: 1;
}
@supports (color: color-mix(in lab, red, red)) {
  .form-control-glass::placeholder {
    color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
  }
}

.form-control-glass:focus {
  color: var(--foreground);
  background-color: rgba(255, 255, 255, .05);
  border-color: var(--aurora-1);
  box-shadow: 0 0 0 2px var(--aurora-1);
  outline: 0;
}
@supports (color: color-mix(in lab, red, red)) {
  .form-control-glass:focus {
    border-color: color-mix(in oklab, var(--aurora-1) 60%, transparent);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--aurora-1) 30%, transparent);
  }
}

textarea.form-control-glass {
  resize: none;
}

/* small uppercase field label */
.form-label-caps {
  font-size: .75rem;
  line-height: 1.3333333;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
