/* AGI House presentation branding */
:root {
  --agi-black: var(--aa-ground);
  --agi-dark: var(--aa-surface-2);
  --agi-gray: var(--aa-surface-2);
  --agi-light: var(--aa-ink-2);
  --agi-white: var(--aa-ink);
  --agi-accent: var(--aa-ok); /* green accent seen on agihouse.org */
  /* Role colors */
  --col-founder: #b45309; /* orange */
  --col-engineer: var(--aa-info); /* blue */
  --col-researcher: var(--aa-info); /* light blue */
  --col-product: #be185d; /* pink/magenta */
  --col-investor: var(--aa-ok); /* green */
  --col-media: #6d28d9; /* violet */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--agi-black);
  color: var(--agi-white);
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.brand-header { position: sticky; top: 0; z-index: 20; background: rgba(30,27,22,.14); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(30,27,22,.14); }
.brand-header .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand img { height: 28px; display: block; }
.brand-actions { display: flex; gap:11px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-weight: 600; text-decoration: none; }
.btn-white { background: var(--agi-white); color: var(--agi-black); }
.btn-gray { background: var(--agi-gray); color: var(--agi-white); }
.btn-outline { background: transparent; border-color: var(--agi-light); color: var(--agi-light); }
.btn:hover { opacity: 0.9; }

/* Hero */
.hero { position: relative; min-height: 60vh; display: grid; place-items: end; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,248,243,0) 20%, rgba(250,248,243,.88) 60%, rgba(250,248,243,1) 100%); }
.hero-content { position: relative; padding: 48px 20px 28px; text-align: left; }
.hero h1 { margin: 0 0 6px; font-size: clamp(28px, 5vw, 56px); font-weight: 700; }
.hero .subtitle { margin: 6px 0; color: var(--agi-light); font-size: clamp(14px, 2vw, 20px); }
.hero .presenter { margin: 6px 0 0; color: var(--agi-light); font-size: 14px; opacity: 0.9; }

/* Slides navigator */
.slides-nav { position: fixed; right: 12px; top: 96px; z-index: 15; }
.slides-nav nav { display: grid; gap:11px; }
.slides-nav a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--agi-dark); color: var(--agi-light); text-decoration: none; border: 1px solid rgba(30,27,22,.14); font-weight: 700; font-size: 12px; }
.slides-nav a:hover { background: var(--agi-gray); color: var(--agi-white); }

/* Slides */
.slides { display: grid; gap: 24px; padding: 32px 0 80px; }
.slide { scroll-margin-top: 90px; }
.slide .container { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 16px; padding: 28px; box-shadow: 0 10px 30px rgba(30,27,22,.14); }
.slide h2 { margin: 0 0 12px; font-size: clamp(20px, 3vw, 28px); }
.slide .lead { color: var(--agi-light); margin: 0 0 10px; font-size: 16px; }
.slide ul { margin:11px 0 0; padding-left: 18px; line-height: 1.55; color: var(--aa-ink); }
.slide li { margin: 6px 0; }
.two-col { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.muted { color: var(--agi-light); font-size: 14px; opacity: 0.85; }

/* Speaker notes */
details.notes { margin-top: 14px; border-top: 1px solid rgba(30,27,22,.14); padding-top:11px; color: var(--aa-muted); }
details.notes[open] { background: rgba(30,27,22,.08); border-radius: 12px; padding: 12px; }
details.notes summary { cursor: pointer; color: var(--agi-accent); font-weight: 700; }
.notes-hidden details.notes { display: none; }

/* Demo: Agent Flow */
.demo .flow-row { display: grid; grid-template-columns: repeat(9, minmax(80px, 1fr)); gap:11px; align-items: center; overflow-x: auto; padding-bottom: 4px; }
.demo .flow-node { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding:11px; min-height: 86px; display: flex; flex-direction: column; gap: 6px; }
.demo .node-title { font-weight: 700; font-size: 13px; }
.demo .node-body { color: var(--agi-light); font-size: 12px; line-height: 1.35; }
.demo .flow-arrow { text-align: center; color: var(--agi-light); font-size: 18px; }

/* Demo: Phone mocks */
.phone { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 22px; padding: 16px; max-width: 480px; margin:11px auto 0; box-shadow: 0 12px 30px rgba(30,27,22,.14); }
.phone-header { display: flex; gap: 12px; align-items: center; }
.phone .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.phone .title { font-weight: 700; }
.phone .subtitle { color: var(--agi-light); font-size: 14px; }
.phone .subtle { color: var(--agi-light); opacity: .8; font-size: 12px; }
.chips { display: flex; gap:11px; flex-wrap: wrap; margin:11px 0; }
.chip { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(30,27,22,.14); color: var(--agi-light); }
.chip-project, .chip.is-project { border-color: var(--agi-accent); color: var(--aa-ok); background: rgba(26,122,67,.14); display: inline-flex; white-space: normal; line-height: 1.25; padding: 6px 10px; }
/* Project member chips (larger) */
.chips .person-chip { font-size: 16px; padding:11px 12px; align-items: flex-start; }
.chips .person-chip .avatar-person { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(30,27,22,.25); }
.chips .person-chip .person-text { display: flex; flex-direction: column; line-height: 1.2; }
.chips .person-chip .person-name { font-weight: 700; color: var(--agi-white); }
.chips .person-chip .person-email { font-size: 12px; color: var(--agi-light); opacity: 0.95; }
.chip-verified { border-color: var(--aa-ok); color: var(--aa-ok); }
.pf-form label { display: flex; flex-direction: column; gap: 6px; margin-bottom:11px; font-size: 12px; color: var(--agi-light); }
.pf-form input { background: var(--aa-surface); color: var(--aa-ink); border: 1px solid rgba(30,27,22,.14); border-radius:11px; padding:11px 12px; }
.stepper { position: relative; }
.steps { display: flex; gap:11px; margin-bottom:11px; }
.steps .dot { width:11px; height:11px; border-radius: 50%; background: var(--agi-gray); opacity: .6; }
.steps .dot.active { background: var(--aa-ok); opacity: 1; }
.pf-step { display: none; }
.pf-step.active { display: block; }
.agent-loader { display: inline-flex; align-items: center; gap: 6px; color: var(--agi-light); margin-top:11px; }
.agent-loader span { width: 6px; height: 6px; border-radius: 50%; background: var(--aa-ok); animation: bounce 1s infinite ease-in-out; }
.agent-loader span:nth-child(2) { animation-delay: .15s; }
.agent-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.8); opacity: .6;} 40% { transform: scale(1.2); opacity: 1; } }
.section { margin-top:11px; }
.section-title { font-weight: 700; margin-bottom: 6px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { background: var(--aa-surface-2); border: 1px solid rgba(30,27,22,.14); padding: 4px 8px; border-radius:11px; font-size: 12px; }
.list { margin: 0; padding-left: 18px; }
.actions { display: flex; gap:11px; margin-top: 12px; }

/* Demo: Swipe */
#swipe-demo { position: relative; }
#swipe-card { min-height: 260px; }
.swipe-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 12px; }
.progress { color: var(--agi-light); font-size: 12px; }

/* Demo: Teams */
.cards.three { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .cards.three { grid-template-columns: 1fr 1fr 1fr; } }
.mini-card { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap:11px; }
.mini-card.with-banner { background-size: cover; background-position: center; position: relative; }
.mini-card.with-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,248,243,.15), rgba(250,248,243,.88)); border-radius: 12px; }
.mini-card.with-banner > * { position: relative; z-index: 1; }
.mini-title { font-weight: 700; }
.mini-sub { color: var(--agi-light); font-size: 12px; }
.status { font-size: 12px; padding: 4px 8px; border-radius: 999px; width: fit-content; }
.status-accepted { background: rgba(26,122,67,.14); color: var(--aa-ok); border: 1px solid var(--aa-ok); }
.status-pending { background: rgba(29,79,161,.13); color: var(--aa-info); border: 1px solid var(--aa-info); }
.status-waitlist { background: rgba(122,90,6,.12); color: var(--aa-warn); border: 1px solid var(--aa-warn); }
.mini-actions { display: flex; gap:11px; }

/* Demo: Quotas */
.quota-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 800px) { .quota-grid { grid-template-columns: 1fr 1fr; } }
.quota { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; }
.quota-title { font-weight: 700; margin-bottom:11px; }
.quota-bar { height:11px; background: var(--aa-ground); border-radius: 999px; border: 1px solid rgba(30,27,22,.14); overflow: hidden; }
.quota-bar .fill { height: 100%; background: linear-gradient(90deg, var(--aa-ok), var(--aa-ok)); width: 50%; }
.quota-nums { color: var(--agi-light); margin:11px 0; }
.quota-actions { display: flex; gap:11px; }

/* Sponsor controls */
.sponsor-controls { margin-top: 16px; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .filter-grid { grid-template-columns: 1fr 1fr 1fr; } }
.filter-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--agi-light); }
.filter-grid input, .filter-grid select { background: var(--aa-surface); color: var(--aa-ink); border: 1px solid rgba(30,27,22,.14); border-radius:11px; padding:11px 10px; }
.agent-card { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.agent-card .row { display: flex; flex-direction: column; gap: 6px; }
.weights { display: grid; grid-template-columns: 1fr 1fr; gap:11px; }
.weights div { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap:11px; }

/* Chat */
.chat { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap:11px; max-height: 420px; overflow: auto; }
.msg { background: var(--aa-surface-2); border: 1px solid rgba(30,27,22,.14); border-radius:11px; padding:11px 10px; font-size: 14px; color: var(--aa-ink); }
.msg.system { background: transparent; border: none; color: var(--agi-light); font-size: 12px; text-align: center; }
.msg.sponsor { border-left: 3px solid var(--aa-ok); }
.msg.agent { border-left: 3px solid var(--aa-info); }
.chat-input { margin-top: 6px; background: var(--aa-ground); border: 1px dashed rgba(30,27,22,.14); border-radius:11px; padding:11px 10px; color: var(--agi-light); }

/* Segments */
.segments { display: flex; flex-direction: column; gap: 12px; }
.segment { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; }
.seg-header { padding:11px 12px; border-bottom: 1px solid rgba(30,27,22,.14); font-weight: 700; }
.seg-controls { display: grid; grid-template-columns: repeat(5, 1fr); gap:11px; padding:11px 12px; }
.seg-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--agi-light); }
.seg-controls input[type="number"], .seg-controls input[type="range"] { background: var(--aa-surface); color: var(--aa-ink); border: 1px solid rgba(30,27,22,.14); border-radius:11px; padding:11px 10px; }
.score-preview { padding:11px 12px; color: var(--agi-light); font-size: 12px; }

/* Team overview */
.team-card { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; position: relative; }
.team-card.with-banner { background-size: cover; background-position: center; }
.team-card.with-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,248,243,.05), rgba(250,248,243,.90)); border-radius: 12px; }
.team-card.with-banner > * { position: relative; z-index: 1; }
.avatars { display: flex; gap: 6px; margin:11px 0; }
.avatars .avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(30,27,22,.25); object-fit: cover; }
/* CTA */
.cta { padding: 36px 0 80px; }
.cta .container { text-align: center; }
.cta-mark { height: 24px; opacity: 0.9; margin-bottom: 12px; }
.cta h3 { margin: 6px 0; font-size: 24px; }
.cta p { color: var(--agi-light); margin: 4px 0 14px; }
.cta-actions { display: flex; gap:11px; justify-content: center; }

/* Footer */
.brand-footer { border-top: 1px solid rgba(30,27,22,.14); padding: 18px 0 60px; }
.brand-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-footer img { height: 22px; }
.brand-footer nav { display: flex; gap: 12px; }
.brand-footer a { color: var(--agi-light); text-decoration: none; }
.brand-footer a:hover { color: var(--agi-white); }

/* Accessibility */
:focus-visible { outline: 2px solid var(--agi-accent); outline-offset: 2px; }


/* Role toggle and admin markers */
.role-toggle { display: inline-flex; gap:11px; margin-right:11px; }
.admin-only { position: relative; }
.admin-only::after { content: "🔒"; position: absolute; top:11px; right: 14px; opacity: 0.8; font-size: 16px; }

/* Local nav (internal pages) */
.local-nav { border-bottom: 1px solid rgba(30,27,22,.14); background: rgba(30,27,22,.14); backdrop-filter: blur(8px); position: sticky; top: 60px; z-index: 19; }
.local-nav .container { display: flex; gap: 12px; align-items: center; padding:11px 20px; }
.local-nav a { color: var(--agi-light); text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius:11px; }
.local-nav a:hover { color: var(--agi-white); background: rgba(30,27,22,.14); }
.local-nav a.active { color: var(--agi-black); background: var(--agi-white); }

/* Participants grid */
.participants-grid .mini-card { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.participants-grid .mini-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(30,27,22,.14); }

/* Participants & Teams controls */
.pt-controls { display: grid; gap:11px; margin:11px 0 12px; }
.pt-row { display: flex; flex-wrap: wrap; gap:11px; align-items: center; }
.legend { display: flex; gap:11px; flex-wrap: wrap; }
.legend .item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--agi-light); padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(30,27,22,.14); }
.legend .dot { width:11px; height:11px; border-radius: 50%; }
.legend .founder .dot { background: var(--col-founder); }
.legend .engineer .dot { background: var(--col-engineer); }
.legend .researcher .dot { background: var(--col-researcher); }
.legend .product .dot { background: var(--col-product); }
.legend .investor .dot { background: var(--col-investor); }
.legend .media .dot { background: var(--col-media); }

.chips input[type="checkbox"], .chips input[type="radio"] { display: none; }
.chips label.chip { cursor: pointer; }
.chips label.chip input:checked + span { color: var(--agi-black); background: var(--agi-white); border-color: var(--agi-white); }

.pt-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .pt-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1100px) { .pt-grid.mode-full { grid-template-columns: 1fr 1fr; } }
/* Equal-height items so footer can pin to bottom */
.pt-grid > * { height: 100%; }

/* Participant card */
.participant-card { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap:11px; height: 100%; }
.participant-header { display: flex; justify-content: space-between; gap:11px; align-items: center; }
.participant-name { font-weight: 700; }
.participant-matching { font-weight: 800; color: var(--agi-white); }
.participant-body { display: flex; flex-direction: column; gap:11px; }
.participant-gauge-row { display: grid; grid-template-columns: auto auto; gap: 12px; align-items: center; justify-content: start; }
.score-nums { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.score-nums .num { font-size: 12px; }
.num-founder { color: var(--col-founder); }
.num-engineer { color: var(--col-engineer); }
.num-product { color: var(--col-product); }
.num-investor { color: var(--col-investor); }
.gauge { position: relative; width: 132px; height: 132px; }
.gauge svg { display: block; width: 132px; height: 132px; }
.gauge .avatar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(30,27,22,.16); }
.gauge .tick { fill: var(--agi-light); opacity: .8; }
.participant-gauge-row .score-nums { display: none; }
.participant-desc { color: var(--agi-light); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.orgs { display: flex; gap:11px; flex-wrap: wrap; align-items: center; }
.org { display: inline-flex; align-items: center; gap: 6px; background: var(--aa-surface-2); border: 1px solid rgba(30,27,22,.14); border-radius: 999px; padding: 4px 8px; }
.org img { width: 14px; height: 14px; border-radius: 3px; object-fit: contain; background:#fff; }

.participant-footer { display: flex; align-items: center; justify-content: space-between; gap:11px; }
/* Pin footer to bottom */
.participant-card .participant-footer { margin-top: auto; }

/* Layout modes */
.participant-card.mode-scores .participant-desc,
.participant-card.mode-scores .orgs { display: none; }
.participant-card.mode-full .card-scroll { max-height: 260px; overflow: auto; }

/* Status labels */
.status-applied { background: rgba(29,79,161,.13); color: var(--aa-info); border: 1px solid var(--aa-info); }
.status-approved { background: rgba(26,122,67,.14); color: var(--aa-ok); border: 1px solid var(--aa-ok); }
.status-waiting_for_approval { background: rgba(122,90,6,.12); color: var(--aa-warn); border: 1px solid var(--aa-warn); }

/* Collapsible header */
.collapse-header { width: 100%; display: block; background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding:11px 12px; font-weight: 700; cursor: pointer; text-align: left; }
.collapse-header .right { float: right; color: var(--agi-light); }

/* Selected event highlight */
.mini-card.selected {
  outline: 2px solid var(--aa-ok);
  box-shadow: 0 0 0 3px rgba(26,122,67,.14);
}

/* Sponsor grid and dropdowns */
.sponsor-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 800px) { .sponsor-grid { grid-template-columns: 1fr 1fr; } }
.sponsor-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.sponsor-carousel .sponsor-card { min-width: 320px; scroll-snap-align: start; }
.sponsor-carousel .sponsor-card.primary { min-width: 420px; }
.sponsor-card { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; overflow: hidden; }
.sponsor-banner { height: 120px; background: var(--aa-ground) center/cover no-repeat; }
.sponsor-body { padding: 12px; }
.sponsor-header { display: flex; justify-content: space-between; align-items: center; }
.sponsor-name { font-weight: 700; }
.sponsor-type { color: var(--agi-light); font-size: 12px; }
.sponsor-panel { padding:11px; border-top: 1px solid rgba(30,27,22,.14); }
.sponsor-toggle { background: transparent; border: 1px solid rgba(30,27,22,.14); color: var(--agi-light); border-radius:11px; padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sponsor-toggle::after { content: "▾"; font-size: 12px; opacity: .9; }
.sponsor-panel { font-size: 14px; line-height: 1.55; }
.sponsor-goals { margin-top:11px; }
.sponsor-goals textarea { width: 100%; min-height: 80px; background: var(--aa-surface); color: var(--aa-ink); border: 1px solid rgba(30,27,22,.14); border-radius:11px; padding:11px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(30,27,22,.45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 30; }
.modal-backdrop.show { display: flex; }
.modal-dialog { background: var(--aa-surface); border: 1px solid rgba(30,27,22,.14); border-radius: 16px; width: min(900px, 60vw); max-height: 80vh; overflow: auto; position: relative; padding: 18px; box-shadow: 0 20px 50px rgba(30,27,22,.14); }
@media (max-width: 900px) { .modal-dialog { width: 100%; max-height: 90vh; } }
.modal-close { position: absolute; top:11px; right: 12px; background: transparent; color: var(--agi-light); border: none; font-size: 22px; cursor: pointer; }
.modal-header { display: flex; gap: 12px; align-items: center; margin-bottom:11px; }
.modal-header .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(30,27,22,.16); }
.modal-body { display: grid; gap: 12px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .modal-grid { grid-template-columns: 1fr; } }
.modal-section { background: var(--aa-surface-2); border: 1px solid rgba(30,27,22,.14); border-radius: 12px; padding: 12px; }
.modal-section h4 { margin: 0 0 6px; }


