/*
 * From Uiverse.io by faxriddin20 - https://uiverse.io/faxriddin20/splendid-wolverine-24
 * MIT License, Copyright (c) faxriddin20 (Faxriddin)
 */

:root {
  --page: #081013;
  --surface: rgba(11, 20, 24, 0.68);
  --surface-solid: #0e171b;
  --text: #f4f7f5;
  --muted: #aebbb8;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #dceae4;
  --telegram: #2aabee;
  --content: 1180px;
  --header-height: 78px;
  --line-speed: 18s;
  --shimmer-speed: 10s;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--page);
}

.ambient-image,
.ambient-shade,
.vertical-drift,
.glass-shimmer {
  position: absolute;
  inset: 0;
}

.ambient-image {
  inset: -4%;
  background-image: url("./assets/meoz-background.jpg");
  background-position: center 62%;
  background-size: cover;
  transform: scale(1.06);
  will-change: transform;
}

.ambient-shade {
  background:
    linear-gradient(180deg, rgba(4, 10, 12, 0.18) 0%, rgba(4, 10, 12, 0.18) 38%, rgba(5, 12, 15, 0.82) 78%, var(--page) 100%),
    linear-gradient(90deg, rgba(4, 10, 12, 0.35), transparent 60%);
}

.vertical-drift {
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 70px,
    rgba(255, 255, 255, 0.026) 70px,
    rgba(255, 255, 255, 0.026) 71px
  );
  background-size: 142px 100%;
  animation: line-slide var(--line-speed) linear infinite;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

.glass-shimmer {
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.045) 50%, transparent 58%);
  background-size: 230% 100%;
  animation: glass-slide var(--shimmer-speed) infinite ease-in-out;
  pointer-events: none;
}

.cursor-light {
  position: fixed;
  top: -180px;
  left: -180px;
  z-index: 20;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 234, 228, 0.07), transparent 66%);
  pointer-events: none;
  transition: transform 120ms ease-out;
  mix-blend-mode: screen;
}

@keyframes line-slide {
  from { background-position: 0 0; }
  to { background-position: 142px 0; }
}

@keyframes glass-slide {
  from { background-position: -150% 0; }
  to { background-position: 150% 0; }
}

.site-header {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  display: flex;
  width: min(calc(100% - 48px), var(--content));
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  transform: translateX(-50%);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.site-nav {
  display: flex;
  gap: 30px;
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.site-nav a {
  position: relative;
  padding: 12px 0;
  transition: color 220ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-nav a:hover {
  color: white;
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  display: flex;
  width: min(calc(100% - 48px), var(--content));
  min-height: min(88svh, 900px);
  margin: 0 auto;
  align-items: center;
  padding: calc(var(--header-height) + 58px) 0 80px;
}

.hero-content {
  width: min(760px, 100%);
}

.eyebrow,
.section-index {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 700;
}

.eyebrow b,
.hero-copy b {
  font: inherit;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 11vw, 144px);
  font-weight: 630;
  line-height: 0.88;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
}

.hero-copy {
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.55;
}

.hero-copy span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7em;
}

.primary-link {
  display: inline-flex;
  min-width: 142px;
  height: 48px;
  margin-top: 34px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background: rgba(8, 16, 19, 0.3);
  backdrop-filter: blur(14px);
  font-size: 13px;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.primary-link svg,
.card-arrow svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.primary-link:hover {
  background: white;
  color: #0a1215;
  transform: translateY(-2px);
}

.scroll-cue {
  position: absolute;
  right: 0;
  bottom: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 42px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.scroll-cue i::after {
  position: absolute;
  inset: 0;
  background: white;
  content: "";
  animation: scroll-line 2.4s ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes scroll-line {
  50%, 100% { transform: translateX(100%); }
}

.content-section,
.contact-inner,
.site-footer {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.content-section {
  padding: 112px 0 16px;
}

.featured-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
}

.section-heading h2,
.contact-inner h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 560;
  line-height: 1;
}

.section-heading .section-index {
  margin-bottom: 14px;
}

.section-heading > p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.featured-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.featured-card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  min-height: 390px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: border-color 300ms ease, transform 260ms ease;
}

.card-surface {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(5, 11, 13, 0.2), rgba(5, 11, 13, 0.78)),
    var(--card-image);
  background-position: center, var(--card-position);
  background-size: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}

.featured-card:nth-child(2) .card-surface,
.project-card:nth-child(2) .card-surface {
  filter: sepia(0.18) hue-rotate(155deg) saturate(0.75);
}

.project-card:nth-child(3) .card-surface {
  filter: sepia(0.12) hue-rotate(300deg) saturate(0.85);
}

.project-card:nth-child(4) .card-surface {
  filter: contrast(1.05) saturate(0.65) brightness(1.08);
}

.featured-card::after,
.project-card__visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.08) 50%, transparent 66%);
  background-position: 150% 0;
  background-size: 250% 100%;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, background-position 800ms ease;
}

.featured-card:hover,
.project-card:hover .project-card__visual {
  border-color: rgba(255, 255, 255, 0.36);
}

.featured-card:hover .card-surface,
.project-card:hover .card-surface {
  transform: scale(1.035);
}

.featured-card:hover::after,
.project-card:hover .project-card__visual::after {
  background-position: -70% 0;
  opacity: 1;
}

.featured-card__top,
.featured-card__content {
  position: relative;
  z-index: 1;
}

.featured-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
}

.card-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: white;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.featured-card:hover .card-arrow,
.project-card:hover .card-arrow {
  background: white;
  color: #0a1215;
  transform: translate(2px, -2px);
}

.featured-card__content h3 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 560;
}

.featured-card__content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.projects-section {
  padding-bottom: 120px;
}

.project-grid {
  display: grid;
  gap: 28px 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-card {
  --rx: 0deg;
  --ry: 0deg;
  min-width: 0;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 260ms ease;
}

.project-card__visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-solid);
  transition: border-color 300ms ease;
}

.project-card__visual .card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(5, 11, 13, 0.26);
  backdrop-filter: blur(10px);
}

.project-card__meta {
  display: flex;
  padding-top: 15px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-card__meta p,
.project-card__meta > span {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 9px;
}

.project-card__meta h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 560;
}

.contact-section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(14, 17, 24, 0.68), rgba(34, 46, 71, 0.3), rgba(14, 17, 24, 0.68));
  background-size: 300% 300%;
  animation: contact-drift 16s ease infinite;
  backdrop-filter: blur(22px);
}

@keyframes contact-drift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.contact-inner {
  display: grid;
  align-items: end;
  gap: 40px;
  grid-template-columns: 1.5fr 0.8fr;
}

.contact-inner .section-index {
  margin-bottom: 18px;
}

.contact-inner h2 span {
  color: rgba(255, 255, 255, 0.42);
}

.contact-action {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.contact-action > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.meoz-telegram {
  position: relative;
  display: flex;
  width: 138px;
  height: 50px;
  padding: 0 13px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background-color: var(--telegram);
  box-shadow: 0 12px 32px rgba(42, 171, 238, 0.18);
  color: white;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.meoz-telegram__text {
  font-size: 15px;
  font-weight: 700;
  transition: opacity 200ms ease, transform 260ms ease;
}

.meoz-telegram__icon {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: white;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), margin 500ms ease;
}

.meoz-telegram:hover {
  box-shadow: 0 16px 38px rgba(42, 171, 238, 0.28);
  transform: translateY(-2px);
}

.meoz-telegram:hover .meoz-telegram__text {
  opacity: 0;
  transform: translateX(12px);
}

.meoz-telegram:hover .meoz-telegram__icon {
  margin-left: 43px;
  transform: rotate(50deg);
}

.telegram-handle {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.site-footer {
  display: grid;
  min-height: 110px;
  align-items: center;
  gap: 20px;
  grid-template-columns: 1fr auto 1fr;
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
}

.site-footer > :last-child {
  justify-self: end;
}

.visit-counter {
  display: flex;
  margin: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.visit-counter strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.visit-counter > span {
  width: 1px;
  height: 10px;
  margin: 0 3px;
  background: var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms ease var(--delay, 0ms),
    transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1) var(--delay, 0ms);
}

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

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-inner {
    grid-template-columns: 1fr 0.7fr;
  }

  .site-footer {
    padding: 28px 0;
    grid-template-columns: 1fr auto;
  }

  .visit-counter {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 66px;
  }

  .site-header,
  .hero,
  .content-section,
  .contact-inner,
  .site-footer {
    width: min(calc(100% - 32px), var(--content));
  }

  .site-nav {
    display: none;
  }

  .ambient-image {
    background-position: 58% 65%;
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav a:first-child,
  .site-nav a:last-child {
    display: none;
  }

  .hero {
    min-height: 82svh;
    padding-bottom: 58px;
  }

  .hero h1 {
    font-size: clamp(52px, 17vw, 68px);
    line-height: 0.92;
    white-space: nowrap;
  }

  .hero-copy {
    margin-top: 27px;
    font-size: 18px;
  }

  .scroll-cue {
    right: 2px;
    bottom: 25px;
  }

  .content-section {
    padding-top: 82px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    min-height: 330px;
  }

  .projects-section {
    padding-bottom: 86px;
  }

  .project-grid {
    gap: 24px 12px;
  }

  .project-card__meta h3 {
    font-size: 15px;
  }

  .contact-section {
    padding: 82px 0;
  }

  .contact-inner {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .site-footer > :last-child {
    margin: 0;
  }

  .visit-counter {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card__visual {
    aspect-ratio: 4 / 3;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
