/* =========================================================
   01. Root Variables
========================================================= */

:root {
  --black: #111111;
  --white: #ffffff;
  --purple: #5b2af4;
  --purple-hover: #391a9a;

  --overlay: rgba(0, 0, 0, 0.69);

  --max-width: 1200px;
  --nav-height: 84px;
  --btn-height: 40px;
  --grid-margin: 194px;
}

/* =========================================================
   02. Fonts
========================================================= */

@font-face {
  font-family: "Haas Grot Disp Trial";
  src: url("../assets/fonts/neuehaasgrotdisp-55roman-trial.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/Satoshi-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   03. Reset / Base
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: none;
}

body {
  background: var(--white);
  color: var(--white);
  font-family: "Satoshi", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.is-menu-open {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.nowrap {
  white-space: nowrap;
}

.container {
  width: min(var(--max-width), calc(100% - 48px));
  margin-inline: auto;
}

/* =========================================================
   04. Buttons
========================================================= */

.btn {
  position: relative;
  height: var(--btn-height);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Satoshi", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  overflow: hidden;
  cursor: pointer;
}

.btn--primary,
.btn--secondary {
  background: var(--purple);
  color: var(--white);
}

.btn--secondary {
  transition:
    background 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.btn--secondary:hover {
  background: var(--purple-hover);
}

.btn--secondary:active {
  transform: translateY(1px);
}

.btn--glass {
  position: relative;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background 180ms ease;
}

.btn--glass::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0.04)
    );
  opacity: 0.75;
}

.btn--glass::after {
  display: none;
}

.btn--glass:hover {
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.16);
}

.btn--glass:active {
  transform: translateY(1px);
}

/* =========================================================
   05. Header / Navigation
========================================================= */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding-top: 18px;
  color: var(--white);
  pointer-events: none;
}

.site-header,
.site-header a,
.site-header .nav__logo img,
.site-header .nav__burger {
  transition:
    color 200ms ease,
    opacity 200ms ease,
    filter 200ms ease,
    background 200ms ease,
    backdrop-filter 200ms ease,
    border-color 200ms ease;
}

.site-header a {
  color: inherit;
}

.site-header.is-dark {
  color: var(--black);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-header.is-dark .nav__logo img {
  filter: invert(1);
}

.site-header .btn,
.site-header .btn * {
  color: var(--white) !important;
}

.nav {
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: auto;
}

.nav__logo {
  width: fit-content;
  display: inline-flex;
  align-items: center;
}

.nav__logo img {
  width: 55px;
  height: 55px;
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0.9;
  font-size: 14px;
}

.nav__links a {
  padding: 10px 8px;
  border-radius: 8px;
}

.nav__links a:hover {
  opacity: 1;
}

.nav__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}

.nav__burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  position: relative;
  z-index: 1000001;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav__burger i,
.nav__burger svg {
  display: none;
}

.nav__burger::before {
  content: "";
  width: 22px;
  height: 14px;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  pointer-events: none;
}

.nav__burger:hover {
  opacity: 0.82;
}

.nav__burger:focus-visible {
  outline: 2px solid rgba(91, 42, 244, 0.75);
  outline-offset: 4px;
  border-radius: 8px;
}

/* =========================================================
   06. Mobile Menu
========================================================= */

body.is-menu-open {
  overflow: hidden;
}

.mnav {
  position: fixed;
  inset: 0;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: var(--white);
}

.mnav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mnav__panel {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 15, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 22px 22px 40px;
  pointer-events: auto;
}

.mnav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mnav__logo {
  display: inline-flex;
  align-items: center;
}

.mnav__logo img {
  width: 34px;
  height: 34px;
}

.mnav__close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1000001;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mnav__close span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
  pointer-events: none;
}

.mnav__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mnav__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
}

.mnav__links {
  display: grid;
  place-content: center;
  gap: 35px;
  text-align: center;
}

.mnav .mnav__links .mnav__link {
  width: fit-content;
  margin: 0 auto;
  font-family: "Satoshi", system-ui, sans-serif;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  opacity: 0.95;
  pointer-events: auto;
}

.mnav__link:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  .nav__links,
  .nav__actions .btn {
    display: none;
  }

  .nav__burger {
    display: inline-grid;
    place-items: center;
  }
}


/* =========================================================
   07. Custom Page Scrollbar
========================================================= */

.page-scrollbar {
  position: fixed;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 80;
  width: 14px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 220ms ease;
}

.page-scrollbar.is-visible {
  opacity: 1;
}

.page-scrollbar__track {
  position: relative;
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: #eaeaea;
  overflow: visible;
  transition:
    background 220ms ease,
    width 180ms ease,
    opacity 180ms ease;
}

.page-scrollbar__thumb {
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  min-height: 24px;
  border-radius: 999px;
  background: var(--purple);
  opacity: 1;
  cursor: grab;
  transform: translateX(-50%);
  transition:
    width 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.page-scrollbar:hover .page-scrollbar__track {
  width: 4px;
}

.page-scrollbar:hover .page-scrollbar__thumb {
  width: 7px;
  box-shadow: 0 0 10px rgba(91, 42, 244, 0.22);
}

.page-scrollbar.is-dark .page-scrollbar__track {
  background: #2a2a2a;
}

.page-scrollbar.is-dragging,
.page-scrollbar.is-dragging .page-scrollbar__thumb,
.is-scrollbar-dragging,
.is-scrollbar-dragging * {
  cursor: grabbing !important;
}

/* =========================================================
   08. Footer
========================================================= */

.site-footer {
  position: relative;
  background: var(--white);
  color: var(--black);
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.site-footer__inner {
  padding-top: clamp(42px, 5vw, 72px);
  padding-bottom: 28px;
}

.site-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(34px, 4vw, 52px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}

.site-footer__logo {
  width: fit-content;
  display: inline-flex;
}

.site-footer__logo img {
  width: clamp(64px, 6vw, 92px);
  height: auto;
  filter: invert(1);
}

.site-footer__social-block {
  display: grid;
  justify-items: end;
  gap: 14px;
}

.site-footer__social-text,
.site-footer__label {
  margin: 0;
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.site-footer__label {
  margin-bottom: 6px;
}

.site-footer__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer__socials a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  border: 1px solid rgba(17, 17, 17, 0.08);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.site-footer__socials a:hover {
  background: var(--purple);
  border-color: var(--purple);
  transform: translateY(-3px);
}

.site-footer__socials img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0);
}

.site-footer__socials a:hover img {
  filter: brightness(0) invert(1);
}

.site-footer__main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(34px, 5vw, 58px) 0;
}

.site-footer__nav,
.site-footer__note {
  display: grid;
  align-content: start;
  gap: 12px;
}

.site-footer__nav a {
  width: fit-content;
  color: rgba(17, 17, 17, 0.68);
  font-size: 15px;
  line-height: 1.1;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.site-footer__nav a:hover {
  color: var(--black);
  transform: translateX(4px);
}

.site-footer__note p:not(.site-footer__label) {
  margin: 0;
  max-width: 24ch;
  color: rgba(17, 17, 17, 0.62);
  font-size: 15px;
  line-height: 1.45;
}

.site-footer__bottom {
  min-height: 42px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.site-footer__bottom p {
  margin: 0;
  color: rgba(17, 17, 17, 0.52);
  font-size: 13px;
  line-height: 1.4;
}

/* =========================================================
   09. Global Responsive
========================================================= */

@media (max-width: 900px) {
  :root {
    --nav-height: 72px;
    --grid-margin: 24px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .site-header {
    padding-top: 10px;
  }

  .nav {
    width: calc(100% - 32px);
    height: var(--nav-height);
    grid-template-columns: auto 1fr auto;
  }

  .nav__logo img {
    width: 42px;
    height: 42px;
  }

  .nav__links {
    display: none;
  }

  .nav__actions {
    gap: 10px;
  }

  .nav__actions .btn {
    display: none;
  }

  .nav__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header.is-dark .nav__burger {
    color: var(--black);
  }

  .site-header.is-light .nav__burger,
  .site-header:not(.is-dark) .nav__burger {
    color: var(--white);
  }

  .page-scrollbar {
    display: none;
  }

  .site-footer__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__social-block {
    justify-items: start;
  }

  .site-footer__socials {
    justify-content: flex-start;
  }

  .site-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  :root {
    --nav-height: 68px;
    --grid-margin: 20px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .site-header {
    padding-top: 8px;
  }

  .nav {
    width: calc(100% - 32px);
  }

  .nav__logo img {
    width: 38px;
    height: 38px;
  }

  .mnav__panel {
    padding: 18px 20px 34px;
  }

  .mnav__logo img {
    width: 32px;
    height: 32px;
  }

  .mnav__links {
    gap: 40px;
  }

  .mnav__link {
    font-size: clamp(24px, 7vw, 34px);
  }

  .site-footer__inner {
    padding-top: 44px;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__socials a {
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   10. Reduced Motion
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media (min-width: 2200px) {
  :root {
    --max-width: 1470px;
    --nav-height: 94px;
    --btn-height: 45px;
    --grid-margin: 230px;
  }

  .nav__logo img {
    width: 64px;
    height: 64px;
  }

  .nav__links {
    gap: 34px;
    font-size: 15.5px;
  }

  .btn {
    padding-inline: 23px;
    font-size: 15.5px;
  }
}

@media (min-width: 2200px) {
  .site-footer .container {
    width: min(1900px, calc(100% - 180px));
  }

  .site-footer__inner {
    padding-top: 78px;
    padding-bottom: 34px;
  }

  .site-footer__top {
    padding-bottom: 58px;
  }

  .site-footer__logo img {
    width: 104px;
  }

  .site-footer__social-block {
    gap: 16px;
  }

  .site-footer__social-text,
  .site-footer__label {
    font-size: 13px;
    letter-spacing: 0.095em;
  }

  .site-footer__socials {
    gap: 12px;
  }

  .site-footer__socials a {
    width: 48px;
    height: 48px;
  }

  .site-footer__socials img {
    width: 20px;
    height: 20px;
  }

  .site-footer__main {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: clamp(80px, 8vw, 180px);
    padding: 58px 0;
  }

  .site-footer__nav {
    gap: 15px;
  }

  .site-footer__nav a {
    font-size: 17px;
    line-height: 1.15;
  }

  .site-footer__note p:not(.site-footer__label) {
    max-width: 28ch;
    font-size: 17px;
    line-height: 1.45;
  }

  .site-footer__bottom {
    min-height: 48px;
    padding-top: 26px;
  }

  .site-footer__bottom p {
    font-size: 14px;
  }
}