/* ==========================================================================
   ClickRayo — public site chrome (header, footer, hero helpers)
   Loaded by the public layout. Page-specific marketing styles live in
   css/landing.css.
   ========================================================================== */

.cr-site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--cr-ease), background-color 0.2s var(--cr-ease);
}

.cr-site-header.is-stuck {
  border-bottom-color: var(--cr-border);
  background: rgba(7, 11, 20, 0.94);
}

.cr-site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--cr-header-h);
}

.cr-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--cr-font-head);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
  color: var(--cr-text);
  flex: none;
}

.cr-site-brand:hover { color: var(--cr-text); }

.cr-site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
}

.cr-site-nav a {
  color: var(--cr-text-2);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0;
  position: relative;
}

.cr-site-nav a:hover { color: var(--cr-text); }

.cr-site-nav a.is-active { color: var(--cr-text); }

/*
 * Buttons in the navigation keep their own colours.
 *
 * `.cr-site-nav a` is more specific than the button variants in app.css
 * (0,1,1 against 0,1,0), so it used to paint light text onto the amber
 * accent button — a contrast ratio of 1.07:1, i.e. an invisible label.
 */
.cr-site-nav a.cr-btn--accent,
.cr-site-nav a.cr-btn--accent:hover { color: #1a1405; }

.cr-site-nav a.cr-btn--primary,
.cr-site-nav a.cr-btn--primary:hover { color: #fff; }

.cr-site-nav a.cr-btn--ghost,
.cr-site-nav a.cr-btn--ghost:hover { color: var(--cr-text-2); }

.cr-site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cr-primary), var(--cr-accent));
}

.cr-site-nav__login { font-weight: 600; }

.cr-site-header__toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--cr-surface-2);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius-sm);
  color: var(--cr-text);
  cursor: pointer;
}

.cr-skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  clip: auto;
  z-index: 100;
  background: var(--cr-primary);
  color: #fff;
  border-radius: var(--cr-radius-sm);
  font-weight: 600;
}

/* ------------------------------------------------------------------ footer */

.cr-site-footer {
  border-top: 1px solid var(--cr-border);
  background: var(--cr-bg-2);
  padding: 3.5rem 0 1.75rem;
  margin-top: 4rem;
}

.cr-site-footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(min(100%, 260px), 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
}

.cr-site-footer__brand p { margin-top: 0.85rem; max-width: 34ch; }

.cr-site-footer__heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--cr-text);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.cr-site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cr-site-footer__list a { color: var(--cr-muted); font-size: 0.9rem; }
.cr-site-footer__list a:hover { color: var(--cr-text); }

.cr-site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cr-border);
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .cr-site-header__toggle { display: inline-flex; }

  .cr-site-nav {
    position: absolute;
    top: var(--cr-header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 20px 1.25rem;
    background: rgba(7, 11, 20, 0.98);
    border-bottom: 1px solid var(--cr-border);
    box-shadow: var(--cr-shadow-lg);
    display: none;
  }

  .cr-site-nav.is-open { display: flex; }

  .cr-site-nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--cr-border);
    font-size: 1rem;
  }

  .cr-site-nav a.is-active::after { display: none; }

  .cr-site-nav .cr-btn {
    margin-top: 0.85rem;
    border-bottom: 0;
    justify-content: center;
  }

  /*
   * The footer keeps a brand column plus auto-fitted link columns on wide
   * screens. Below 900px the link columns have a 150px floor, which together
   * with the 260px brand column is wider than a phone — so it becomes a
   * single column instead of letting the page scroll sideways.
   */
  .cr-site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}
