/* components.css — reusable UI components: header, nav, footer, buttons, chips, cards, modal, cookie consent */

/* ════════════════════════════════════════════
   SITE HEADER & NAVIGATION
════════════════════════════════════════════ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: 4.5rem;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border-light);
  transition:
    height var(--transition-base),
    background var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  height: 3.75rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* Logo */
.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo img {
  height: 2rem;
  width: auto;
}

/* Desktop nav */
.site-nav {
  display: none;
}

@media (min-width: 1024px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
  }
}

.site-nav__link {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  color: var(--clr-text-secondary);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

.site-nav__link.is-active {
  color: var(--clr-orange);
}

/* Mobile menu toggle */
.site-header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  color: var(--clr-text);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.site-header__menu-btn:hover {
  background: var(--clr-surface-2);
}

@media (min-width: 1024px) {
  .site-header__menu-btn {
    display: none;
  }
}

.site-header__menu-btn svg {
  pointer-events: none;
}

/* Hamburger icon lines */
.menu-icon__line {
  transition:
    transform var(--transition-smooth),
    opacity var(--transition-fast);
  transform-origin: center;
}

.site-header__menu-btn[aria-expanded='true'] .menu-icon__line--top {
  transform: translateY(7px) rotate(45deg);
}

.site-header__menu-btn[aria-expanded='true'] .menu-icon__line--mid {
  opacity: 0;
  transform: scaleX(0);
}

.site-header__menu-btn[aria-expanded='true'] .menu-icon__line--bot {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  top: 4.5rem;
  z-index: calc(var(--z-sticky) - 1);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: var(--sp-8) var(--sp-6);
  gap: var(--sp-2);
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  overflow-y: auto;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav__link {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-lg);
  color: var(--clr-text-secondary);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-lg);
  /* No transition on paint properties (color, background) — compositor cannot
     handle them; they trigger a main-thread repaint on every frame. Color
     changes instantly; background is handled by the ::before layer below. */
  position: relative; /* anchor for the composited ::before layer */
  cursor: pointer;
  display: block;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}

/* Composited highlight layer — only opacity is animated, which runs entirely
   on the GPU compositor thread and never triggers a paint. */
.mobile-nav__link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--clr-orange-10);
  opacity: 0;
  transition: opacity var(--transition-fast);
  will-change: opacity;
  pointer-events: none;
}

.mobile-nav__link:hover,
.mobile-nav__link.is-active {
  /* Color switches instantly — no non-composited transition, no paint frames */
  color: var(--clr-orange);
}

.mobile-nav__link:hover::before,
.mobile-nav__link.is-active::before {
  opacity: 1;
}

.mobile-nav__divider {
  height: 1px;
  background: var(--clr-border);
  margin-block: var(--sp-3);
}

.mobile-nav__contact-link {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-lg);
  color: var(--clr-text-secondary);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-lg);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
  display: block;
}

.mobile-nav__contact-link:hover {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

/* ════════════════════════════════════════════
   SITE FOOTER
════════════════════════════════════════════ */

.site-footer {
  background: var(--grad-footer);
  background: -webkit-linear-gradient(180deg, #0c0c16 0%, #0a0a12 100%);
  background: linear-gradient(180deg, #0c0c16 0%, #0a0a12 100%);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--sp-16) var(--sp-10);
}

.site-footer__inner {
  display: grid;
  gap: var(--sp-10);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--sp-12);
  }
}

.footer-brand__logo {
  margin-bottom: var(--sp-5);
}

.footer-brand__logo img {
  height: 1.75rem;
  width: auto;
}

.footer-brand__copy {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 30ch;
}

.footer-nav__title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--sp-5);
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-nav__link {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
}

.footer-nav__link:hover {
  color: var(--clr-white);
}

.footer-contact__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--sp-3);
}

.footer-contact__item a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition-fast);
}

.footer-contact__item a:hover {
  color: var(--clr-white);
}

.site-footer__bottom {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
}

.site-footer__legal-links {
  display: flex;
  gap: var(--sp-5);
}

.site-footer__legal-link {
  color: rgba(255, 255, 255, 0.35);
  font-size: var(--text-xs);
  transition: color var(--transition-fast);
}

.site-footer__legal-link:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-base);
  line-height: 1;
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary gradient button */
.btn--primary {
  background: var(--grad-accent);
  background: -webkit-linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  background: linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  color: var(--clr-white);
  box-shadow: 0 4px 20px rgba(255, 77, 26, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 8px 32px rgba(255, 77, 26, 0.4);
}

/* Ghost button (light context) */
.btn--ghost {
  background: transparent;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
}

.btn--ghost:hover {
  background: var(--clr-surface-2);
  border-color: var(--clr-text-secondary);
}

/* Ghost button (dark context) */
.btn--ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-white);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--sm {
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-6);
}

.btn--lg {
  font-size: var(--text-md);
  padding: var(--sp-5) var(--sp-10);
}

/* ════════════════════════════════════════════
   GOOGLE PLAY BADGE
════════════════════════════════════════════ */

.badge-link {
  display: inline-block;
  transition:
    transform var(--transition-fast),
    filter var(--transition-fast);
}

.badge-link:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

.badge-link img {
  height: 5.25rem;
  width: auto;
}

/* ════════════════════════════════════════════
   HIGHLIGHT CHIPS
════════════════════════════════════════════ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.chip--glass {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chip--surface {
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-xs);
}

.chip--accent {
  background: var(--clr-orange-10);
  color: var(--clr-orange);
  border: 1px solid rgba(255, 77, 26, 0.2);
}

/* ════════════════════════════════════════════
   CARD
════════════════════════════════════════════ */

.card {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-8);
  transition:
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ════════════════════════════════════════════
   GALLERY MODAL / LIGHTBOX
════════════════════════════════════════════ */

.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.gallery-modal.is-open {
  display: flex;
}

.gallery-modal__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
}

.gallery-modal__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  user-select: none;
}

.gallery-modal__close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-modal__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  z-index: 1;
}

.gallery-modal__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-modal__nav--prev {
  left: -4rem;
}

.gallery-modal__nav--next {
  right: -4rem;
}

@media (max-width: 767px) {
  .gallery-modal__nav--prev {
    left: var(--sp-2);
  }
  .gallery-modal__nav--next {
    right: var(--sp-2);
  }
  .gallery-modal__inner {
    padding-inline: 3.5rem;
  }
}

.gallery-modal__counter {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* ════════════════════════════════════════════
   COOKIE CONSENT
════════════════════════════════════════════ */

.cookie-bar {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: var(--z-toast);
  width: calc(100% - var(--sp-8));
  max-width: 680px;
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-2xl);
  padding: var(--sp-5) var(--sp-6);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-bar.is-visible {
  transform: translateX(-50%) translateY(0);
}

.cookie-bar__main {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}

.cookie-bar__text {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  flex: 1;
  min-width: 0;
}

.cookie-bar__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cookie-bar__copy {
  font-size: var(--text-sm);
  color: var(--clr-text-secondary);
  line-height: var(--leading-snug);
}

.cookie-bar__copy strong {
  color: var(--clr-text);
  font-weight: var(--font-weight-bold);
}

.cookie-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.cookie-btn {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-xs);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.cookie-btn--accept {
  background: var(--grad-accent);
  background: -webkit-linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  background: linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  color: var(--clr-white);
  border: none;
  box-shadow: 0 3px 12px rgba(255, 77, 26, 0.25);
}

.cookie-btn--accept:hover {
  box-shadow: 0 5px 18px rgba(255, 77, 26, 0.35);
  transform: translateY(-1px);
}

.cookie-btn--decline {
  background: transparent;
  color: var(--clr-text-secondary);
  border: 1px solid var(--clr-border);
}

.cookie-btn--decline:hover {
  background: var(--clr-surface-2);
  color: var(--clr-text);
}

.cookie-btn--settings {
  background: transparent;
  color: var(--clr-text-muted);
  border: none;
  font-size: var(--text-xs);
  text-decoration: underline;
  text-decoration-color: transparent;
  padding: var(--sp-2) var(--sp-3);
}

.cookie-btn--settings:hover {
  color: var(--clr-text-secondary);
  text-decoration-color: var(--clr-text-muted);
}

/* Cookie settings panel (expanded) */
.cookie-settings {
  margin-top: var(--sp-5);
  border-top: 1px solid var(--clr-border);
  padding-top: var(--sp-5);
  display: none;
}

.cookie-settings.is-open {
  display: block;
}

.cookie-category {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--clr-border-light);
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category__info {
  flex: 1;
  min-width: 0;
}

.cookie-category__title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-sm);
  color: var(--clr-text);
  margin-bottom: var(--sp-1);
}

.cookie-category__desc {
  font-size: var(--text-xs);
  color: var(--clr-text-secondary);
  line-height: var(--leading-relaxed);
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.cookie-toggle input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__track {
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: var(--radius-full);
  background: var(--clr-bg-alt);
  border: 1.5px solid var(--clr-border);
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base);
  position: relative;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  background: var(--clr-white);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-smooth);
}

.cookie-toggle input:checked + .cookie-toggle__track {
  background: var(--grad-accent);
  background: -webkit-linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  background: linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  border-color: transparent;
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(1.25rem);
}

.cookie-toggle input:disabled + .cookie-toggle__track {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle__track {
  outline: 2px solid var(--clr-orange);
  outline-offset: 2px;
}

.cookie-category--required .cookie-toggle__track {
  background: var(--grad-accent);
  background: -webkit-linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  background: linear-gradient(135deg, #ff4d1a 0%, #e5197a 100%);
  border-color: transparent;
  cursor: not-allowed;
}

.cookie-category--required .cookie-toggle__track::after {
  transform: translateX(1.25rem);
}

.cookie-settings__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

/* Fixed cookie control button */
.cookie-control-btn {
  position: fixed;
  bottom: var(--sp-6);
  left: var(--sp-6);
  z-index: calc(var(--z-toast) - 1);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  color: var(--clr-text-secondary);
  opacity: 0;
  pointer-events: none;
}

.cookie-control-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cookie-control-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}
