/* Multipage landing shell — f0xx.org / lovable-style layout on hub tokens */

.hub-landing {
  --landing-header-h: 56px;
  --landing-footer-h: 40px;
  --landing-left-w: 56px;
  --landing-rail-w: 44px;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* (1) Top header */
.landing-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--landing-header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 12px;
  background: rgba(15, 20, 25, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 58, 79, 0.65);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .landing-top {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(197, 208, 224, 0.9);
}

.landing-top-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}
.landing-top-logo:hover { color: var(--text); text-decoration: none; }
.landing-top-logo img {
  width: 36px;
  height: 27px;
}
.landing-top-logo strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.landing-top-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.landing-menu-item {
  position: relative;
}
.landing-menu-btn,
.landing-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.landing-menu-link:hover,
.landing-menu-btn:hover,
.landing-menu-item:focus-within > .landing-menu-btn {
  background: rgba(61, 139, 253, 0.14);
  text-decoration: none;
}
.landing-menu-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}
.landing-menu-link::after { display: none; }

.landing-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 168px;
  padding: 6px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(61, 139, 253, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 30;
}
.landing-menu-item:hover .landing-dropdown,
.landing-menu-item:focus-within .landing-dropdown,
.landing-menu-item.is-open .landing-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.landing-dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.landing-dropdown a:hover,
.landing-dropdown a.is-active {
  background: rgba(61, 139, 253, 0.16);
  color: var(--accent);
}

.landing-top-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.landing-top-tools .toolbar-select {
  font-size: 13px;
}

/* Frame: (2) left + (3) body + space for (4) rail */
.landing-frame {
  position: fixed;
  top: var(--landing-header-h);
  left: 0;
  right: 0;
  bottom: var(--landing-footer-h);
  display: flex;
  z-index: 5;
  pointer-events: none;
}

/* (2) Left shell — console nav-pane */
.landing-left.nav-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--landing-left-w);
  width: var(--landing-left-w);
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  z-index: 3;
  pointer-events: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.landing-left .nav-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.landing-left .nav-user {
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.landing-left.nav-pane.open {
  width: 240px;
  flex-basis: 240px;
}

/* (3) Body — full viewport pages, scroll snap */
.landing-scroll {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  pointer-events: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.landing-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.landing-page {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px 32px 24px;
  position: relative;
}

.landing-page-inner {
  width: min(920px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 8px 4px;
}

.landing-page-inner.card.card--lift {
  padding: 28px 32px;
  background: rgba(26, 35, 50, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(45, 58, 79, 0.85);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 32px rgba(61, 139, 253, 0.08);
}
[data-theme="light"] .landing-page-inner.card.card--lift {
  background: rgba(255, 255, 255, 0.88);
}

.landing-page h2 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.landing-page .landing-lead {
  margin: 0 0 20px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
}
.landing-page .btn { margin-left: 0; }

.landing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.landing-gallery__tile {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(61, 139, 253, 0.22), rgba(12, 24, 48, 0.85));
}
.landing-gallery__tile--network {
  background: linear-gradient(145deg, rgba(61, 139, 253, 0.35), rgba(8, 18, 36, 0.9));
}
.landing-gallery__tile--cluster {
  background: linear-gradient(145deg, rgba(46, 196, 182, 0.28), rgba(8, 18, 36, 0.9));
}
.landing-gallery__tile--ops {
  background: linear-gradient(145deg, rgba(255, 159, 67, 0.25), rgba(8, 18, 36, 0.9));
}
.landing-gallery__tile--team {
  background: linear-gradient(145deg, rgba(155, 89, 182, 0.28), rgba(8, 18, 36, 0.9));
}
.landing-gallery__tile--collab {
  background: linear-gradient(145deg, rgba(61, 139, 253, 0.22), rgba(46, 196, 182, 0.18));
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.landing-feature-grid .card {
  padding: 16px;
  margin: 0;
}

.landing-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.landing-price-card {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.landing-price-card h3 { margin: 0 0 8px; }
.landing-price-card .price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.landing-contact-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin-top: 16px;
}
.landing-contact-form label {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}
.landing-contact-form input,
.landing-contact-form textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
}

/* Page 1 hero — lighter card, more globe visible */
.landing-page--hero .landing-page-inner {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  max-width: 640px;
}
.landing-page--hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

/* (4) Right page rail — hidden until handle hover/drag */
.landing-rail {
  position: fixed;
  top: var(--landing-header-h);
  right: 0;
  bottom: var(--landing-footer-h);
  width: var(--landing-rail-w);
  z-index: 15;
  pointer-events: none;
  transform: translateX(calc(var(--landing-rail-w) - 6px));
  transition: transform 0.22s ease;
}
.landing-rail.is-visible,
.landing-rail:hover,
.landing-rail:focus-within {
  transform: translateX(0);
  pointer-events: auto;
}

.landing-rail-handle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: rgba(26, 35, 50, 0.92);
  cursor: grab;
  pointer-events: auto;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.25);
}
.landing-rail-handle:active { cursor: grabbing; }
.landing-rail-handle::before {
  content: '';
  display: block;
  width: 4px;
  height: 28px;
  margin: 0 auto;
  border-radius: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--muted) 0,
    var(--muted) 4px,
    transparent 4px,
    transparent 7px
  );
}

.landing-rail-dots {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 6px;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.82);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.landing-rail-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.landing-rail-dot:hover {
  border-color: var(--accent);
  transform: scale(1.15);
}
.landing-rail-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(61, 139, 253, 0.55);
}

/* (5) Footer stays platform-footer; lift above globe */
.hub-landing .bottom-bar.platform-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12;
  height: var(--landing-footer-h);
  min-height: var(--landing-footer-h);
  max-height: var(--landing-footer-h);
  pointer-events: none;
}
.hub-landing .bottom-bar.platform-footer a,
.hub-landing .bottom-bar.platform-footer button {
  pointer-events: auto;
}

/* Clock widget below header */
.hub-landing .hub-clock-widget {
  top: calc(var(--landing-header-h) + 12px);
  z-index: 18;
}

@media (max-width: 900px) {
  .landing-top-nav { display: none; }
  .landing-page { padding: 24px 16px 24px 12px; }
  .landing-rail { --landing-rail-w: 36px; }
}

.landing-top-tools .hub-locale {
  margin: 0;
}
.landing-top-tools .hub-locale .locale-flag {
  font-size: 1rem;
  line-height: 1;
}
.landing-top-tools .hub-locale select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Globe stays fixed behind all landing chrome */
.hub-landing #hub-logo-stage {
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .landing-scroll { scroll-behavior: auto; }
  .landing-rail { transition: none; }
}

/* Downloads — tall cards: icon on top, resource name below */
.landing-download-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0 12px;
}

.landing-download-card {
  min-width: 200px;
  width: min(220px, 100%);
  min-height: 168px;
  padding: 24px 20px 20px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  border: 1px solid rgba(61, 139, 253, 0.35);
}

.landing-download-card__icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.95;
}

.landing-download-card__icon--android {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233DDC84'%3E%3Cpath d='M17.6 9.48l1.84-3.18c.16-.31-.04-.68-.38-.74a.495.495 0 0 0-.55.27l-1.87 3.24a11.43 11.43 0 0 0-8.12 0L6.65 5.83a.495.495 0 0 0-.55-.27c-.34.06-.54.43-.38.74L7.56 9.48C4.01 11.27 1.46 14.79 1 19h22c-.46-4.21-3.01-7.73-6.54-9.52zM7 16.5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm10 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z'/%3E%3C/svg%3E");
}

.landing-download-card__icon--studio {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F4A460'%3E%3Cpath d='M6 3h12l1 3H5l1-3zm-1 5h14v11c0 1.1-.9 2-2 2H7c-1.1 0-2-.9-2-2V8zm4 2v2h2v-2H9zm4 0v2h2v-2h-2z'/%3E%3Cpath d='M8 19h8v1H8v-1z' fill='%23654321'/%3E%3C/svg%3E");
}

.landing-download-card__label {
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.landing-download-card:hover,
.landing-download-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(61, 139, 253, 0.45);
}

/* Legacy pill buttons (documentation page, resources) */
.landing-download-btn {
  min-width: 200px;
  min-height: 56px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.landing-download-btn:hover,
.landing-download-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(61, 139, 253, 0.45);
}

.landing-download-hint {
  margin-top: 8px;
  font-size: 0.92rem;
}

.landing-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.landing-docs-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.landing-docs-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.65;
}

.landing-docs-list a {
  color: var(--accent, #3d8bfd);
}
