:root {
  --bg: #08090f;
  --bg-2: #0f1219;
  --surface: rgba(22, 25, 34, 0.72);
  --text: #e8eaf0;
  --muted: #8b92a6;
  --accent: #5b8cff;
  --accent-2: #b06cff;
  --accent-3: #00e0b8;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 20px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
body::before, body::after {
  content: "";
  position: fixed;
  width: 700px; height: 700px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.28;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -250px; left: -250px;
  animation: float1 22s ease-in-out infinite;
}
body::after {
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  bottom: -250px; right: -250px;
  animation: float2 28s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(140px,100px) scale(1.2);} }
@keyframes float2 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-120px,-80px) scale(1.15);} }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; position: relative; }

/* ===== Header ===== */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 9, 15, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky; top: 0; z-index: 100;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo {
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.logo::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-3); box-shadow: 0 0 14px var(--accent-3);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.5;transform:scale(0.85);} }

.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; padding: 8px 16px; border-radius: 10px;
  font-size: 0.94rem; font-weight: 500; transition: all 0.25s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

main { flex: 1; padding: 0 0 100px; }

/* ===== HERO ===== */
.hero { position: relative; padding: 90px 0 0; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border: 1px solid var(--border-strong);
  border-radius: 100px; background: rgba(255,255,255,0.03);
  color: var(--muted); font-size: 0.84rem; letter-spacing: 0.02em;
  margin-bottom: 28px; backdrop-filter: blur(10px);
}
.hero .badge span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 2s infinite;
}
.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.8rem);
  line-height: 1.02; font-weight: 800;
  letter-spacing: -0.04em; margin-bottom: 24px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p {
  color: var(--muted); font-size: 1.15rem;
  max-width: 640px; margin: 0 auto 40px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Hero big image */
.hero-visual {
  margin-top: 70px; position: relative;
  height: clamp(360px, 55vw, 560px);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden; border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: 0 -40px 100px -40px rgba(91,140,255,0.4);
}
.hero-visual img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.85; filter: saturate(1.15) contrast(1.05);
}
.hero-visual::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, var(--bg) 100%),
    radial-gradient(ellipse at top, transparent 20%, rgba(8,9,15,0.65) 85%);
  pointer-events: none;
}
.hero-visual .overlay-stat {
  position: absolute; bottom: 32px; left: 32px; right: 32px;
  display: flex; gap: 16px; z-index: 2; flex-wrap: wrap;
}
.stat {
  flex: 1; min-width: 130px; padding: 16px 20px;
  background: rgba(8,9,15,0.6); backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); border-radius: 14px;
}
.stat b {
  display: block; font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat small { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 12px;
  text-decoration: none; font-weight: 600; font-size: 0.96rem;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 12px 40px -12px var(--accent);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 55px -15px var(--accent); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { background: rgba(255,255,255,0.07); transform: translateY(-3px); }

/* ===== Page head ===== */
.page-head { padding: 90px 0 50px; text-align: center; }
.page-head h1 {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800;
  letter-spacing: -0.035em; margin-bottom: 14px;
}
.page-head h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto; }

/* ===== Section ===== */
.section { margin-top: 100px; }
.section-head {
  margin-bottom: 40px;
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.1;
}
.section-head h2 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-head p { color: var(--muted); font-size: 1rem; max-width: 380px; }

/* ===== Intro split ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.split-text h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.1; margin-bottom: 18px;
}
.split-text h2 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.split-text p { color: var(--muted); font-size: 1.04rem; margin-bottom: 16px; }
.split-text .features { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.split-text .features li {
  display: flex; gap: 12px; align-items: flex-start;
  color: var(--text); font-size: 0.98rem;
}
.split-text .features li::before {
  content: ""; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(91,140,255,0.25), rgba(176,108,255,0.25));
  border: 1px solid rgba(91,140,255,0.5);
  display: inline-flex; margin-top: 2px;
  background-image:
    linear-gradient(135deg, rgba(91,140,255,0.25), rgba(176,108,255,0.25)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e0b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: cover, 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
}

.split-photo {
  position: relative;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 80px -40px rgba(91,140,255,0.4);
}
.split-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s cubic-bezier(0.4,0,0.2,1);
}
.split-photo:hover img { transform: scale(1.05); }
.split-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8,9,15,0.7) 100%);
  pointer-events: none;
}
.split-photo .badge-float {
  position: absolute; top: 24px; left: 24px;
  padding: 8px 14px; background: rgba(8,9,15,0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong); border-radius: 100px;
  font-size: 0.78rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent-3);
  z-index: 2;
}

/* ===== Masonry gallery ===== */
.masonry {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 18px;
}
.masonry .photo-card { height: 100%; }
.masonry .w-2 { grid-column: span 2; }
.masonry .w-3 { grid-column: span 3; }
.masonry .w-4 { grid-column: span 4; }
.masonry .h-2 { grid-row: span 2; }
.masonry .h-3 { grid-row: span 3; }

.photo-card {
  position: relative; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), border-color 0.3s;
  min-height: 200px;
}
.photo-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.photo-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s cubic-bezier(0.4,0,0.2,1);
}
.photo-card:hover img { transform: scale(1.08); }
.photo-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,9,15,0.95) 100%);
  pointer-events: none;
}
.photo-card .meta {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px 26px; z-index: 2;
}
.photo-card .meta h3 {
  font-size: 1.18rem; margin-bottom: 4px; font-weight: 700;
  letter-spacing: -0.01em;
}
.photo-card .meta p { color: var(--muted); font-size: 0.88rem; }
.photo-card .tag {
  display: inline-block; padding: 4px 10px;
  background: rgba(91,140,255,0.15); border: 1px solid rgba(91,140,255,0.4);
  color: #a8c0ff; border-radius: 100px;
  font-size: 0.7rem; font-weight: 600;
  margin-bottom: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ===== Parallax band ===== */
.band {
  margin-top: 100px;
  position: relative;
  padding: 120px 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.band-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  filter: saturate(1.1) brightness(0.5);
  z-index: 0;
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,9,15,0.55) 0%, rgba(8,9,15,0.85) 100%);
  z-index: 1;
}
.band-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.band-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.15; margin-bottom: 20px;
}
.band-content h2 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.band-content p { color: #b8c0d4; font-size: 1.1rem; margin-bottom: 32px; }

/* ===== Grid cards ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  backdrop-filter: blur(14px);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover::before { opacity: 1; }
.card:hover {
  border-color: rgba(91,140,255,0.32);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -30px rgba(91,140,255,0.55);
}
.card .icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(91,140,255,0.2), rgba(176,108,255,0.2));
  border: 1px solid rgba(91,140,255,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ===== Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.4,0,0.2,1),
              transform 0.9s cubic-bezier(0.4,0,0.2,1);
}
.reveal.on { opacity: 1; transform: translateY(0); }

/* ===== Form ===== */
.form {
  display: grid; gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px; backdrop-filter: blur(14px);
}
.form label {
  font-size: 0.88rem; color: var(--muted);
  display: block; margin-bottom: 8px; font-weight: 500;
}
.form input, .form textarea {
  width: 100%; padding: 14px 18px;
  background: rgba(8,9,15,0.6);
  border: 1px solid var(--border-strong);
  border-radius: 12px; color: var(--text);
  font-family: inherit; font-size: 0.96rem;
  transition: all 0.25s;
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,140,255,0.15);
}
.form textarea { resize: vertical; min-height: 150px; }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0; color: var(--muted);
  font-size: 0.88rem;
  background: rgba(8,9,15,0.6);
  backdrop-filter: blur(10px);
}
footer .container {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ===== Login ===== */
.login-wrap {
  min-height: calc(100vh - 72px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.login-box {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.9);
  backdrop-filter: blur(16px);
}
.login-box h1 { font-size: 1.4rem; margin-bottom: 6px; text-align: center; }
.login-box .sub { color: var(--muted); font-size: 0.9rem; text-align: center; margin-bottom: 28px; }
.login-box input {
  width: 100%; padding: 13px 16px;
  background: rgba(8,9,15,0.65);
  border: 1px solid var(--border-strong);
  border-radius: 12px; color: var(--text);
  font-size: 0.96rem; font-family: inherit;
}
.login-box input:focus { outline: none; border-color: var(--accent); }
.login-box button {
  width: 100%; margin-top: 18px; padding: 13px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600; font-size: 0.96rem;
  cursor: pointer; transition: all 0.2s;
}
.login-box button:hover { transform: translateY(-1px); }
.login-box button:disabled { opacity: 0.6; cursor: wait; }
.login-error {
  color: #ff6b6b; font-size: 0.86rem;
  text-align: center; margin-top: 14px; min-height: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-photo { height: 380px; }
  .masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .masonry .w-3, .masonry .w-4 { grid-column: span 2; }
  .masonry .h-3 { grid-row: span 2; }
}
@media (max-width: 720px) {
  .nav-links a { padding: 6px 10px; font-size: 0.86rem; }
  .hero { padding: 60px 0 0; }
  .hero-visual { height: 380px; }
  .band { padding: 80px 0; border-radius: var(--radius); }
  .card { padding: 26px; }
  .form { padding: 26px; }
  .section { margin-top: 70px; }
}
/* Служебная кнопка в шапке */
.nav-svc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-left: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(91,140,255,0.15), rgba(176,108,255,0.15));
  border: 1px solid rgba(91,140,255,0.35);
  color: #c8d4ff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  white-space: nowrap;
}
.nav-svc::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 8px var(--accent-3);
  animation: pulse 2s infinite;
}
.nav-svc:hover {
  background: linear-gradient(135deg, rgba(91,140,255,0.3), rgba(176,108,255,0.3));
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Футер — видимая ссылка */
.footer-svc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b8c0d4 !important;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-svc:hover { color: var(--accent-3) !important; }

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 10px; }
  .nav > nav { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .nav-svc { padding: 6px 10px; font-size: 0.78rem; margin-left: 6px; }
  .nav-svc span { display: none; }
}