:root {
  --bg: #0b0c0f;
  --panel: #0f1117;
  --text: #f4f5f7;
  --muted: rgba(244, 245, 247, 0.72);
  --muted-2: rgba(244, 245, 247, 0.55);
  --border: rgba(244, 245, 247, 0.12);
  --shadow: rgba(0, 0, 0, 0.35);
  --accent: #ffffff;
  --focus: rgba(255, 255, 255, 0.35);

  --container: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 24px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 900px at 20% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(900px 700px at 85% 10%, rgba(255, 255, 255, 0.05), transparent 55%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.45;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-200%);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  z-index: 50;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--focus); outline-offset: 3px; }

/* ── Scroll-reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Header entrance (per-element, left → right, bottom → up) ── */
@keyframes headerItemEnter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 12, 15, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner > * {
  opacity: 0;
  animation: headerItemEnter 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.header-inner > :nth-child(1) { animation-delay: 0ms; }
.header-inner > :nth-child(2) { animation-delay: 150ms; }
.header-inner > :nth-child(3) { animation-delay: 300ms; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.09);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Nav link — smooth text-scroll-up on hover */
.nav a {
  display: inline-flex;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  position: relative;
  height: 40px;
  align-items: center;
}
.nav a .nav-text {
  display: block;
  will-change: transform;
}
.nav a:hover .nav-text {
  animation: navScrollUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes navScrollUp {
  0%   { transform: translateY(0); opacity: 1; }
  35%  { transform: translateY(-100%); opacity: 0; }
  36%  { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.10); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted-2);
  font-size: 13px;
  white-space: nowrap;
}

.meta-pill {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.menu-btn:focus { outline: 2px solid var(--focus); outline-offset: 3px; }

.mobile-panel {
  display: none;
  padding: 12px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-panel a {
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--muted);
}
.mobile-panel a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ── Hero ── */
.hero {
  padding: 44px 0 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.04em;
}
.hero .sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
}

.hero-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 18px 45px var(--shadow);
}

.avatar {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.hero-card .label {
  color: var(--muted-2);
  margin-top: 14px;
  font-size: 13px;
}
.hero-card .name {
  margin: 6px 0 4px;
  font-weight: 680;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn.primary {
  background: rgba(255, 255, 255, 0.92);
  color: #111218;
  border-color: rgba(255, 255, 255, 0.85);
}
.btn.primary:hover { background: #ffffff; }
.btn:focus { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ── Sections ── */
.section {
  padding: 34px 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.section-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.section-title .hint {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
}

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

/* ── Cards ── */
.card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 35px var(--shadow);
}
.card[data-reveal] {
  transition: opacity 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card.reveal-done {
  transition: transform 180ms ease;
}
.card:hover { transform: translateY(-2px); }

.card-media {
  aspect-ratio: 1200 / 816;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card-media img {
  transform: scale(1.06);
}
.card-body {
  padding: 14px 14px 16px;
}
.card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 12px;
}
.card-title {
  margin: 10px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

/* ── Panel ── */
.panel {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 16px;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.list li:last-child { border-bottom: none; }
.list .primary { font-weight: 650; }
.list .secondary { color: var(--muted); font-size: 14px; }

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
}

/* ── Footer ── */
.site-footer {
  padding: 34px 0 44px;
  color: var(--muted-2);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}
.footer-title { color: var(--text); font-weight: 650; }
.footer-links a { color: var(--muted-2); }
.footer-links a:hover { color: var(--text); }

/* ── Form ── */
form .field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
label { font-size: 13px; color: var(--muted-2); }
input, textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 12px 12px;
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 3px; }

.note {
  color: var(--muted-2);
  font-size: 13px;
  margin: 10px 0 0;
}

/* ── Carousel ── */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.carousel-track.is-dragging {
  cursor: grabbing;
  transition: none;
}
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 16px;
}
.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-btn:hover { background: rgba(255, 255, 255, 0.08); }
.carousel-btn:focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.carousel-dots {
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}
.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

/* ── Telegram card ── */
.tg-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 22px 24px;
  min-height: 220px;
  transition: background 0.25s;
}
.tg-card:hover { background: rgba(255, 255, 255, 0.07); }
.tg-date {
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tg-body {
  flex: 1;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.tg-body p { margin: 0 0 8px; }
.tg-body p:last-child { margin-bottom: 0; }
.tg-body strong { color: var(--text); font-weight: 600; }
.tg-note {
  color: var(--muted-2);
  font-size: 13px;
  font-style: italic;
}
.tg-channel {
  color: var(--muted-2);
  font-size: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* 3-up on desktop */
@media (min-width: 921px) {
  .carousel-track { gap: 16px; cursor: default; }
  .carousel-slide { flex: 0 0 calc((100% - 32px) / 3); }
  .carousel-controls { display: none; }
}

/* ── Large screens (MacBook 16 / ultrawide) ── */
@media (min-width: 1440px) {
  :root { --container: 1360px; }
  .hero h1 { font-size: 60px; }
  .grid-3 { gap: 22px; }
  .grid-2 { gap: 22px; }
  .container { padding: 28px; }
}
@media (min-width: 1800px) {
  :root { --container: 1560px; }
  .hero h1 { font-size: 66px; }
  .container { padding: 32px; }
}

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

@media (max-width: 640px) {
  .nav, .meta { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-panel[data-open="true"] { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .container { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .header-inner > * { opacity: 1; animation: none; }
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
