/* Landing-specific styles. Extends _styles.css with hero banner, animated
   globe SVG, screenshot gallery (phone frames), video embed, feature cards,
   CTA buttons. Pure CSS — no framework, no external font. */

/* ---------- override body for full-bleed landing ---------- */
body.landing {
  max-width: none;
  padding: 0;
}

body.landing > main,
body.landing > footer {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- HEADER (transparent, sits over hero) ---------- */
.site-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.site-header .brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.site-header nav {
  display: flex;
  gap: 18px;
  margin: 0;
}

.site-header nav a {
  color: var(--text-dim);
  font-size: 12px;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  letter-spacing: 0.5px;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 32px 24px 72px;
  background:
    radial-gradient(ellipse 800px 600px at 20% 10%, rgba(0,212,255,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 700px 500px at 85% 90%, rgba(255,61,154,0.14) 0%, transparent 55%),
    var(--bg);
  overflow: hidden;
}

/* Subtle hex grid backdrop for texture — drawn as inline CSS pattern so
   we don't pay another HTTP round-trip. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(36,50,64,0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,50,64,0.25) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 18px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(17,24,31,0.5);
}

.hero-copy h1 {
  font-size: 52px;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.hero-copy h1 .accent {
  color: var(--cyan);
}

.hero-copy .lede {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.05);
  transition: transform 120ms, background 120ms;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 212, 255, 0.15);
}

.btn.primary {
  background: var(--cyan);
  color: var(--bg);
}

.btn.primary:hover {
  background: #2de4ff;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.5);
}

.btn.ghost {
  border-color: var(--text-dim);
  color: var(--text-dim);
  background: transparent;
}

/* ---------- HERO VISUAL — animated globe SVG ---------- */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.globe-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(0 0 32px rgba(0, 212, 255, 0.35));
}

.globe-rotate {
  animation: globeRotate 24s linear infinite;
  transform-origin: 200px 200px;
}

.globe-pulse {
  animation: globePulse 2s ease-in-out infinite;
}

@keyframes globeRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes globePulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.trace-bar {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: var(--panel);
  border-radius: 3px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.trace-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--amber) 60%, var(--magenta) 100%);
  width: 0;
  animation: traceCycle 6s ease-in-out infinite;
}

@keyframes traceCycle {
  0%   { width: 0;   }
  60%  { width: 100%; background: linear-gradient(90deg, var(--green), var(--magenta)); }
  62%  { width: 0;   background: var(--green); }
  100% { width: 0;   }
}

.trace-label {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 2px;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 80px 24px;
  border-bottom: 1px solid var(--border);
}

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

.section h2 {
  font-size: 28px;
  margin: 0 0 16px;
  color: var(--amber);
  letter-spacing: -0.3px;
}

.section .section-sub {
  color: var(--text-dim);
  margin: 0 0 40px;
  font-size: 14px;
}

/* ---------- STATS STRIP (slim divider between hero and content) ---------- */
.stats-strip {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(0,212,255,0.04) 0%, rgba(0,0,0,0) 100%),
    var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  position: relative;
}

.stat + .stat::before {
  /* slim vertical divider between stats — only on wide enough viewports */
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.stat-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat + .stat::before { display: none; }
}

/* ---------- VIDEO ---------- */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;  /* 16:9 */
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.video-wrap iframe,
.video-wrap .video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-dim);
  background:
    radial-gradient(circle at 50% 50%, rgba(0,212,255,0.08), transparent 50%),
    var(--panel);
}

.video-placeholder .play-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.15);
  border: 2px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--cyan);
}

.video-placeholder p {
  font-size: 12px;
  letter-spacing: 1px;
  margin: 0;
}

/* ---------- GALLERY (phone screenshots) ---------- */
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  /* Center the row when total content is narrower than the container — keeps
     the 5 phones from clinging to the left edge on wide desktops. */
  justify-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.phone {
  /* Rendered as a <button> so it's keyboard-focusable + click-to-zoom.
     Reset default button chrome before applying phone-frame visuals. */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  text-align: left;

  flex: 0 0 auto;
  width: 180px;        /* Constant per-card width — predictable layout */
  scroll-snap-align: start;
  position: relative;
  border-radius: 22px;
  background: #1a1a1a;
  padding: 10px 6px;
  border: 1px solid var(--border);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.4),
    inset 0 0 0 2px rgba(255,255,255,0.04);
  transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}

.phone:hover,
.phone:focus-visible {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.5),
    0 0 0 2px rgba(0,212,255,0.25),
    inset 0 0 0 2px rgba(255,255,255,0.04);
  outline: none;
}

.phone::before {
  /* notch */
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 5px;
  background: #000;
  border-radius: 3px;
  z-index: 2;
}

.phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  /* The mockups are portrait 540×1170 (~9:19.5). Cap height so the gallery
     stays a manageable strip even on tall viewports. */
  max-height: 360px;
  object-fit: cover;
  object-position: top;
}

.phone-label {
  margin-top: 10px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .phone { width: 64vw; }
  .phone img { max-height: none; }  /* On phones, let the full image show */
}

/* ---------- FEATURE GRID ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 24px;
}

.feature:nth-child(2n) { border-left-color: var(--green); }
.feature:nth-child(3n) { border-left-color: var(--amber); }
.feature:nth-child(4n) { border-left-color: var(--magenta); }

.feature h3 {
  font-size: 14px;
  margin: 0 0 12px;
  color: var(--text);
}

.feature p {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.feature .feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

/* ---------- FACTIONS ---------- */
.factions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.faction {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.faction-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.faction-tag.anon  { background: rgba(46,230,138,0.15);  color: var(--green); }
.faction-tag.corp  { background: rgba(240,180,0,0.15);   color: var(--amber); }
.faction-tag.synd  { background: rgba(255,61,154,0.15);  color: var(--magenta); }
.faction-tag.indie { background: rgba(0,212,255,0.15);   color: var(--cyan); }

.faction h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.faction p {
  margin: 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- CTA FOOTER ---------- */
.cta-block {
  text-align: center;
  padding: 80px 24px;
  background:
    radial-gradient(ellipse at center, rgba(0,212,255,0.1) 0%, transparent 60%),
    var(--bg);
}

.cta-block h2 {
  font-size: 36px;
  margin: 0 0 16px;
  color: var(--cyan);
}

.cta-block .lede {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 14px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 880px) {
  .hero { padding: 24px 24px 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-visual { order: -1; }  /* globe above copy on narrow viewports */
  .hero-visual .globe-svg { max-width: 260px; }
  .section { padding: 56px 20px; }
  .section h2 { font-size: 22px; }
  .site-header { padding: 16px 24px; }
  .site-header nav { gap: 14px; }
}

/* ---------- LIGHTBOX (native <dialog> overlay) ---------- */
.lightbox {
  /* Override the browser default <dialog> style — full-bleed, dark backdrop. */
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  margin: 0;
  inset: 0;
  overflow: hidden;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(5, 8, 12, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  animation: lightboxIn 180ms ease-out;
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
  max-width: min(92vw, 380px);
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow:
    0 24px 48px rgba(0,0,0,0.6),
    0 0 0 1px rgba(0,212,255,0.3);
  /* Phone-shape feel inside the lightbox — soft border + inset highlight. */
}

.lightbox-caption {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--cyan);
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(17,24,31,0.8);
  color: var(--text);
  font-size: 18px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, border-color 120ms;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--panel);
  border-color: var(--cyan);
  color: var(--cyan);
  outline: none;
}

@media (max-width: 600px) {
  .lightbox-img { max-width: 88vw; }
  .lightbox-close { top: 12px; right: 12px; }
}
