/* CloudSeven / VideoCloud — Static site styles */
:root {
  --color-snow: #f8fafc;
  --color-ice: #e0f2fe;
  --color-sky: #3b82f6;
  --color-sky-dark: #1e40af;
  --color-graphite: #1e293b;
  --color-slate: #334155;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-white: #ffffff;
  --color-dark: #0f172a;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
  --nav-height: 72px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-graphite);
  background: var(--color-snow);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-sky-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 3px solid var(--color-sky);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-sky-dark);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* Header / Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled,
.site-header.solid {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 12px rgba(15, 23, 42, 0.06);
}

.site-header.transparent {
  background: transparent;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-graphite);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo img,
.logo svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo span {
  white-space: nowrap;
}

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

.nav-links a,
.nav-links button {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-slate);
  font-weight: 500;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links button:hover,
.nav-links a.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-sky-dark);
}

.nav-links .btn-nav {
  background: var(--color-sky-dark);
  color: white;
  margin-left: 8px;
}

.nav-links .btn-nav:hover {
  background: var(--color-sky);
  color: white;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.lang-switch a {
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--color-muted);
}

.lang-switch a.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-sky-dark);
  font-weight: 600;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-graphite);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.98);
  backdrop-filter: blur(12px);
  padding: 24px 20px;
  z-index: 999;
  overflow-y: auto;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a,
.mobile-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-graphite);
  font-weight: 500;
  font-size: 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 4px;
}

.mobile-nav a:hover,
.mobile-nav button:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.65) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 120px 24px 80px;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-logo img {
  width: 56px;
  height: 56px;
}

.hero-logo span {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero .motto {
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.hero .lead {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-sky);
  color: white;
}

.btn-primary:hover {
  background: var(--color-sky-dark);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--color-sky-dark);
  border: 1.5px solid var(--color-sky);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.08);
}

.btn-dark {
  background: var(--color-graphite);
  color: white;
}

.btn-dark:hover {
  background: var(--color-dark);
  color: white;
}

/* Sections */
.section {
  padding: 72px 20px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-dark);
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

/* Theme cards */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.theme-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.theme-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.theme-card .body {
  padding: 16px;
}

.theme-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-graphite);
  margin-bottom: 4px;
}

.theme-card p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-card .body {
  padding: 20px;
}

.post-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.post-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.post-card p {
  font-size: 0.9rem;
  color: var(--color-slate);
  line-height: 1.5;
}

/* Stats block */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-sky-dark);
  letter-spacing: -0.02em;
}

.stat-card .label {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 4px;
}

/* Page content */
.page-hero {
  padding: 120px 20px 48px;
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #3b82f6 100%);
  color: white;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.page-hero p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
}

.content-block {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.content-block h2 {
  font-size: 1.4rem;
  font-weight: 650;
  margin: 32px 0 12px;
  color: var(--color-dark);
}

.content-block h2:first-child {
  margin-top: 0;
}

.content-block p {
  margin-bottom: 16px;
  color: var(--color-slate);
}

.content-block ul,
.content-block ol {
  margin: 12px 0 20px 24px;
  list-style: disc;
}

.content-block li {
  margin-bottom: 8px;
  color: var(--color-slate);
}

.content-block ol {
  list-style: decimal;
}

/* Rules specific */
.rules-list {
  counter-reset: rule;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rules-list li {
  counter-increment: rule;
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 8px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  border-left: 3px solid var(--color-sky);
}

.rules-list li::before {
  content: counter(rule);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--color-ice);
  color: var(--color-sky-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Contacts */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.contact-info h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.contact-info p {
  margin-bottom: 12px;
  color: var(--color-slate);
}

.contact-info .label {
  font-weight: 600;
  color: var(--color-graphite);
  display: block;
  margin-bottom: 2px;
}

.contact-form {
  background: var(--color-white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-graphite);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-snow);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-sky);
  outline: none;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 12px;
}

/* Dashboard */
.dashboard-page {
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

.dashboard-page .site-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
}

.dashboard-page .logo,
.dashboard-page .nav-links a,
.dashboard-page .nav-links button {
  color: #e2e8f0;
}

.dashboard-page .nav-links a:hover,
.dashboard-page .nav-links button:hover {
  background: rgba(59, 130, 246, 0.2);
  color: white;
}

.dashboard-page .btn-nav {
  background: var(--color-sky);
}

.dashboard-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 48px;
}

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.dashboard-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.dashboard-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.dash-card {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid #334155;
}

.dash-card .label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.dash-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.dash-card .sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
}

.dash-card.wide {
  grid-column: span 2;
}

.progress-bar {
  height: 8px;
  background: #334155;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.chart-container {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid #334155;
  margin-bottom: 24px;
}

.chart-container h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #f1f5f9;
}

.chart-svg {
  width: 100%;
  height: 180px;
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.events-table th,
.events-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #334155;
}

.events-table th {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.8rem;
}

.events-table td {
  color: #e2e8f0;
}

.events-table tr:last-child td {
  border-bottom: none;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.ok { background: #10b981; }
.status-dot.warn { background: #f59e0b; }
.status-dot.info { background: #3b82f6; }

.heatmap {
  display: grid;
  grid-template-columns: auto repeat(24, 1fr);
  gap: 2px;
  font-size: 0.65rem;
  color: #64748b;
}

.heatmap .day-label {
  display: flex;
  align-items: center;
  padding-right: 8px;
}

.heatmap .cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #1e293b;
  min-width: 10px;
}

.heatmap .cell.l1 { background: #1e3a5f; }
.heatmap .cell.l2 { background: #1e40af; }
.heatmap .cell.l3 { background: #3b82f6; }
.heatmap .cell.l4 { background: #60a5fa; }

.demo-note {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform 0.25s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--color-muted);
  border-radius: 6px;
}

.modal-close:hover {
  background: var(--color-ice);
  color: var(--color-graphite);
}

.modal-body {
  padding: 20px 24px 24px;
}

.modal-body .form-group {
  margin-bottom: 14px;
}

.modal-message {
  text-align: center;
  padding: 24px 16px;
}

.modal-message p {
  color: var(--color-slate);
  margin-bottom: 20px;
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #94a3b8;
  padding: 48px 20px 28px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand .logo {
  color: white;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 280px;
  line-height: 1.5;
}

.footer-col h4 {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: #e2e8f0;
}

.footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid #334155;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
}

/* 404 */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
}

.error-page h1 {
  font-size: 5rem;
  font-weight: 800;
  color: var(--color-sky);
  line-height: 1;
  margin-bottom: 8px;
}

.error-page h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--color-muted);
  margin-bottom: 28px;
  max-width: 400px;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-24 { margin-bottom: 24px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-card.wide {
    grid-column: span 2;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .hero-content {
    padding: 100px 20px 60px;
  }
  .section {
    padding: 48px 16px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .dash-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .dash-card.wide {
    grid-column: span 1;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}
