:root {
  --bg: #f4f2ec;
  --paper: #fbfaf7;
  --ink: #161616;
  --muted: #5d5a55;
  --line: #d5d1c8;
  --accent: #1f3a5f;
  --deep: #121820;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(#000 0.35px, transparent 0.35px);
  background-size: 3px 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
  background: rgba(244, 242, 236, 0.85);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.topbar nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.topbar a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.topbar button {
  color: var(--ink);
  font-size: 0.92rem;
}

.home-toggle {
  border: 1px solid rgba(18, 24, 32, 0.85);
  background: linear-gradient(180deg, #fffefb 0%, #f1ecdf 100%);
  color: var(--deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 2px 0 rgba(18, 24, 32, 0.3), 0 10px 20px rgba(18, 24, 32, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.home-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 0 rgba(18, 24, 32, 0.35), 0 14px 24px rgba(18, 24, 32, 0.15);
}

.home-toggle:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(18, 24, 32, 0.28), 0 6px 12px rgba(18, 24, 32, 0.14);
}

.demo-toggle {
  border: 1px solid rgba(18, 24, 32, 0.4);
  background: linear-gradient(180deg, #f8fbff 0%, #e6eef9 100%);
  color: #132743;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 2px 0 rgba(19, 39, 67, 0.22), 0 10px 20px rgba(19, 39, 67, 0.1);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.demo-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 0 rgba(19, 39, 67, 0.26), 0 14px 24px rgba(19, 39, 67, 0.14);
}

.demo-toggle:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(19, 39, 67, 0.2), 0 6px 12px rgba(19, 39, 67, 0.12);
}

.brand {
  position: relative;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(22, 22, 22, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.25);
}

.cta-mini {
  border: 1px solid var(--ink);
  padding: 0.45rem 0.8rem;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.main-tabs {
  display: flex;
  gap: 0.6rem;
  margin: 0.6rem 0 1rem;
}

.main-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  cursor: pointer;
}

.main-tab.active {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.6rem 0 1rem;
}

.home-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.hero {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.1;
  margin: 0;
}

h1 {
  margin-top: 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  max-width: 18ch;
}

h1 span {
  color: var(--accent);
}

.lead {
  max-width: 68ch;
  margin-top: 1.2rem;
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  text-decoration: none;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  font-weight: 600;
}

.btn-dark {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}

.btn-light {
  background: transparent;
  color: var(--ink);
}

.metrics {
  margin: 2.2rem 0;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, 1fr);
}

.credential-strip {
  margin-top: 1.6rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.credential-card {
  border: 1px solid var(--line);
  background: #fff;
  min-height: 108px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.credential-card img {
  width: min(200px, 90%);
  max-height: 50px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.92;
}

.credential-card p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.credential-card small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  text-align: center;
}

.credential-card a {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 58, 95, 0.35);
}

.credential-card-mit img {
  max-height: 42px;
}

.credential-card-unimarconi img {
  max-height: 38px;
}

.metrics article {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem;
}

.metrics h3 {
  font-size: 1.6rem;
}

.metrics p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.6rem 0 0;
  line-height: 1.45;
}

.experience-strip {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.9rem;
}

.experience-logos {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.experience-logos article {
  border: 1px solid var(--line);
  background: var(--paper);
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
}

.experience-logos img {
  width: 100%;
  max-height: 34px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.9;
}

.experience-note {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.editorial-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.35rem;
  min-height: 170px;
}

.panel.dark {
  background: var(--deep);
  color: #f2f2f2;
}

.kicker {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.7rem;
  opacity: 0.9;
}

.panel h2 {
  font-size: clamp(1rem, 2.3vw, 1.5rem);
  line-height: 1.3;
}

.tracks {
  margin-top: 2.8rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.tracks h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.track-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.track-list article {
  border: 1px solid var(--line);
  background: #fff;
  padding: 1rem;
}

.track-list h3 {
  font-size: 1.1rem;
}

.track-list p {
  color: var(--muted);
  line-height: 1.45;
}

.speaker-profile {
  margin-top: 2.8rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.speaker-head p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.speaker-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.speaker-grid article {
  border: 1px solid var(--line);
  background: #fff;
  padding: 1rem;
}

.speaker-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.speaker-grid ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

.speaker-platforms {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.speaker-platforms span {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.speaker-note {
  margin: 0.8rem 0 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.speaker-events {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 1rem;
}

.speaker-events h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

.speaker-event {
  padding: 0.6rem 0;
  border-top: 1px dashed var(--line);
}

.speaker-event:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.event-org {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-title {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.event-meta {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.demo-proof {
  margin-top: 2.8rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.demo-proof-head p {
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.demo-portfolio {
  display: grid;
  gap: 0.9rem;
}

.demo-card {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 1rem;
}

.demo-card-placeholder {
  background: var(--paper);
}

.demo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.demo-title-row h3 {
  font-size: 1.25rem;
}

.demo-intelligence-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.demo-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.9rem;
}

.demo-panel h4,
.demo-outcome-lens h4 {
  margin: 0;
  font-size: 1rem;
}

.demo-panel p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.demo-panel ul,
.demo-panel ol {
  margin: 0.65rem 0 0;
  padding-left: 1.05rem;
  color: var(--muted);
  line-height: 1.45;
}

.demo-outcome-lens {
  margin-top: 0.8rem;
  border: 1px dashed var(--line);
  padding: 0.9rem;
  background: #fcfbf8;
}

.demo-outcome-lens p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.demo-access {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.demo-access span {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.demo-access code {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
}

.demo-note {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.chat-wrap {
  margin-top: 1rem;
  border: 1px solid rgba(18, 24, 32, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(251, 249, 244, 0.96) 100%);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(18, 24, 32, 0.12),
    0 18px 36px rgba(18, 24, 32, 0.08);
  overflow: hidden;
}

.chat-header {
  padding: 1.2rem 1.2rem 0.35rem;
  border-bottom: 1px solid rgba(18, 24, 32, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(250, 247, 240, 0.65) 100%);
}

.chat-header h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  letter-spacing: 0.01em;
}

.chat-header p {
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 72ch;
}

.avatar-modes {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.avatar-note {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.avatar-mode {
  border: 1px solid rgba(18, 24, 32, 0.2);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.82rem;
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.avatar-mode.active {
  border-color: rgba(18, 24, 32, 0.9);
  background: linear-gradient(180deg, #1b2736 0%, #111823 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(18, 24, 32, 0.15);
}

.suggested {
  padding: 0 1rem 0.8rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.suggested-secondary {
  padding-top: 0.2rem;
}

.suggestion {
  border: 1px solid rgba(18, 24, 32, 0.15);
  background: linear-gradient(180deg, #fff 0%, #f4f0e7 100%);
  border-radius: 999px;
  padding: 0.48rem 0.82rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.suggestion:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 24, 32, 0.28);
  box-shadow: 0 6px 14px rgba(18, 24, 32, 0.1);
}

.chat-log {
  margin: 0 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(18, 24, 32, 0.12);
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.016) 0px,
      rgba(0, 0, 0, 0.016) 1px,
      transparent 1px,
      transparent 28px
    ),
    #f9f7f1;
}

.msg {
  margin-bottom: 0.7rem;
  padding: 0.6rem 0.65rem;
  line-height: 1.45;
}

.msg.user {
  background: linear-gradient(180deg, #e5edfb 0%, #d7e3f8 100%);
  border: 1px solid rgba(31, 58, 95, 0.15);
  border-radius: 10px;
  margin-left: 15%;
}

.msg.assistant {
  background: linear-gradient(180deg, #f2eee3 0%, #ebe4d3 100%);
  border: 1px solid rgba(22, 22, 22, 0.08);
  border-radius: 10px;
  margin-right: 12%;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1rem 0.9rem;
}

.chat-form input {
  flex: 1;
  border: 1px solid rgba(18, 24, 32, 0.18);
  border-radius: 8px;
  padding: 0.75rem 0.8rem;
  font-size: 0.96rem;
  background: rgba(255, 255, 255, 0.9);
}

.chat-form button {
  border: 1px solid rgba(18, 24, 32, 0.85);
  background: linear-gradient(180deg, #1b2736 0%, #111823 100%);
  color: #fff;
  padding: 0.75rem 1.05rem;
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

footer {
  max-width: 1180px;
  margin: 0 auto 2rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

footer a {
  color: var(--ink);
}

@media (max-width: 960px) {
  .credential-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .track-list,
  .editorial-grid,
  .speaker-grid {
    grid-template-columns: 1fr;
  }

  .experience-logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-intelligence-grid {
    grid-template-columns: 1fr;
  }

  .demo-access {
    grid-template-columns: 1fr;
  }

  .topbar nav {
    display: none;
  }
}

@media (max-width: 620px) {
  .credential-strip {
    grid-template-columns: 1fr;
  }

  .experience-logos {
    grid-template-columns: 1fr;
  }
}
