/* CloudTwo — Путешествуем вместе */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --turquoise: #14b8a6;
  --turquoise-light: #5eead4;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --white: #ffffff;
  --glass: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--turquoise-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
}

.nav-glass {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  white-space: nowrap;
}

.logo svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.btn-nav {
  background: linear-gradient(135deg, var(--primary), var(--turquoise));
  color: var(--white);
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.35);
}

.nav-links a.btn-nav:hover {
  filter: brightness(1.1);
  color: var(--white);
}

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0.4rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: url('../img/hero-bg.jpg') center/cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-motto {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--turquoise-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--turquoise-light);
  transition: transform 0.25s, background 0.25s;
}

.hero-icon:hover {
  transform: translateY(-4px);
  background: rgba(20, 184, 166, 0.15);
}

.hero-icon svg {
  width: 28px;
  height: 28px;
}

/* ===== SECTIONS ===== */
.section {
  padding: 4.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.section p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.section ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

.section li {
  margin-bottom: 0.4rem;
}

.section h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--turquoise-light);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

/* ===== CONTACTS ===== */
.contact-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

.contact-item svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--turquoise-light);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  position: relative;
}

.modal h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.modal .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.modal .close-btn:hover {
  color: var(--white);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--turquoise));
  color: var(--white);
  width: 100%;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.modal-message {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.modal-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.modal-message.info {
  display: block;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #7dd3fc;
}

/* ===== 404 ===== */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.page-404 h1 {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--turquoise));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.page-404 p {
  color: var(--text-muted);
  margin: 1rem 0 2rem;
  max-width: 400px;
}

/* ===== DASHBOARD ===== */
.dashboard-body {
  background: #0b1220;
}

.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dash-header .logo {
  font-size: 1.05rem;
}

.dash-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dash-actions button,
.dash-actions select {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.dash-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dash-main {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.stat-card .value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.stat-card .sub {
  font-size: 0.8rem;
  color: var(--turquoise-light);
  margin-top: 0.25rem;
}

.dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .dash-row {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.panel h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.progress-wrap {
  margin-bottom: 1rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--turquoise));
  transition: width 0.6s ease;
}

.process-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.process-item:last-child {
  border-bottom: none;
}

.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-running {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
}

.badge-completed {
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
}

.badge-queued {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.event-log {
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.event-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.event-item .time {
  color: var(--primary);
  margin-right: 0.5rem;
}

.chart-container {
  height: 220px;
  position: relative;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(14, 165, 233, 0.1);
  transition: background 0.3s;
}

.heatmap-cell.l1 { background: rgba(14, 165, 233, 0.2); }
.heatmap-cell.l2 { background: rgba(14, 165, 233, 0.4); }
.heatmap-cell.l3 { background: rgba(20, 184, 166, 0.55); }
.heatmap-cell.l4 { background: rgba(20, 184, 166, 0.8); }

/* Mobile nav */
@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    flex-direction: column;
    padding: 0.75rem;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .burger {
    display: block;
  }

  .nav-glass {
    position: relative;
    border-radius: var(--radius);
  }
}
