/* FlowGate — Unified Defence Zone Landing
   From flow_gate_unified_screens_react.jsx
   Colors: midnight #0E1A2B, steel #16263F, crimson #B11226, ash #C7CBD6
*/
* { margin: 0; padding: 0; box-sizing: border-box; }

.fg-landing {
  font-family: 'Segoe UI Variable', 'Segoe UI', Inter, system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background: #0E1A2B;
  color: #fff;
  position: relative;
  overflow-x: hidden;
}

/* ─── Background layers ─── */
.fg-bg-layers {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.fg-bg-base {
  position: absolute;
  inset: 0;
  background: #0E1A2B url("images/flowgate-bg.png") center center / cover no-repeat;
  filter: saturate(0.95) contrast(1.08);
}

.fg-bg-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 900px at 52% 35%, rgba(22,38,63,0.08), rgba(14,26,43,0.92) 66%),
    linear-gradient(180deg, rgba(14,26,43,0.55), rgba(14,26,43,0.90));
}

.fg-bg-mist {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,0.04) 70%,
    rgba(255,255,255,0)
  );
  animation: fg-mist-drift 18s ease-in-out infinite;
}

@keyframes fg-mist-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

.fg-bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.fg-bg-embers {
  position: absolute;
  inset: 0;
  opacity: 0.85;
  background:
    radial-gradient(2px 2px at 14% 44%, rgba(177,18,38,0.55), rgba(177,18,38,0) 60%),
    radial-gradient(1.5px 1.5px at 82% 58%, rgba(177,18,38,0.45), rgba(177,18,38,0) 60%),
    radial-gradient(2px 2px at 66% 22%, rgba(177,18,38,0.35), rgba(177,18,38,0) 60%);
}

/* ─── Content ─── */
.fg-landing-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 32px;
}

.fg-landing-grid {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 1024px) {
  .fg-landing-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

/* ─── Hero (left) ─── */
.fg-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.fg-dot {
  width: 10px;
  height: 10px;
  background: #B11226;
  box-shadow: 0 0 18px rgba(177,18,38,0.55);
}

.fg-kicker span:last-child {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.55);
}

.fg-title {
  margin-top: 20px;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.fg-desc {
  margin-top: 16px;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.7);
}

.fg-desc-line {
  display: block;
}

.fg-divider {
  margin-top: 32px;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fg-divider span:first-child,
.fg-divider span:last-child {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.fg-divider-label {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.4);
}

.fg-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fg-btn-enter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fg-btn-enter:hover {
  border-color: rgba(255,255,255,0.35);
}

.fg-btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0) 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.fg-btn-enter:hover .fg-btn-glow {
  opacity: 1;
}

.fg-btn-edge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(177,18,38,0),
    rgba(177,18,38,0.95),
    rgba(177,18,38,0)
  );
  opacity: 0.75;
}

.fg-btn-text {
  position: relative;
  z-index: 1;
}

.fg-btn-docs {
  padding: 8px 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.fg-btn-docs:hover {
  color: rgba(255,255,255,0.8);
}

.fg-notice {
  margin-top: 32px;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
}

.fg-notice-label {
  letter-spacing: 0.12em;
}

/* ─── Glass panel (right) ─── */
.fg-panel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1024px) {
  .fg-panel-wrap {
    justify-content: flex-end;
  }
}

.fg-glass-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  border: 1px solid rgba(199,203,214,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fg-panel-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(177,18,38,0),
    rgba(177,18,38,0.9),
    rgba(177,18,38,0)
  );
  opacity: 0.8;
}

.fg-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 36px 32px 0;
}

.fg-panel-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.55);
}

.fg-panel-title {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
}

.fg-panel-right {
  text-align: right;
}

.fg-panel-right .fg-panel-kicker {
  color: rgba(255,255,255,0.4);
}

.fg-panel-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.fg-panel-body {
  padding: 28px 32px;
}

.fg-status-row {
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  padding: 12px 16px;
}

.fg-status-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.55);
}

.fg-status-header span:last-child {
  color: rgba(255,255,255,0.7);
}

.fg-status-bar {
  margin-top: 8px;
  height: 2px;
  width: 100%;
  background: rgba(255,255,255,0.1);
}

.fg-status-fill {
  height: 100%;
  transition: width 0.5s ease;
}

.fg-fill-blue {
  background: linear-gradient(90deg, rgba(90,140,255,0.35), rgba(90,140,255,0.15));
}

.fg-fill-ash {
  background: linear-gradient(90deg, rgba(199,203,214,0.35), rgba(199,203,214,0.12));
}

.fg-fill-crimson {
  background: linear-gradient(90deg, rgba(177,18,38,0.55), rgba(177,18,38,0.18));
}

.fg-panel-notice {
  margin-top: 8px;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
}

.fg-panel-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 32px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.fg-footer-hint {
  color: rgba(255,255,255,0.35);
}

/* ─── Footer ─── */
.fg-footer {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.fg-footer-dot {
  opacity: 0.4;
}

/* ─── Documentation Modal ─── */
.fg-docs-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.fg-docs-modal.fg-docs-open {
  opacity: 1;
  visibility: visible;
}

.fg-docs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 26, 43, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fg-docs-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  border: 1px solid rgba(199, 203, 214, 0.2);
  background: linear-gradient(165deg, rgba(22, 38, 63, 0.98), rgba(14, 26, 43, 0.95));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 40px 100px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: scale(0.94) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.fg-docs-modal.fg-docs-open .fg-docs-panel {
  transform: scale(1) translateY(0);
}

.fg-docs-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(177, 18, 38, 0),
    rgba(177, 18, 38, 0.9),
    rgba(177, 18, 38, 0)
  );
  opacity: 0.85;
}

.fg-docs-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.fg-docs-close:hover {
  background: rgba(177, 18, 38, 0.25);
  border-color: rgba(177, 18, 38, 0.5);
  color: #fff;
}

.fg-docs-scroll {
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.fg-docs-scroll::-webkit-scrollbar {
  width: 8px;
}

.fg-docs-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.fg-docs-scroll::-webkit-scrollbar-thumb {
  background: rgba(177, 18, 38, 0.35);
  border-radius: 4px;
}

.fg-docs-header {
  padding: 48px 40px 32px;
  text-align: center;
}

.fg-docs-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

.fg-docs-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.25;
}

.fg-docs-subtitle {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
}

.fg-docs-body {
  padding: 0 40px 48px;
}

.fg-docs-section {
  margin-bottom: 36px;
}

.fg-docs-section h3 {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.fg-docs-section p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}

.fg-docs-problem p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.fg-docs-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fg-docs-card {
  position: relative;
  padding: 20px 20px 20px 56px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, background 0.25s;
}

.fg-docs-modal.fg-docs-open .fg-docs-card {
  animation: fg-docs-card-in 0.5s ease backwards;
}

.fg-docs-modal.fg-docs-open .fg-docs-card:nth-child(1) { animation-delay: 0.05s; }
.fg-docs-modal.fg-docs-open .fg-docs-card:nth-child(2) { animation-delay: 0.1s; }
.fg-docs-modal.fg-docs-open .fg-docs-card:nth-child(3) { animation-delay: 0.15s; }
.fg-docs-modal.fg-docs-open .fg-docs-card:nth-child(4) { animation-delay: 0.2s; }
.fg-docs-modal.fg-docs-open .fg-docs-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes fg-docs-card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fg-docs-card:hover {
  border-color: rgba(177, 18, 38, 0.25);
  background: rgba(177, 18, 38, 0.04);
}

.fg-docs-card-num {
  position: absolute;
  left: 20px;
  top: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(177, 18, 38, 0.7);
}

.fg-docs-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.fg-docs-card p {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.fg-docs-subscription {
  padding: 24px;
  border: 1px solid rgba(177, 18, 38, 0.2);
  background: rgba(177, 18, 38, 0.06);
}

.fg-docs-cta {
  margin-top: 40px;
  text-align: center;
}

.fg-docs-cta-btn {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid rgba(177, 18, 38, 0.6);
  background: linear-gradient(180deg, rgba(177, 18, 38, 0.35), rgba(177, 18, 38, 0.2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: all 0.25s ease;
}

.fg-docs-cta-btn:hover {
  background: linear-gradient(180deg, rgba(177, 18, 38, 0.5), rgba(177, 18, 38, 0.3));
  border-color: rgba(177, 18, 38, 0.9);
  box-shadow: 0 0 24px rgba(177, 18, 38, 0.25);
}
