/* ==========================================================================
   UzOS — O'zbekiston Milliy Operatsion Tizimi
   1:1 TON.org Minimalist Design System & Unified Grid Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Exact TON.org Color Palette */
  --color-background: #10161f;
  --color-surface: #101b2a;
  --color-surface-tint: rgba(16, 27, 42, 0.8);
  --color-surface-shadow: rgba(255, 255, 255, 0.05);

  --color-accent: #1eaefb;
  --color-accent-hover: #0f9fe9;

  --color-white: #ffffff;
  --color-muted: #93a5b8;
  --color-muted-dark: #627284;
  --color-border: rgba(147, 165, 184, 0.14);
  --color-border-hover: rgba(30, 174, 251, 0.35);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1240px;
  --header-height: 72px;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-white);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--color-background);
  color: var(--color-white);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Radial Glow SVGs (1:1 TON.org Multi-mesh) */
.ambient-glow-wrapper {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1440px;
  height: 660px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-glow-svg {
  width: 100%;
  height: 100%;
}

.landing-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ==========================================================================
   Header (1:1 TON.org Style: Left Logo + Right Minimalist White Text Links)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background-color: transparent;
  border-bottom: 0.5px solid transparent;
  transition: background-color 0.2s ease, border-bottom-color 0.2s ease, backdrop-filter 0.2s ease;
}

.site-header.scrolled {
  background-color: rgba(16, 22, 31, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid #364459;
}

.inner-header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 28px;
  height: 28px;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* TON.org _nav_ccy_S: right-aligned, gap 48px, pure white text links */
.site-nav {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-link {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   Section Labels (1:1 TON.org _badge_DqXMW: Shunchaki Ko'k Yozuv, Kartochkasiz)
   ========================================================================== */
.section-label {
  color: var(--color-accent);
  display: block;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  margin: 0 0 14px 0;
  text-transform: uppercase;
  white-space: nowrap;
  width: fit-content;
}

/* ==========================================================================
   Hero Section (1:1 TON.org Main Text Typography & Layout)
   ========================================================================== */
.section-hero {
  padding-top: calc(var(--header-height) + 54px);
  padding-bottom: 70px;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  z-index: 2;
  position: relative;
  width: 100%;
  max-width: 520px;
}

/* TON.org _heading_SRZB1 _hero_FAhG- _title_LpTcC (1:1 with .heading-title) */
.hero-title {
  font-size: clamp(30px, 3.1vw, 40px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 28px 0;
  padding: 0;
  max-width: 520px;
  color: #ffffff;
  font-family: var(--font-sans);
  text-align: left;
  width: 100%;
}

.split-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

.split-title > span {
  display: block;
  white-space: nowrap;
  text-align: left;
}

.telegram-phrase {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.telegram-phrase:hover {
  opacity: 0.85;
}

.telegram-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.12em;
  margin: 0 6px 0 4px;
}

.telegram-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   TON.org 1:1 Metric Badges (Row 1: 3 badges | Row 2: 2 badges)
   ========================================================================== */
.ton-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  list-style: none;
  margin: 0;
  max-width: 520px;
  padding: 0;
  justify-content: flex-start;
  align-items: flex-start;
}

.ton-badge-item {
  display: inline-flex;
  margin: 0;
  width: fit-content;
}

.ton-badge-card {
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(16, 27, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  box-shadow: inset 1px 1px 1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  color: var(--color-white);
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  gap: 6px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 18px;
  padding: 7px 13px;
  white-space: nowrap;
  width: fit-content;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ton-badge-card:hover {
  background: rgba(26, 38, 56, 0.9);
  border-color: rgba(30, 174, 251, 0.35);
}

.ton-badge-card .metric-val {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 18px;
}

.ton-badge-card .metric-lbl {
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 18px;
}

/* 3D Binary Matrix Globe Container (Right-aligned with Docs nav at the top) */
.hero-visual-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 1;
}

.globe-canvas-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#hero-globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#hero-globe-canvas:active {
  cursor: grabbing;
}

/* ==========================================================================
   Section Common
   ========================================================================== */
.section {
  padding: 80px 0;
  position: relative;
}

.section-heading {
  margin-bottom: 40px;
}

.heading-title {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #fff;
  line-height: 1.2;
}

/* ==========================================================================
   Technological Superiority (1:1 TON.org Unified Cards Grid Container)
   class="_featuresLinks_qWwV4" and "_list_fJLG_" and "_card_YMOBA"
   ========================================================================== */
.features-unified-container {
  background: rgba(16, 27, 42, 0.75);
  box-shadow: inset 1px 1px 1px 0 var(--color-surface-shadow);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-cell {
  padding: 36px 32px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: background-color 0.2s ease;
  position: relative;
}

/* Remove right border on 3rd column */
.feature-cell:nth-child(3n) {
  border-right: none;
}

/* Remove bottom border on last row */
.feature-cell:nth-last-child(-n+3) {
  border-bottom: none;
}

.feature-cell:hover {
  background-color: rgba(30, 174, 251, 0.04);
}

.feature-cell-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-cell-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-cell-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-white);
  line-height: 1.25;
}

.feature-cell-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.feature-cell-desc strong {
  color: var(--color-white);
  font-weight: 600;
}

/* ==========================================================================
   Footer (1:1 TON.org Style)
   ========================================================================== */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  color: var(--color-muted);
  width: 100%;
  margin-top: 80px;
  background: transparent;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  box-sizing: border-box;
  max-width: 1264px;
  margin: 0 auto;
  padding: 48px 32px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  justify-self: start;
}

.footer-logo .brand-icon {
  width: 28px;
  height: 28px;
}

.footer-logo .brand-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-nav {
  grid-column: 2;
  justify-self: center;
  min-width: 0;
}

.footer-links-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link-item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.footer-link {
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

.footer-link-icon g {
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-link:hover .footer-link-icon g {
  opacity: 1;
}

.footer-meta {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
}

.footer-copyright {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Tablet Optimization)
   ========================================================================== */
@media (max-width: 960px) {
  .section-hero {
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 50px;
  }

  .hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 48px;
  }
  
  .hero-title {
    font-size: 34px;
    line-height: 1.22;
    margin-bottom: 24px;
    max-width: 100%;
  }

  .split-title {
    display: block;
  }

  .split-title > span {
    display: inline;
    white-space: normal;
  }

  .telegram-phrase {
    display: inline-flex;
    white-space: nowrap;
  }

  .ton-badges-list {
    justify-content: flex-start;
    gap: 8px 6px;
    max-width: 100%;
  }

  .ton-badge-card {
    font-size: 14px;
    padding: 7px 12px;
  }

  .hero-visual-wrap {
    width: 100%;
    max-width: 440px;
    margin: 16px auto 0;
  }

  .globe-canvas-container {
    max-width: 380px;
  }

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

  .feature-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--color-border) !important;
    padding: 28px 24px;
  }

  .feature-cell:last-child {
    border-bottom: none !important;
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 32px 24px;
  }

  .footer-nav {
    width: 100%;
  }

  .footer-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: flex-start;
  }

  .footer-meta {
    justify-self: start;
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 62px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .inner-header {
    padding: 0 20px;
  }

  .site-nav {
    gap: 24px;
  }

  .nav-link {
    font-size: 14px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-icon {
    width: 24px;
    height: 24px;
  }

  .section {
    padding: 56px 0;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .heading-title {
    font-size: 32px;
  }

  .site-footer {
    margin-top: 56px;
  }
}

@media (max-width: 520px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .inner-header {
    padding: 0 16px;
  }

  .site-nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 13.5px;
  }

  .section-hero {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 36px;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 20px;
  }

  .section-label {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .ton-badges-list {
    gap: 6px;
  }

  .ton-badge-card {
    font-size: 13px;
    padding: 6px 10px;
    gap: 4px;
  }

  .ton-badge-card .metric-val,
  .ton-badge-card .metric-lbl {
    font-size: 13px;
  }

  .hero-visual-wrap {
    max-width: 320px;
  }

  .globe-canvas-container {
    max-width: 280px;
  }

  .features-unified-container {
    border-radius: 16px;
  }

  .feature-cell {
    padding: 22px 18px;
    gap: 14px;
  }

  .feature-cell-title {
    font-size: 1.15rem;
  }

  .feature-cell-desc {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .heading-title {
    font-size: 26px;
  }

  .footer-inner {
    padding: 28px 16px;
    gap: 20px;
  }

  .footer-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-link {
    font-size: 13.5px;
  }

  .footer-copyright {
    font-size: 13px;
  }
}
