/* =============================================
   HERO — scroll canvas section
============================================= */
.hero {
  height: 400vh;
  position: relative;
}
@media (max-width: 1024px) { .hero { height: 350vh; } }
@media (max-width: 768px)  { .hero { height: 100vh; } }

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hero__loading {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
  transition: opacity 0.7s var(--ease-out);
}
.hero__loading-track {
  width: 180px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.hero__loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  border-radius: 2px;
  transition: width 0.3s ease;
}
.hero__loading-label {
  font-family: var(--font-title);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
}

@keyframes heroGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (max-width: 768px) {
  #hero-canvas,
  #hero-loading { display: none; }

  .hero__sticky {
    background:
      linear-gradient(135deg,
        #0d0d0d 0%, #141a09 20%, #0a0f1a 40%,
        #180d0a 60%, #0d1018 80%, #0d0d0d 100%
      );
    background-size: 400% 400%;
    animation: heroGradientShift 10s ease infinite;
  }

  .js-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(13,13,13,0.82) 0%, rgba(13,13,13,0.45) 45%,
      rgba(13,13,13,0.10) 75%, transparent 100%
    ),
    linear-gradient(to top, rgba(13,13,13,0.5) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-areas:
    "brand nav"
    "content ."
    "cta    .";
  grid-template-rows: 72px 1fr auto;
  grid-template-columns: 1fr 1fr;
  padding: 36px 48px 44px;
  pointer-events: none;
}
@media (max-width: 1024px) { .hero__overlay { padding: 28px 36px 36px; } }
@media (max-width: 768px)  {
  .hero__overlay {
    padding: 24px 24px 40px;
    grid-template-columns: 1fr auto;
    grid-template-rows: 64px 1fr auto;
    grid-template-areas:
      "brand  burger"
      "content content"
      "cta    cta";
  }
}

.hero__brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  align-self: center;
}
.hero__brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(199,205,60,0.7);
  flex-shrink: 0;
}
.hero__brand span {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.hero__nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 36px;
  pointer-events: all;
}
.hero__nav-link {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  position: relative;
  transition: color 0.25s ease;
}
.hero__nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.hero__nav-link:hover { color: var(--accent); }
.hero__nav-link:hover::after { width: 100%; }
@media (max-width: 768px) { .hero__nav { display: none; } }

.hero__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding-bottom: 48px;
}
.hero__title {
  font-family: var(--font-title);
  font-size: clamp(52px, 7.5vw, 108px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero__title-accent { color: var(--accent); display: inline-block; }
.hero__subtitle {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  max-width: 360px;
}
@media (max-width: 600px) {
  .hero__subtitle br { display: none; }
  .hero__subtitle { max-width: 100%; }
}

.hero__cta {
  grid-area: cta;
  display: flex;
  align-items: center;
  gap: 32px;
  padding-bottom: 8px;
  pointer-events: all;
}
.hero__scroll-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-dim);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-title);
}
.hero__scroll-arrow {
  opacity: 0.5;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
.scroll-dot { animation: scrollDot 2s ease-in-out infinite; }
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  50%  { transform: translateY(6px); opacity: 0.3; }
  100% { transform: translateY(0); opacity: 1; }
}

.js-reveal {
  opacity: 0;
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.js-reveal:not([data-direction]) { transform: translateY(-14px); }
.js-reveal[data-direction="left"] { transform: translateX(-44px); }
.js-reveal[data-direction="up"]   { transform: translateY(24px); }
.js-reveal.visible { opacity: 1; transform: none; }

/* =============================================
   PORTFOLIO
============================================= */
.portfolio {
  padding: 120px 0 100px;
  position: relative;
}
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 28px;
}
@media (max-width: 900px) {
  .portfolio__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

.case {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.case:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(-6px);
}
.case__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
  gap: 12px;
}
.case__name {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.case__type {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.case__info { flex: 1; min-width: 0; }
.case__link-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.case__link-btn:hover {
  background: var(--accent);
  color: #0d0d0d;
  border-color: var(--accent);
  transform: scale(1.08) rotate(45deg);
}
.case__image {
  position: relative;
  margin: 20px 24px;
  border-radius: 12px;
  overflow: hidden;
}
.case__placeholder {
  height: 220px;
  width: 100%;
  border-radius: 12px;
  transition: transform 0.5s var(--ease-out);
}
.case:hover .case__placeholder { transform: scale(1.04); }
.case__placeholder--1 { background: linear-gradient(135deg, #1a1440 0%, #2d1b69 40%, #0f0a2e 100%); }
.case__placeholder--2 { background: linear-gradient(135deg, #1a0f00 0%, #3d2000 40%, #7a4200 100%); }
.case__placeholder--3 { background: linear-gradient(135deg, #0a1a0a 0%, #0f2e0f 40%, #1a4a0f 100%); }
.case__hover-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text);
  background: rgba(13,13,13,0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}
.case:hover .case__hover-label { opacity: 1; }
.case__desc {
  padding: 0 24px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* =============================================
   PARTNERS MARQUEE
============================================= */
.partners { padding: 80px 0; overflow: hidden; }
.partners .container { margin-bottom: 32px; }
.partners__wrap {
  display: flex;
  gap: 40px;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}
.partners__track {
  display: flex;
  gap: 40px;
  flex-shrink: 0;
  min-width: 100%;
  animation: marquee 18s linear infinite;
}
.partners__wrap:hover .partners__track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% - 40px)); }
}
.partners__item {
  height: 72px;
  padding: 0 32px;
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.partners__item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(199,205,60,0.04);
}
a.partners__item:hover img {
  filter: grayscale(0) brightness(1) !important;
}

/* =============================================
   SERVICES
============================================= */
.services { padding: 100px 0 120px; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .services__grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
  cursor: default;
}
.service-card:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}
.service-card__num {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.service-card__title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.service-card__text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  flex: 1;
}
.service-card__arrow {
  font-size: 20px;
  color: var(--muted-dim);
  margin-top: 8px;
  transition: color 0.25s ease, transform 0.25s ease;
  display: inline-block;
}
.service-card:hover .service-card__arrow { color: var(--accent); transform: translateX(4px); }
@media (max-width: 600px) { .service-card { padding: 28px 24px; } }

/* =============================================
   CONTACTS
============================================= */
.contacts { padding: 100px 0 120px; }
.contacts__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) { .contacts__inner { grid-template-columns: 1fr; gap: 60px; } }

.contacts__left { padding-top: 8px; }
.contacts__left .section-title { margin: 12px 0 48px; }
.contacts__socials { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.contacts__socials a {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.25s ease, letter-spacing 0.25s ease;
  display: inline-block;
}
.contacts__socials a:hover { color: var(--accent-alt); letter-spacing: 0.04em; }
.contacts__email {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 6px;
  display: inline-block;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.contacts__email:hover { color: var(--text); border-color: rgba(255,255,255,0.4); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}
@media (max-width: 600px) { .contact-form { padding: 28px 24px; } }

.contact-form__title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--text);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-group label {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-group label span { color: var(--accent); }
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  color: #efefef;
  caret-color: var(--accent);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.38); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(199,205,60,0.5);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(199,205,60,0.08);
  outline: none;
}
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: #efefef;
  -webkit-box-shadow: 0 0 0 1000px #1e1e1e inset;
  caret-color: var(--accent);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group.has-error input,
.form-group.has-error textarea { border-color: rgba(220,60,60,0.6); }

.contact-form .btn--full {
  margin-top: 8px;
  background: var(--accent);
  color: #0d0d0d;
  border-radius: 12px;
  height: 52px;
  font-size: 14px;
  letter-spacing: 0.12em;
}
.contact-form .btn--full:hover {
  background: var(--accent-alt);
  box-shadow: 0 0 24px rgba(199,205,60,0.3);
}
.contact-form .btn--full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
