/**
 * @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.9344 0.014 88.69);                /* off-white */
  --foreground: oklch(0.3797 0.0567 184.72);      /* ~ #1C3242 */

  --card: oklch(1 0 0);                          /* white */
  --card-foreground: oklch(0.3797 0.0567 184.72); /* ~ #1C3242 */

  /* ========= Brand (calm/confident) ========= */
  --primary: oklch(0.7279 0.0573 89.91);         /* ~ #1D384A */
  --primary-foreground: oklch(1 0 0);            /* white */

  /* ========= Secondary / muted UI surfaces ========= */
  --secondary:  oklch(0.3797 0.0567 184.72);               /* ~ #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.3797 0.0567 184.72);

  /* ========= 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: "Spectral", "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.3797 0.0567 184.72);      /* #1C3242 */
  --brand-navy-2: oklch(0.328 0.046 239.444);    /* #1D384A */
  --brand-orange: oklch(0.7279 0.0573 89.91);     /* #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(--card);
  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,
.region-header {
  background-color: var(--card);
  transition: all ease 300ms;
}

.region-header {
  --tw-shadow: var(--shadow-md);
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}

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

/* Person Card Enhancements */
.card-person.card-icon-hover {
  min-height: 320px;
}

.card-person.card-icon-hover img {
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-person .description {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Team grid layout */
.view-team .views-row {
  height: 100%;
}

.view-team .view-content {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

/** Styling coming soon page */
section.coming-soon {
  background: radial-gradient(ellipse at center, transparent 0%, hsl(168 100% 7% / 0.7) 50%);
}
.coming-soon .hero-overlay--media {
  background: var(--secondary);
}

.coming-soon .hero-overlay--media img {
  opacity: .1;
}

@media (min-width: 640px) {
  .view-team .view-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .view-team .view-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .view-team .view-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

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