/**
 * @file theme.css
 * shadcn/ui-compatible theme variables for ByteTheme / tg_theme.
 *
 * Truth Guardians palette (hex):
 * - #1C3242  (navy)
 * - #1D384A  (navy-2)
 * - #E8E8E8  (light neutral)
 * - #F79421  (orange)
 * - #F8B917  (yellow)
 *
 * Notes:
 * - Off-white background (calm/clean).
 * - Blues are primary/foreground.
 * - Warm colors are accents/highlights (CTAs, badges), not large backgrounds.
 */

:root {
  /* ========= Surfaces + text ========= */
  --background: oklch(0.9249 0 0);                /* off-white */
  --foreground: oklch(0.307 0.040 241.359);      /* ~ #1C3242 */

  --card: oklch(1 0 0);                          /* white */
  --card-foreground: oklch(0.307 0.040 241.359); /* ~ #1C3242 */

  /* ========= Brand (calm/confident) ========= */
  --primary: oklch(0.754 0.164 62.441);         /* ~ #1D384A */
  --primary-foreground: oklch(1 0 0);            /* white */

  /* ========= Secondary / muted UI surfaces ========= */
  --secondary:  oklch(0.307 0.040 241.359);               /* ~ #E8E8E8 */
  --secondary-foreground: oklch(0.931 0 0);

  --muted: oklch(0.931 0 0);                     /* ~ #E8E8E8 */
  --muted-foreground: oklch(0.555 0.027 234.824);/* derived cool gray text */

  /*
   * Accent: gentle warm tint derived from your flame colors.
   * Use for hovers, selected states, subtle highlights (not full sections).
   */
  --accent: oklch(0.963 0.040 88.196);           /* ~ warm off-white tint */
  --accent-foreground: oklch(0.307 0.040 241.359);

  /* ========= Destructive ========= */
  --destructive: oklch(0.6368 0.2078 25.3313);   /* keep */
  --destructive-foreground: oklch(1 0 0);

  /* ========= Borders / inputs ========= */
  --border: oklch(0.870 0 0);                    /* slightly darker than #E8E8E8 */
  --input: oklch(0.870 0 0);

  /* ========= Typography ========= */
  --font-sans: "Roboto", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;

  /* ========= Radius ========= */
  --radius: 0.5rem;

  /* ========= Shadows ========= */
  --shadow-x: 0;
  --shadow-y: 1px;
  --shadow-blur: 3px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.1;
  --shadow-color: oklch(0 0 0);
  --shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
  --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);

  /* ========= Optional: explicit brand tokens (use in custom CSS if needed) ========= */
  --brand-navy: oklch(0.307 0.040 241.359);      /* #1C3242 */
  --brand-navy-2: oklch(0.328 0.046 239.444);    /* #1D384A */
  --brand-orange: oklch(0.754 0.164 62.441);     /* #F79421 */
  --brand-yellow: oklch(0.822 0.165 83.094);     /* #F8B917 */
  --white: oklch(1 0 0);
}

/* Header navbar design */

/* Homepage: Fixed positioning */
body.path-frontpage .navbar {
  position: fixed;
  top: calc(var(--drupal-displace-offset-top, 0px) + var(--gin-toolbar-height, 0px));
  left: 0;
  right: 0;
  z-index: 500;
  width: 100%;
}

/* Smooth transitions on all navbar elements */
body.path-frontpage .navbar {
  transition: background-color 300ms ease-in-out;
}

/* Initial transparent state */
body.path-frontpage .navbar,
body.path-frontpage .navbar--menu {
  background-color: transparent;
}

/* Transparent gradient overlay initially */
body.path-frontpage .navbar--dropdown-menu-wrapper::after {
  background: linear-gradient(to bottom, transparent, transparent) !important;
}

/* Transparent buttons with border styling */
body.path-frontpage .navbar--links .button.button {
  background-color: transparent !important;
  color: var(--foreground);
  border: 1px solid var(--border);
}

body.path-frontpage .navbar--links .button.button:hover {
  background-color: var(--muted) !important;
}

/* Transparent navigation links */
body.path-frontpage .navbar--dropdown-menu a {
  color: var(--color-white);
}
body.path-frontpage .navbar.navbar--scrolled .navbar--dropdown-menu a {
  color: unset;
}

/* Show white logo variant when navbar is transparent (homepage only) */
body.path-frontpage .navbar:not(.navbar--scrolled) .branding img {
  content: url('/themes/custom/byte_theme/byte-logo-white.svg');
}

/* ===== Scrolled state: restore backgrounds ===== */

body.path-frontpage .navbar.navbar--scrolled {
  background-color: var(--background);
  box-shadow: var(--shadow-sm);
}

body.path-frontpage .navbar {
  max-width: unset;
  text-shadow: var(--shadow);
}

/* Restore gradient on scroll */
body.path-frontpage .navbar.navbar--scrolled .navbar--dropdown-menu-wrapper::after {
  background: linear-gradient(to bottom, transparent, var(--background)) !important;
}

/* Restore primary button background */
body.path-frontpage .navbar.navbar--scrolled .navbar--links .button.button[class*="primary"] {
  background-color: var(--primary) !important;
  color: var(--primary-foreground);
  border-color: transparent;
}

/* Restore secondary button background */
body.path-frontpage .navbar.navbar--scrolled .navbar--links .button.button[class*="secondary"] {
  background-color: var(--secondary) !important;
  color: var(--secondary-foreground);
  border-color: transparent;
}

/* Scrolled button hovers */
body.path-frontpage .navbar.navbar--scrolled .navbar--links .button.button[class*="primary"]:hover {
  opacity: 0.85;
}

body.path-frontpage .navbar.navbar--scrolled .navbar--links .button.button[class*="secondary"]:hover {
  opacity: 0.8;
}

/** Card enhancements */
.bg-white {
  background-color: var(--card);
  transition: all ease 300ms;
}

.mt--8 {
  margin-top: -8rem;
}

.card-transition-translate-y:hover {
  transform: translateY(-0.5rem);
}

.align-center,
.align-center * {
  text-align: center;
}

.card-icon-hover img {
  max-width: 10rem;
  height: auto;
  margin-right: auto;
  margin-left: auto;
}

.card-icon-hover .description {
  padding: 0 30px;
  font-weight: bold;
  color: transparent;
  background-color: transparent;
  position: absolute;
  z-index: 996;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  display: flex;
  align-items: center;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

.card-icon-hover:hover .description {
  visibility: visible;
  color: var(--white);
  background: var(--primary);
  height: 100%;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

footer[role="contentinfo"] {
  background-color: var(--primary);
  color: var(--background);
}
