/* === UNSEEN PROGRESS — Global Styles === */

/* Fonts loaded via <link> in HTML for preconnect + swap */

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

:root {
  --bg: #0a0b0f;
  --bg2: #111318;
  --bg3: #181a22;
  --text: #e5d5c5;
  --muted: #9ca3af;
  --dim: #6b7280;
  --border: #252a35;
  --font-heading: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* === LAYOUT === */

.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.container--wide { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }

/* === NAV === */

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 11, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}

nav .logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

nav .logo img {
  height: 32px;
  width: auto;
  display: block;
}

nav .nav-links { display: flex; gap: 2rem; align-items: center; }

nav .nav-links > a {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

nav .nav-links > a:hover { color: var(--text); }

/* === APPS DROPDOWN (native <details>) === */

.apps-menu {
  position: relative;
}

.apps-menu > summary {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s;
}

.apps-menu > summary::-webkit-details-marker { display: none; }
.apps-menu > summary:hover { color: var(--text); }
.apps-menu[open] > summary { color: var(--text); }

.apps-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: rgba(17, 19, 24, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem;
  z-index: 200;
}

.apps-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.apps-menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.apps-menu-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.research-menu-panel {
  grid-template-columns: 1fr;
  min-width: 240px;
}

/* === RESEARCH-PAGE APP CTA CARD === */

.research-app-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 1.5rem 0 2rem;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.2s;
}

.research-app-card:hover {
  border-color: var(--app-accent, var(--muted));
  transform: translateY(-2px);
}

.research-app-card-accent {
  width: 3px;
  background: var(--app-accent, var(--muted));
  border-radius: 2px;
  flex-shrink: 0;
}

.research-app-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.research-app-card-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.research-app-card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text);
}

.research-app-card-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0.25rem 0 0.6rem;
}

.research-app-card-link {
  font-size: 0.82rem;
  color: var(--app-accent, var(--muted));
  transition: color 0.2s;
}

.research-app-card:hover .research-app-card-link {
  color: var(--text);
}

/* On small screens the dropdown stretches across the viewport (anchored
   to the nav, not the Apps button) so long app names aren't clipped. */
@media (max-width: 640px) {
  .apps-menu { position: static; }
  .apps-menu-panel {
    top: calc(100% + 6px);
    left: 1rem;
    right: 1rem;
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

/* === TYPOGRAPHY === */

h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; line-height: 1.25; }

h1 { font-size: 3rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }
p.muted { color: var(--muted); }
p.dim { color: var(--dim); font-size: 0.9rem; }

/* === HERO === */

.hero {
  padding: 10rem 0 5rem;
  position: relative;
}

.hero h1 { max-width: 680px; }

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

/* === SECTION === */

section { padding: 5rem 0; }

section.bordered { border-top: 1px solid var(--border); }

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--dim);
  margin-bottom: 2rem;
}

/* === APP GRID (home page) === */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.app-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  border-color: var(--muted);
  transform: translateY(-2px);
}

.app-card .card-accent {
  width: 32px; height: 3px;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.app-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.app-card .card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.app-card .card-link {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 1rem;
  transition: color 0.2s;
}

.app-card:hover .card-link { color: var(--text); }

/* === APP PAGE HERO === */

.app-hero {
  padding: 9rem 0 4rem;
}

.app-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.app-hero .app-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.app-hero h1 {
  font-size: 3rem;
  max-width: 680px;
}

.app-hero .app-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin-top: 1.5rem;
}

.hero-video {
  /* Fixed box sized directly from max-height so the video actually fills
     it. Using aspect-ratio + display:flex causes videos to render at their
     intrinsic size (1080x1920) shrunken to flex-item fit, leaving a large
     empty gap around them. */
  position: relative;
  width: 293px;            /* 520 × 9/16 */
  height: 520px;
  max-width: 100%;
  max-height: 520px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  background: var(--bg2);
  justify-self: center;
}

.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-video .video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-video .video-placeholder .play-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

.hero-video .video-placeholder .play-icon::after {
  content: '';
  width: 0; height: 0;
  border-left: 16px solid var(--muted);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.hero-video .video-placeholder p {
  color: var(--dim);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .app-hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-video {
    width: 225px;
    height: 400px;
    max-width: 100%;
    max-height: 400px;
    margin: 0 auto;
  }
}

/* === OUTCOME BLOCKS (app pages) === */

.outcome-list { display: flex; flex-direction: column; gap: 2rem; }

.outcome {
  background: var(--bg2);
  border-left: 3px solid var(--dim);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
}

.outcome h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
}

.outcome p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

/* === FEATURES ROW === */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature {
  padding: 1.5rem;
  background: var(--bg2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.feature h3 {
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* === CTA === */

.cta-block {
  text-align: center;
  padding: 4rem 2rem;
}

.cta-block h2 { margin-bottom: 1.5rem; }

.cta-button {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s;
  margin: 0.4rem;
}

.cta-button:hover { opacity: 0.85; }

/* === FOOTER === */
/* Footer removed — top nav carries all navigation and the copyright line
   added nothing. End-of-page now lands on the CTA (app pages) or the
   final paragraph (brand pages). */

/* === IMAGE LIGHTBOX === */
/* Click a solve-block screenshot on desktop to enlarge via <dialog>.
   On mobile, pinch-zoom still works as before. */

dialog.img-lightbox {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  max-width: 100vw;
  max-height: 100vh;
  overflow: visible;
}

dialog.img-lightbox::backdrop {
  background: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(8px);
}

dialog.img-lightbox img {
  max-width: min(92vw, 680px);
  max-height: 92vh;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}

/* === PROSE (privacy, about, research) === */

.prose { max-width: 680px; }
.prose h2 { margin-top: 3rem; }
.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; color: var(--muted); font-size: 0.95rem; }
.prose strong { font-weight: 500; color: var(--text); }
.prose table {
  width: 100%;
  max-width: 880px;
  border-collapse: collapse;
  margin: 1.2rem 0 1.6rem;
  font-size: 0.88rem;
  color: var(--muted);
  overflow-x: auto;
  display: block;
}
.prose thead { background: var(--bg2); }
.prose th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.prose td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose td strong { color: var(--text); }

/* === RESPONSIVE === */

@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 2.2rem; }
  .hero { padding: 8rem 0 3rem; }
  .app-hero { padding: 7rem 0 3rem; }
  nav .nav-links { gap: 1rem; }
  nav .nav-links a { font-size: 0.75rem; }
  .app-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav {
    padding: 0.7rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.5rem;
  }
  nav .logo { width: 100%; text-align: center; white-space: nowrap; }
  nav .nav-links { width: 100%; justify-content: center; gap: 0.9rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  h1 { font-size: 1.8rem; }
}
