:root {
  --bg: #0B0D12;
  --surface: rgba(18, 22, 31, 0.78);
  --surface-solid: #12161F;
  --border: rgba(35, 41, 56, 0.9);
  --ink: #F8FAFC;
  --muted: #94A3B8;
  --violet: #8B5CF6;
  --mint: #10B981;
  --cyan: #38BDF8;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "FiraGO", "Noto Sans Georgian", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

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

/* Live Background Canvas */
.graph-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.ambient-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 75% 22%, rgba(139, 92, 246, 0.14), transparent 46%),
    radial-gradient(circle at 22% 78%, rgba(16, 185, 129, 0.11), transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(11, 13, 18, 0.14), rgba(11, 13, 18, 0.72) 100%);
  transition: opacity 1.4s var(--ease) 0.45s;
}

body.stage-ready .ambient-vignette {
  opacity: 1;
}

/* Locked Single-Viewport App Shell */
.app-shell {
  position: relative;
  z-index: 5;
  height: 100dvh;
  max-width: 1040px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

/* Chrome (Topbar & Mobile Dock) unfolds gently near end of logo expansion */
.chrome-reveal {
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition: opacity 0.85s var(--ease) 1.05s, transform 0.85s var(--ease) 1.05s;
}

.chrome-reveal-bottom {
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transition: opacity 0.85s var(--ease) 1.1s, transform 0.85s var(--ease) 1.1s;
}

body.stage-ready .chrome-reveal,
body.stage-ready .chrome-reveal-bottom {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.brand-btn {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 4px;
}

.brand-mini {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}

.node-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 0 2px;
  background: linear-gradient(135deg, var(--violet), var(--mint));
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.9);
  animation: dotBreathe 2.8s ease-in-out infinite;
}

/* Desktop Nav */
.desktop-tabs {
  display: none;
  position: relative;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.nav-indicator,
.dock-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.45);
  transition: transform 0.36s var(--ease);
}

.nav-tab,
.dock-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: "Space Grotesk", "FiraGO", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-tab {
  min-width: 96px;
  height: 36px;
}

.nav-tab.is-active,
.dock-btn.is-active {
  color: var(--ink);
}

/* Main Stage */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.view {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.view:not(#view-main) {
  animation: viewEnter 0.42s var(--ease) both;
}

.view[hidden] {
  display: none;
}

/* TAB 1: MAIN — Unified Organic Bloom Out of the Logo Core */
.main-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.hero-logo-lockup {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Starts centered lower in viewport, then lifts gently upward as content unfolds underneath */
  transform: translateY(58px) scale(0.92);
  transition: transform 1.15s var(--ease) 0.55s;
}

body.stage-ready .hero-logo-lockup {
  transform: translateY(0) scale(1);
}

.core-halo {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.36) 0%, rgba(16, 185, 129, 0.14) 42%, transparent 72%);
  transform: scale(0.1);
  opacity: 0;
  pointer-events: none;
  transition: transform 1.2s var(--ease), opacity 0.9s var(--ease);
}

body.stage-ready .core-halo {
  transform: scale(1.15);
  opacity: 1;
}

.hero-wordmark {
  position: relative;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.85rem, 14vw, 5.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}

.hero-node {
  display: inline-block;
  width: clamp(11px, 3vw, 18px);
  height: clamp(11px, 3vw, 18px);
  border-radius: 50%;
  margin: 0 4px;
  background: linear-gradient(135deg, var(--violet), var(--mint));
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.95), 0 0 42px rgba(16, 185, 129, 0.65);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.65s var(--ease) 0.05s, opacity 0.45s ease 0.05s;
}

body.stage-ready .hero-node {
  transform: scale(1);
  opacity: 1;
  animation: dotBreathe 2.8s ease-in-out 1.4s infinite;
}

/* Wordmark halves bloom symmetrically out of the center glowing node */
.wm-left,
.wm-right {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transition: transform 0.85s var(--ease) 0.22s, opacity 0.7s ease 0.22s, filter 0.7s ease 0.22s;
}

.wm-left {
  transform: translateX(26px) scale(0.84);
}

.wm-right {
  transform: translateX(-18px) scale(0.84);
}

body.stage-ready .wm-left,
body.stage-ready .wm-right {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0) scale(1);
}

/* Slogan expands softly out from compressed position right under the logo */
.hero-slogan {
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  font-weight: 600;
  color: #E2E8F0;
  letter-spacing: -0.01em;
}

.unfold-slogan {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(-22px) scale(0.76);
  transition: opacity 0.95s var(--ease) 0.68s, transform 0.95s var(--ease) 0.68s, filter 0.85s ease 0.68s;
}

body.stage-ready .unfold-slogan {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.kinetic-accent {
  display: inline-block;
  background: linear-gradient(90deg, #A78BFA, #10B981, #38BDF8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.24s ease, transform 0.24s var(--ease);
}

.kinetic-accent.is-swapping {
  opacity: 0;
  transform: translateY(5px);
}

/* Scope pills spring outward radially from the center of the logo */
.scope-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 520px;
}

.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #CBD5E1;
  background: rgba(18, 22, 31, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.unfold-pill {
  opacity: 0;
  filter: blur(4px);
  transform: translate(var(--ox, 0px), var(--oy, -32px)) scale(0.45);
  transition:
    opacity 0.85s var(--ease) calc(0.84s + var(--i, 0) * 0.08s),
    transform 0.95s var(--ease) calc(0.84s + var(--i, 0) * 0.08s),
    filter 0.8s ease calc(0.84s + var(--i, 0) * 0.08s);
}

body.stage-ready .unfold-pill {
  opacity: 1;
  filter: blur(0);
  transform: translate(0, 0) scale(1);
}

.p-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.p-dot.violet { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.p-dot.mint { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.p-dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* View Heads (Blog & Contact) */
.view-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.view-head {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--mint);
  margin-bottom: 6px;
}

.view-head h2 {
  font-size: clamp(1.35rem, 5.5vw, 2rem);
  font-weight: 700;
}

.view-sub {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* TAB 2: BLOG */
.blog-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}

.blog-rail::-webkit-scrollbar {
  display: none;
}

.blog-card {
  flex: 0 0 82vw;
  max-width: 320px;
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s ease;
}

.blog-card:hover,
.blog-card:active {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.55);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  padding: 4px 8px;
  border-radius: 6px;
}

.tag.violet { color: #C4B5FD; background: rgba(139, 92, 246, 0.15); }
.tag.mint { color: #6EE7B7; background: rgba(16, 185, 129, 0.15); }
.tag.cyan { color: #7DD3FC; background: rgba(56, 189, 248, 0.15); }

.state {
  font-size: 0.7rem;
  color: var(--muted);
}

.blog-card h3 {
  font-size: 1.02rem;
  line-height: 1.3;
}

.blog-card p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.card-more {
  font-size: 0.76rem;
  color: var(--mint);
}

.rail-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.rail-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  transition: width 0.25s var(--ease), background 0.25s ease;
}

.rail-dots .dot.is-active {
  width: 20px;
  background: var(--mint);
}

/* TAB 3: CONTACT */
.contact-inner {
  align-items: center;
}

.social-grid {
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: transform 0.22s var(--ease), border-color 0.22s ease, box-shadow 0.22s ease;
}

.social-card:active {
  transform: scale(0.97);
}

.social-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon svg {
  width: 42px;
  height: 42px;
  transition: transform 0.25s var(--ease);
}

.social-card:hover .social-icon svg {
  transform: scale(1.1);
}

.sc-telegram { color: #38BDF8; }
.sc-telegram:hover { border-color: rgba(56, 189, 248, 0.6); box-shadow: 0 8px 26px rgba(56, 189, 248, 0.16); }

.sc-instagram { color: #C084FC; }
.sc-instagram:hover { border-color: rgba(192, 132, 252, 0.6); box-shadow: 0 8px 26px rgba(139, 92, 246, 0.18); }

.sc-tiktok { color: #10B981; }
.sc-tiktok:hover { border-color: rgba(16, 185, 129, 0.6); box-shadow: 0 8px 26px rgba(16, 185, 129, 0.16); }

.sc-youtube { color: #F87171; }
.sc-youtube:hover { border-color: rgba(248, 113, 113, 0.6); box-shadow: 0 8px 26px rgba(248, 113, 113, 0.16); }

.social-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
}

.social-handle {
  color: var(--muted);
  font-size: 0.72rem;
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.email-pill:hover {
  border-color: var(--mint);
}

.email-pill:active {
  transform: scale(0.98);
}

.copy-hint {
  font-size: 0.7rem;
  color: var(--mint);
  padding-left: 6px;
  border-left: 1px solid var(--border);
}

/* Mobile Bottom Floating Pill Dock */
.mobile-dock {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(18, 22, 31, 0.86);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.dock-btn {
  height: 44px;
}

/* Minimal Blog Sheet Modal */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.sheet-backdrop[hidden] {
  display: none;
}

.sheet-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: viewEnter 0.3s var(--ease) both;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.sheet-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.sheet-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--violet), #6D28D9);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dotBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.24); }
}

@media (max-height: 700px) {
  .main-center { gap: 14px; }
  .social-card { padding: 14px 10px; gap: 6px; }
  .social-icon svg { width: 34px; height: 34px; }
}

@media (min-width: 720px) {
  .app-shell {
    padding: 20px 28px 28px;
  }

  .desktop-tabs {
    display: inline-grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .mobile-dock {
    display: none;
  }

  .blog-rail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    overflow: visible;
  }

  .blog-card {
    flex: initial;
    max-width: none;
  }

  .rail-dots {
    display: none;
  }

  .social-grid {
    max-width: 760px;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .social-card {
    padding: 28px 14px;
  }

  .social-icon svg {
    width: 50px;
    height: 50px;
  }

  .sheet-backdrop {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
