:root{
  --bg: #0b0f14;
  --panel: rgba(15,22,33,.72);
  --panel2: rgba(15,22,33,.60);
  --line: rgba(232,238,246,.14);
  --text: #e8eef6;
  --muted: rgba(232,238,246,.75);
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container{
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.muted{ color: var(--muted); }

/* Top line */
.topline{
  background: rgba(11,15,20,.92);
  border-bottom: 1px solid var(--line);
}
.topline-text{
  margin: 0;
  padding: 14px 0;
  font-size: 14px;
  letter-spacing: .2px;
}

/* Corner logo */
.corner-logo{
  position: fixed;
  top: 12px;
  right: 18px;
  z-index: 9999;

  background: rgba(255,255,255,0.95);
  padding: 2px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.corner-logo img{
  height: 30px;
  width: auto;
  display: block;
}

/* Reusable surfaces */
.card, .copy-card, .media-card, .img-card, .block{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.card{ padding: 18px; }

/* Hero */
.hero{ padding: 22px 0 18px; }

.media-card{ overflow: hidden; }
.hero-video{
  width: 100%;
  height: auto;
  display: block;
  background: #000;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.copy-card{
  margin-top: 14px;
  padding: 18px;
}

/* Outcomes */
.outcomes{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}
.outcome{
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  padding: 14px;
}
.label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: rgba(232,238,246,.85);
  margin-bottom: 6px;
}
.value{
  font-size: 15px;
  color: var(--text);
}

/* Section titles */
.section-title{
  margin: 0 0 8px;
  font-size: 24px;
}
.section-subtitle{
  margin: 0 0 16px;
  max-width: 820px;
}

/* Prediction section */
.prediction{ padding: 18px 0 12px; }

/* Blocks */
.block{
  padding: 16px;
  margin-bottom: 14px;
}
.block-title{
  margin: 0 0 10px;
  font-size: 18px;
}

/* LLM compact */
.llm-compact{
  padding: 14px;
  opacity: 0.96;
}
.block-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.block-note{
  margin: 0;
  font-size: 13px;
  max-width: 520px;
}

/* Image card */
.img-card{
  background: #fff;
  overflow: hidden;
  padding: 10px;
}
.img-card img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Make LLM visually smaller */
.llm-img{
  max-width: 860px;
  margin: 0 auto;
}
.llm-img img{ opacity: 0.93; }

/* Action stack */
.action-stack{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 6px;
  margin-bottom: 8px;
}
.action-primary{ padding: 18px; }
.action-img{
  padding: 12px;
  max-width: 860px;
  margin: 0 auto;
}

/* Note under prediction */
.conclusion-note{
  margin-top: 10px;
  font-size: 15px;
}

/* 3 column section */
.three{ padding: 18px 0 10px; }

.grid-3{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.card h2{
  margin: 0 0 10px;
  font-size: 18px;
}
.card p{ margin: 0 0 10px; }
.card ul{
  margin: 0 0 10px;
  padding-left: 18px;
  color: rgba(232,238,246,.85);
}
.card li{ margin: 6px 0; }

/* Founder split */
.founder{ padding: 18px 0 10px; }

.split{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  align-items: start;
}
.photo-card{ padding: 10px; }

.caption{
  margin: 10px 6px 0;
  font-size: 13px;
}

/* Privacy */
.privacy{ padding: 12px 0 18px; }

.pills{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.pill{
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--panel2);
  color: rgba(232,238,246,.9);
  font-size: 14px;
}
.privacy-foot{ margin-top: 12px; }

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
}
.footer-text{
  margin: 0;
  font-size: 14px;
  color: rgba(232,238,246,.9);
}

/* ---------------- DEMO ---------------- */
.demo { padding: 18px 0 18px; }

/* IMPORTANT: vertical layout always (no squeeze) */
.demo-grid{
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

/* Reorder cards without editing HTML:
   If your HTML is [Output, Upload], this flips them to [Upload, Output]. */
.demo-grid > :nth-child(1){ order: 2; }  /* Output becomes second */
.demo-grid > :nth-child(2){ order: 1; }  /* Upload becomes first */

/* Headings/badges */
.demo-title{
  margin: 0 0 10px;
  font-size: 18px;
}

.demo-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.demo-badge{
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--panel2);
  color: rgba(232,238,246,.9);
}

.demo-warn{
  margin: 6px 0 12px;
  font-size: 13px;
}

/* Inputs + buttons */
.demo-file{
  width: 100%;
  margin-top: 6px;
}

.demo-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.demo-btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
}
.demo-btn:hover{ background: rgba(255,255,255,0.10); }
.demo-btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}
.demo-btn.ghost{ background: transparent; }

.demo-status{
  margin: 10px 0 0;
  font-size: 13px;
}

/* Frames: desktop = 3 across (still fine because Output is full-width now) */
.demo-frames{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 12px;
}

.demo-frame{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-frame img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
}

.demo-frame-cap{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(232,238,246,.75);
  align-self: flex-start;
}

.demo-json{
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.40);
  color: rgba(232,238,246,.92);
  overflow: auto;
  max-height: 420px;
  font-size: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .grid-3{ grid-template-columns: 1fr; }
  .outcomes{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }

  /* Demo cards: keep them from feeling huge on mobile */
  .demo-grid > *{
    width: 92vw;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Frames: stack vertically on mobile */
  .demo-frames{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .demo-frame{
    width: 100%;
    align-items: center;
  }

  .demo-frame img{
    width: 88vw;
    max-width: 420px;
    height: auto;
    object-fit: contain;
  }

  .demo-json{
    max-height: 300px;
    font-size: 11px;
  }
}

@media (max-width: 780px){
  .block-head{
    flex-direction: column;
    align-items: flex-start;
  }
  .block-note{ max-width: 100%; }
}