
@import url('https://fonts.googleapis.com/css2?family=Jura:wght@600;700&display=swap');

:root {
  --bibrik-bg: #18181b;
  --bibrik-surface: #27272a;
  --bibrik-surface-hover: #323232;
  --bibrik-accent: #cc1c39;
  --bibrik-accent-hover: #a51935;
  --bibrik-accent-glow: #5f0625;
  --bibrik-border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bibrik-bg);
  position: relative;
  overflow-x: hidden;
}

body > :not(.site-bg):not(.scroll-top):not(.site-nav):not(.bibrik-toast-host):not(.bibrik-confirm) {
  position: relative;
  z-index: 1;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-bg__blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: site-bg-drift 12s ease-in-out infinite alternate;
}

.site-bg__blur--1 {
  width: 420px;
  height: 420px;
  background: var(--bibrik-accent);
  top: -120px;
  left: -80px;
}

.site-bg__blur--2 {
  width: 360px;
  height: 360px;
  background: var(--bibrik-accent-glow);
  bottom: -100px;
  right: 10%;
  animation-delay: -4s;
}

.site-bg__blur--3 {
  width: 280px;
  height: 280px;
  background: #7f1d1d;
  top: 40%;
  right: -60px;
  animation-delay: -8s;
}

@keyframes site-bg-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(30px, -20px) scale(1.08);
  }
}

.site-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, black 45%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 45%, transparent 92%);
}

.site-bg__particles {
  position: absolute;
  inset: 0;
}

.site-bg__particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bibrik-accent);
  opacity: 0;
  animation: site-bg-rise 6s ease-in infinite;
}

@keyframes site-bg-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  15% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-120vh) scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-bg__blur {
    animation: none;
  }
  .site-bg__particle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1300;
  padding: 0 1rem;
  padding-top: 0.75rem;
  isolation: isolate;
}

.site-nav__bar {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: rgba(24, 24, 27, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.nav-logo {
  grid-column: 1;
  justify-self: start;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 65px;
}

.nav-logo img {
  width: auto;
  max-width: 65px;
  height: auto;
  display: block;
}

.nav-logo:hover {
  transform: scale(0.85);
}

.nav-links {
  grid-column: 2;
  justify-self: center;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.65rem, 1.5vw, 1.75rem);
  font-family: "Jura", sans-serif;
  font-weight: 700;
}

.link a {
  position: relative;
  padding: 0.35rem 0;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s ease;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
}

.link a::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #cc1c39, transparent);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.link a:hover {
  color: #fff;
}

.link a:hover::after {
  width: 100%;
}

.link a:focus-visible {
  outline: 2px solid #cc1c39;
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-links a[aria-current="page"] {
  color: #fff;
}

.nav-links a[aria-current="page"]::after {
  width: 100%;
  background: linear-gradient(90deg, transparent, #cc1c39, #cc1c39, transparent);
}

.nav-drawer__item a[aria-current="page"] {
  background: rgba(204, 28, 57, 0.18);
}

.nav-links .link:has(a[href="/form"]),
.nav-links .link:has(a[href="form"]),
.nav-drawer__item:has(a[href="/form"]),
.nav-drawer__item:has(a[href="form"]) {
  display: none !important;
}

.nav-burger {
  grid-column: 3;
  justify-self: end;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(204, 28, 57, 0.12);
  border: 1px solid rgba(204, 28, 57, 0.35);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.nav-burger:hover {
  background: rgba(204, 28, 57, 0.22);
  border-color: rgba(204, 28, 57, 0.55);
}

.nav-burger__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, width 0.25s ease;
  transform-origin: center;
}

.nav-burger.is-active .nav-burger__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-burger.is-active .nav-burger__bar:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-burger.is-active .nav-burger__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1310;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
}

.nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1320;
  width: min(340px, 90vw);
  height: 100%;
  max-height: 100dvh;
  padding: 1.25rem 0 2rem;
  background: linear-gradient(160deg, #2a2a2e 0%, #18181b 45%, #141416 100%);
  border-left: 1px solid rgba(204, 28, 57, 0.22);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.55);
  transform: translateX(105%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-drawer__brand {
  font-family: "Jura", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.nav-drawer__dot {
  color: #cc1c39;
}

.nav-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.nav-drawer__close:hover {
  background: rgba(204, 28, 57, 0.35);
}

.nav-drawer__close:active {
  transform: scale(0.94);
}

.nav-drawer__list {
  list-style: none;
  padding: 0 0.75rem;
}

.nav-drawer__item a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0.85rem;
  margin-bottom: 4px;
  border-radius: 12px;
  font-family: "Jura", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  position: relative;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}

.nav-drawer__item a i {
  font-size: 1.35rem;
  color: #cc1c39;
  transition: transform 0.25s ease;
}

.nav-drawer__item a:hover {
  background: rgba(204, 28, 57, 0.12);
  color: #fff;
}

.nav-drawer__item a:hover i {
  transform: scale(1.08);
}

.nav-drawer.is-open .nav-drawer__item a {
  opacity: 1;
  transform: translateX(0);
}

.nav-drawer.is-open .nav-drawer__item:nth-child(1) a { transition-delay: 0.05s; }
.nav-drawer.is-open .nav-drawer__item:nth-child(2) a { transition-delay: 0.08s; }
.nav-drawer.is-open .nav-drawer__item:nth-child(3) a { transition-delay: 0.11s; }
.nav-drawer.is-open .nav-drawer__item:nth-child(4) a { transition-delay: 0.14s; }
.nav-drawer.is-open .nav-drawer__item:nth-child(5) a { transition-delay: 0.17s; }
.nav-drawer.is-open .nav-drawer__item:nth-child(6) a { transition-delay: 0.2s; }
.nav-drawer.is-open .nav-drawer__item:nth-child(7) a { transition-delay: 0.23s; }

body.nav-open {
  overflow: hidden;
}

body.nav-open > :not(.site-nav):not(.site-bg):not(.scroll-top) {
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer,
  .nav-drawer__item a,
  .nav-backdrop,
  .nav-burger__bar {
    transition-duration: 0.01ms !important;
  }
  .nav-drawer.is-open .nav-drawer__item a {
    transition-delay: 0s !important;
  }
  .reveal-on-scroll {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (width < 900px) {
  .nav-links {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .site-nav__bar {
    border-radius: 14px;
    padding: 0.55rem 1rem;
  }
}

footer.site-footer {
  display: block;
  height: auto;
  max-width: none;
  background: transparent;
  border-radius: 0;
  flex-wrap: unset;
}

.site-footer {
  width: min(1140px, calc(100% - 2rem));
  max-width: 1140px;
  margin: 3rem auto 0;
  padding: 0;
  box-sizing: border-box;
}

.site-footer__inner {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
  min-height: 100px;
  padding: 1.25rem 1.5rem;
  background: #27272a;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.site-footer__lead {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.site-footer__brand {
  flex-shrink: 0;
}

.site-footer__brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.site-footer__brand a:hover img {
  transform: scale(0.92);
  filter: drop-shadow(6px 4px 0 rgba(165, 25, 53, 0.45));
}

.site-footer__meta p {
  margin: 0.1rem 0;
  font-family: "Jura", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

.site-footer__meta strong {
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  text-transform: none;
}

.site-footer__meta a {
  color: var(--bibrik-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__meta a:hover {
  color: #fff;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.site-footer__social a {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.site-footer__social a:hover {
  background: rgba(204, 28, 57, 0.2);
  border-color: rgba(204, 28, 57, 0.4);
  transform: translateY(-2px);
}

.site-footer__social img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.site-copyright {
  width: min(1140px, calc(100% - 2rem));
  max-width: 1140px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  text-align: center;
}

@media (width < 600px) {
  .site-footer__inner {
    justify-content: center;
    min-height: auto;
    padding: 1.25rem 1rem;
  }

  .site-footer__lead {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1 1 100%;
  }

  .site-footer__social {
    justify-content: center;
    width: 100%;
  }
}

.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 1200;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  background: rgba(204, 28, 57, 0.92);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, background 0.2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover {
  background: #a51935;
  transform: translateY(-2px);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.form-inner input:not([type="submit"]),
.form-inner textarea {
  min-height: 48px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-inner input:focus,
.form-inner textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(204, 28, 57, 0.35);
}

.form-inner input.field-error,
.form-inner textarea.field-error {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.9);
  background: #fde8e8 !important;
}

.form-inner input[type="submit"] {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  cursor: pointer;
}

@media (max-width: 540px) {
  .form-inner {
    padding: 32px 22px !important;
  }
  .form-inner input:not([type="submit"]),
  .form-inner textarea {
    min-height: 52px;
    line-height: 1.4 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

.btn,
.close-btn,
.form-inner input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: #fff;
  background-color: var(--bibrik-accent);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(204, 28, 57, 0.35);
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.close-btn:hover,
.form-inner input[type="submit"]:hover {
  background-color: var(--bibrik-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(204, 28, 57, 0.45);
}

.btn:active,
.close-btn:active,
.form-inner input[type="submit"]:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid var(--bibrik-border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--bibrik-surface);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.btn:focus-visible,
.close-btn:focus-visible,
.form-inner input[type="submit"]:focus-visible {
  outline: 2px solid var(--bibrik-accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .close-btn,
  .form-inner input[type="submit"],
  .scroll-top {
    transition-duration: 0.01ms !important;
  }
  .btn:hover,
  .close-btn:hover,
  .form-inner input[type="submit"]:hover,
  .scroll-top:hover {
    transform: none;
  }
  .scroll-top.is-visible {
    transform: none;
  }
}
