/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/************/

html{
  overflow-x: hidden;
  max-width: 100%;
}

body *{
  box-sizing: border-box;
}

body{
  font-family: "Nunito", sans, sans-serif;
  font-weight: 400;
  font-style: normal;
  background-color: rgba(16, 31, 49, 1.0);
  background-image: linear-gradient(to bottom, transparent, rgba(16, 31, 49, 1.0)), url('header_background.webp');
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
  background-position: top center;
}

#background{
  background-color: rgba(16, 31, 49, 1.0);
  background-image: linear-gradient(to bottom, transparent, rgba(16, 31, 49, 0.5)), url('header_background.webp');
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
  background-position: top center;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

#blur{
  backdrop-filter: blur(1.25rem);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

#wrapper{
  width: 100%;
  overflow-x: hidden;
}

#content, #below-the-fold{
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5em 0 0 0;
}

#below-the-fold{
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
  backdrop-filter: blur(100px);
  padding: 2.5em 5em 0 5em;
  font-family: "Nunito", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  max-width: 100%;
}

h1#logo{
  margin-top: 3em;
  position: relative;
  top: 1em;
  display: block;
  text-align: center;
}

h1#logo img{
  filter: brightness(0) invert(1);
  width: 20%;
  min-width: 300px;
  max-width: 100%;
}

/* Hero section */
#hero{
  font-family: "Libre Caslon Text", serif;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0em 0;
  font-weight: 400;
}

#call-to-action{
  line-height: 3em;
}

#call-to-action #who, #call-to-action #where{
  font-size: 2.75em;
  line-height: 1.25em;
  color: white;
}

#call-to-action i{
  font-style: italic;
  font-weight: 700;
}

#call-to-action #what{
  font-size: 1.5em;
  line-height: 1.5em;
  margin-top: .25em;
  margin-bottom: 1em;
  color: rgba(255, 255, 255, 0.85);
  display: none;
}

#call-to-action #what span::after{
  content: " \00B7  ";
}

#call-to-action #what span:last-child::after{
  content: "";
}

#cta-buttons{
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.5em 0 3em 0;
}

#call-to-action #get-started,
#call-to-action #log-in{
  color: black;
  padding: .5em 1.25em;
  border-radius: 40px;
  text-decoration: none;
  font-size: 1.5em;
  display: inline-block;
  background: white;
  border: 1px solid transparent;
}

#call-to-action #get-started:hover,
#call-to-action #log-in:hover{
  border: 1px solid black;
}

#call-to-action #get-started span{
  position: relative;
  right: -0.2em;
}

/* About section */

section.about{
  margin: 0em auto 2em auto;
  font-size: 1.4em;
  color: white;
  line-height: 1.4em;
  text-align: left;
  max-width: 100%;
  padding: 0 2em;
}

section.about a{
  color: white;
  font-style: underline;
}

/* Use case sections */
.use-case{
  text-align: center;
  position: relative;
  overflow: visible;
  margin: 0 auto;
  max-width: 1200px;
}

/* Browser-window frame: the scroll-animated object (replaces the old <img>).
   It contains .frame-chrome (traffic lights + titlebar) and .frame-viewport
   (clipped window showing the scaled-down live conversation). */
.use-case .browser-frame{
  margin: 1em auto 4em 0;
  position: relative;
  width: 95%;
  will-change: transform;
  z-index: 1;
  display: block;
  padding: 0;
  border: none;
  background: #FFFBF7;
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55), 0 12px 24px -12px rgba(0,0,0,0.45);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  transition: box-shadow 0.25s ease;
}

.use-case .browser-frame:hover{
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), 0 16px 32px -12px rgba(0,0,0,0.5);
}

.use-case .browser-frame:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.use-case .frame-chrome{
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: linear-gradient(to bottom, #e8e3da, #d9d3c8);
  border-bottom: 1px solid #c2bcb0;
  user-select: none;
}

.use-case .traffic-lights{
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.use-case .traffic-lights .light{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 0.5px solid rgba(0,0,0,0.15);
}

.use-case .traffic-lights .light.red{ background: #ff5f57; }
.use-case .traffic-lights .light.yellow{ background: #febc2e; }
.use-case .traffic-lights .light.green{ background: #28c840; }

.use-case .frame-titlebar{
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #5b5346;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1em;
}

.use-case .frame-viewport{
  position: relative;
  overflow: hidden;
  /* Aspect ratio matches the original screenshots (2048x1335 ≈ 1.535:1).
     This gives the miniature a familiar browser-viewport shape. */
  aspect-ratio: 2048 / 1335;
  background: #FFFBF7;
}

/* The frame-content holds the real conversation-card rendered at a fixed
   2048px width (matching the original screenshot resolution), then scaled
   down via JS to fit the viewport width. The conversation-card is centered
   at a realistic app width so text wraps naturally. The viewport clips
   the overflow — like a browser window showing the top of a long page. */
.use-case .frame-content{
  transform-origin: top left;
  width: 2048px;
  min-height: 1335px;
  background: #FFFBF7;
  pointer-events: none; /* the whole frame is the click target */
  /* transform set by JS: scale = viewport.clientWidth / 2048 */
}

.use-case .frame-content .conversation-card{
  max-width: 900px;
  margin: 0 auto;
}

.use-case-heading{
  color: white;
  font-size: 1em;
  line-height: 1.5em;
  margin: 0rem 0 0em 0;
  text-align: center;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.use-case-heading::after{
  content: ".";
}

.use-case::after{
  content: "❦";
  display: block;
  font-size: 3em;
  padding: 0em 0 3rem 0;
  color: white;
}

.use-case:last-child::after{
  content: "";
  padding-top: 7em;
}

.use-case-heading a.autopoetic-for{
  font-family: "Libre Caslon Text", serif;
  font-style: italic;
  font-size: 1.2em;
  color: white;
}

/* Conversation cards - light background matching app */
.conversation-card{
  background: #FFFBF7;
  padding: 0em;
  color: #000;
}

/* Conversation page styles (adapted from app) */
.conversation-page{
  font-size: 22px;
  line-height: 1.6;
  color: #000;
}

.conversation-page .messages{
  width: 100%;
  display: flex;
  flex-direction: column;
}

.conversation-page .message{
  padding: 2px 0;
  margin-bottom: 16px;
  align-items: flex-start;
  gap: 12px;
}

.conversation-page .user-message{
  justify-content: flex-end;
}

.conversation-page .user-message .message-body{
  background: white;
  border: 1px solid black;
  padding: 12px 16px;
  border-radius: 4px;
  max-width: 80%;
  font-size: 22px;
  text-align: justify;
  white-space: pre-wrap;
  line-height: 1.6;
  overflow: hidden;
}

.conversation-page .agent-message .message-body{
  font-size: 22px;
  line-height: 1.6;
  text-align: justify;
  overflow: hidden;
}

.conversation-page .agent-message .message-body p:first-child{
  margin-top: 0;
}

.conversation-page .agent-message .message-body p:last-child{
  margin-bottom: 0;
}

.conversation-page .agent-message .message-body p{
  margin: 1em 0;
}

.conversation-page .agent-message .message-body ul,
.conversation-page .agent-message .message-body ol{
  padding-left: 1.5em;
  margin: 1em 0;
}

.conversation-page .agent-message .message-body li{
  margin: 0.5em 0;
}

.conversation-page .agent-message .message-body h3,
.conversation-page .agent-message .message-body h4{
  font-weight: 700;
  margin: 0.75em 0 0.25em;
}

.conversation-page .agent-message .message-body h3{
  font-size: 1.1em;
}

.conversation-page .agent-message .message-body h4{
  font-size: 1em;
}

.conversation-page .agent-message .message-body blockquote{
  border-left: 3px solid #000;
  padding-left: 0.75em;
  margin: 0.5em 0;
  color: #333;
}

.conversation-page .agent-message .message-body blockquote p{
  margin: 0.5em 0;
}

.conversation-page .agent-message .message-body strong{
  font-weight: 700;
}

.conversation-page .agent-message .message-body em{
  font-style: italic;
}

.conversation-page .agent-message .message-body hr{
  border: none;
  border-top: 1px solid #ccc;
  margin: 1em 0;
}

.conversation-page .agent-response{
  width: 100%;
}

.conversation-page .agent-display-name{
  display: block;
  color: #333;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.conversation-page .individual-perspective{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1em;
  padding-right: 1em;
}

.conversation-page .individual-perspective .perspective-emoji{
  margin-right: 0.25em;
  font-size: 1em;
  display: inline-block;
  position: relative;
  top: -3px;
  flex-shrink: 0;
  line-height: 1.6;
}

.conversation-page .individual-perspective .perspective-text{
  flex: 1;
  font-size: 22px;
  line-height: 1.6;
  text-align: justify;
  color: #333;
}

.conversation-page .perspective-divider{
  color: #333;
  font-size: 18px;
  user-select: none;
  margin: 0.75em 0;
}

/* Steering visualization */
.conversation-page .steering-viz{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  margin-top: 1em;
}

.conversation-page .steering-viz .contribution-bar{
  width: 100%;
  min-width: 0;
}

.conversation-page .sv-container{
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-height: 50vh;
  max-width: 70vh;
}

.conversation-page .sv-canvas{
  cursor: pointer;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

/* Contribution bar */
.conversation-page .contribution-bar{
  margin-top: 12px;
  margin-bottom: 0;
}

.conversation-page .contribution-segments{
  display: flex;
  height: 6px;
  overflow: hidden;
}

.conversation-page .contribution-segments .segment{
  height: 100%;
  min-width: 1px;
  transition: width 0.3s ease;
}

.conversation-page .contribution-labels{
  position: relative;
  height: 22px;
  margin-top: 2px;
}

.conversation-page .contribution-labels .label{
  position: absolute;
  transform: translateX(-50%);
  font-size: 14px;
  line-height: 22px;
}

/* Fullscreen overlay */
#sv-fullscreen-overlay{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(255, 251, 247, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.sv-fullscreen-canvas{
  width: min(80vw, 80vh);
  height: min(80vw, 80vh);
}

.sv-download-buttons{
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 12px;
  z-index: 10002;
}

.sv-download-btn{
  background: none;
  color: #000;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.sv-download-btn:hover{
  opacity: 1;
}

/* Footer */
footer{
  padding: 2rem;
  font-size: 1em;
  position: relative;
  color: white;
  z-index: 1;
  backdrop-filter: blur(100px);
}

footer #copyright{
  margin-bottom: .5em;
}

footer .links li{
  display: inline;
}

footer .links li::after{
  content: " ";
}

footer .links a{
  color: white;
}

/* Responsive */
@media only screen and (max-width: 99999px) {
  #content{
    max-width: 1200px;
    margin: 0 auto;
  }

  #call-to-action{
  }

  #call-to-action #who, #call-to-action #where{
    font-size: clamp(2.25rem, 5vw, 4rem);
  }

  #call-to-action #what{
    display: block;
  }

  #call-to-action #what span{
    font-size: clamp(1rem, 2.5vw, 2rem);
  }

  #call-to-action #get-started,
  #call-to-action #log-in{
    font-size: clamp(1.5rem, 2vw, 4rem);
  }

  .use-case-heading{
    font-size: clamp(1.5rem, 4vw, 1.5rem);
  }

  .conversation-card{
    padding: 1.5em;
  }

  /* Frame keeps the 110% width + left -5% so the scroll animation behaves
     identically to the old <img>. */
  .use-case .browser-frame{
  }

  .conversation-page .user-message{
    justify-content: flex-start;
    width: 100%;
  }

  .conversation-page .user-message .message-body{
    width: 100%;
    max-width: 100%;
    font-size: 0.88em;
  }

  .conversation-page .agent-message .message-body,
  .conversation-page .individual-perspective .perspective-text{
    font-size: 0.88em;
  }

  .conversation-page .sv-container{
    overflow: hidden;
  }

  .conversation-page .sv-container .sv-canvas{
    scale: 1.1;
    margin: -3vh 0;
  }

  .sv-fullscreen-canvas{
    width: 120vw !important;
    height: 120vw !important;
  }
}

@media only screen and (max-width: 800px) {
  body{
    padding: 0;
  }

  h1#logo{
    margin-top: 3em;
    margin-bottom: 2em;
  }

  #content{
    padding: 1.5em;
    padding-top: 0;
  }

  #below-the-fold{
    padding: 2em;
  }

  #call-to-action #get-started,
  #call-to-action #log-in{
    display: block;
    width: 100%;
    line-height: 1.5em;
  }

  #cta-buttons{
    margin-bottom: 1em;
  }

  section.about{
    margin-bottom: 2em;
    font-size: 1.1em;
    color: white;
    line-height: 1.4em;
    padding: 0 0.25em;
  }

  .use-case{
    margin-left: -1.5em;
    margin-right: -1.5em;
    margin-bottom: 0em;
  }

  .use-case-heading{
    font-size: 1em;
  }

  .use-case .browser-frame{
    width: 95%;
    left: 2.5%;
    will-change: transform;
  }

  .use-case::after{
    padding: 3rem 0 4rem 0;
    font-size: 3em;
    color: white;
  }

  .conversation-card{
    padding: 1em;
    border-radius: 0;
  }

  .conversation-page .user-message .message-body,
  .conversation-page .agent-message .agent-reponse,
  .conversation-page .agent-message .agent-display-name,
  .conversation-page .agent-message .perspective-text{
    font-size: 0.75em;
  }

  .conversation-page .agent-message .message-body{
    font-size: 0.75em;
  }

  .conversation-page .individual-perspective{
    padding-right: 0em;
  }
}

/* Fullscreen overlay for the expanded conversation. The thumbnail's
   .conversation-card is cloned into .uc-overlay-content; the raw
   conversation-page styles already defined above apply at readable size. */
.uc-overlay{
  position: fixed;
  inset: 0;
  background: rgba(16, 31, 49, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  opacity: 0;
  /* opacity is animated via the Web Animations API in use-case-expand.js */
}

.uc-overlay.uc-open{
  opacity: 1;
}

.uc-overlay-content{
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  background: #FFFBF7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2em 2.5em 4em 2.5em;
  position: relative;
  /* FLIP: starts at the thumbnail's rect (set inline by JS), animates to
     identity. transform-origin: top left matches the thumbnail's origin. */
  transform-origin: top left;
  will-change: transform, opacity;
}

.uc-overlay-content .conversation-card{
  padding: 0;
  background: transparent;
}

.uc-close-btn{
  position: sticky;
  top: 0;
  float: right;
  margin: -0.5em 0em 0.5em 0;
  background: rgba(255, 255, 255, 1);
  border: 1px solid black;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  color: black;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.15s, color 0.15s;
}

.uc-close-btn:hover{
  background: #fff;
  color: #000;
}

body.uc-no-scroll{
  overflow: hidden;
}

/* Mobile tweaks for the overlay */
@media only screen and (max-width: 800px){
  .uc-overlay-content{
    padding: 1.5em 1.25em 4em 1.25em;
  }

  .uc-overlay-content .conversation-page .user-message .message-body,
  .uc-overlay-content .conversation-page .agent-message .message-body,
  .uc-overlay-content .conversation-page .individual-perspective .perspective-text{
    font-size: 0.88em;
  }
}

/* Reduced motion: skip FLIP and scroll animations entirely. */
@media (prefers-reduced-motion: reduce){
  .use-case .browser-frame{
    will-change: auto;
  }

  .uc-overlay{
    transition: opacity 0.01s;
  }
}
