.home-hero {
  background: #0b1220;
  color: #f4f7ff;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 72px;
  padding-block: 76px 92px;
}

.home-intro-copy {
  min-width: 0;
}

.intro-product {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 15px;
  font-weight: 600;
}

.intro-product .brand-mark {
  width: 27px;
  height: 27px;
}

.home-intro h1 {
  font-size: clamp(44px, 4.5vw, 68px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.intro-description {
  max-width: 470px;
  margin-top: 28px;
  color: #bfcbdf;
  font-size: 16px;
}

.home-intro .actions {
  margin-top: 32px;
  gap: 24px;
}

.intro-primary {
  background: #f4f7ff;
  color: #14213d;
}

.intro-primary:hover {
  background: #dfe8fc;
  color: #14213d;
}

.intro-footnote {
  margin-top: 28px;
  color: #a8badd;
  font-size: 12px;
}

.intro-context {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-top: 1px solid #e3e8f0;
  padding: 20px 28px;
  background: #f8faff;
  border-radius: 0 0 18px 18px;
}

.intro-context > span {
  color: #244ce8;
  font-size: 22px;
}

.intro-context strong {
  font-size: 13px;
}

.intro-context p {
  margin-top: 5px;
  color: #58647b;
  font-size: 12px;
}

.product-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  list-style: none;
  margin: 48px 0 36px;
  padding: 0;
}

.product-steps li {
  border-top: 1px solid #cdd5e4;
  padding-top: 19px;
  scroll-margin-top: 40px;
}

.step-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  font-size: 12px;
  color: #58647b;
}

.step-top > span:first-child {
  color: #244ce8;
  font-size: 16px;
  font-weight: 600;
}

.product-steps h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 14px;
}

.product-steps p {
  font-size: 14px;
  color: #58647b;
  line-height: 1.8;
}

@media (width <= 1100px) {
  .home-intro {
    gap: 36px;
    padding-block: 56px 72px;
  }

  .home-intro h1 {
    font-size: 48px;
  }

  .intro-description {
    font-size: 15px;
  }

  .intro-preview .story-conversation {
    padding: 22px;
  }

  .intro-preview .story-message {
    padding: 14px;
    max-width: 94%;
  }

  .product-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 38px;
  }
}

@media (width <= 767px) {
  .home-intro {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-block: 38px 56px;
  }

  .home-intro h1 {
    font-size: clamp(40px, 8vw, 54px);
  }

  .intro-product {
    margin-bottom: 24px;
  }

  .intro-description {
    margin-top: 22px;
  }

  .home-intro .actions {
    gap: 22px;
  }

  .intro-preview {
    max-width: 580px;
  }

  .intro-preview .story-conversation {
    padding: 18px;
  }

  .intro-preview .story-panel-head {
    padding: 16px 18px;
  }

  .intro-context {
    padding: 18px;
  }

  .product-steps {
    gap: 26px;
    margin-top: 32px;
  }

  .step-top {
    margin-bottom: 20px;
  }
}

@media (width <= 480px) {
  .product-steps {
    grid-template-columns: 1fr;
  }

  .step-top {
    margin-bottom: 14px;
  }

  .product-steps h3 {
    margin-bottom: 8px;
  }
}

@media print {
  .home-hero {
    background: #fff;
    color: #14213d;
  }

  .home-intro {
    display: block;
    padding-block: 20px;
  }

  .home-intro h1 {
    color: #14213d;
    font-size: 32px;
  }

  .intro-description,
  .intro-footnote {
    color: #14213d;
  }

  .intro-product,
  .intro-preview,
  .home-intro .actions {
    display: none;
  }

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

  .product-steps li {
    break-inside: avoid;
  }
}

.story-visual {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid #dce2ee;
  border-radius: 18px;
  background: #fff;
  color: #14213d;
  font-size: 14px;
  line-height: 1.6;
}

.story-visual small {
  font-size: 12px;
}

.story-visual p {
  line-height: inherit;
}

.story-visual strong {
  font-weight: 600;
}

.story-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #e3e8f0;
  color: #58647b;
  font-size: 12px;
}

.story-panel-head > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #14213d;
  font-weight: 600;
}

.story-panel-head .brand-mark {
  width: 23px;
  height: 23px;
}

.story-conversation {
  padding: 28px;
}

.story-window-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e3e8f0;
}

.story-window-title small {
  display: block;
  color: #58647b;
  margin-top: 2px;
}

.story-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eef1f6;
  color: #415571;
  font-size: 15px;
}

.story-online {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 20px;
  background: #edf6f1;
  color: #216340;
  font-size: 12px;
}

.story-message {
  padding: 16px 18px;
  max-width: 88%;
  margin-top: 20px;
  border-radius: 12px;
}

.story-message-customer {
  margin-left: auto;
  background: #edf2ff;
  color: #263b69;
  border-bottom-right-radius: 3px;
}

.story-message-customer small {
  display: block;
  margin-top: 6px;
  text-align: right;
  color: #58647b;
}

.story-message-bot {
  background: #f4f6f9;
  border-bottom-left-radius: 3px;
}

.story-bot-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #415571;
}

.story-bot-name .brand-mark {
  width: 18px;
  height: 18px;
}

.story-message-short {
  margin-left: auto;
  width: max-content;
  padding: 10px 18px;
  background: #244ce8;
  color: #fff;
  border-bottom-right-radius: 3px;
}

/* The homepage opening. curtain-gate.js owns its state on <html data-opening>; the curtain
   also lifts itself at 3.2 s even if no script runs. */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 72%, #16233a 0%, #0b111c 62%);
  color: #f2f6fc;
  animation: curtain-lift 0.4s ease 3.2s forwards;
}

/* Its own name, so the fade restarts instead of resuming the 3.2 s lift's timeline. */
html[data-opening="lifting"] .curtain {
  animation: curtain-out 0.35s ease forwards;
}

@keyframes curtain-lift {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes curtain-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

html[data-opening="off"] .curtain,
body:has(:target) .curtain {
  display: none;
}

@media (prefers-reduced-motion: reduce), (scripting: none), print {
  .curtain {
    display: none;
  }
}

.curtain-film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.curtain[data-film="playing"] .curtain-film {
  opacity: 1;
}

.curtain-title {
  position: relative;
  padding-inline: 16px;
  text-align: center;
  transition:
    opacity 0.5s ease 0.2s,
    transform 0.7s ease 0.2s;
}

.curtain[data-film="playing"] .curtain-title {
  opacity: 0;
  transform: translateY(-40px);
}

.curtain-word {
  margin: 0 -0.42em 0 0;
  font-size: clamp(44px, 10vw, 156px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: 0.42em;
  color: rgb(242 246 252 / 52%);
}

.curtain-place {
  margin: 26px -0.34em 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: rgb(198 210 230 / 92%);
}

.curtain-skip {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgb(242 246 252 / 32%);
  border-radius: 100px;
  background: rgb(11 17 28 / 60%);
  color: #f2f6fc;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transform: translateX(-50%);
}

.curtain-skip:focus-visible {
  outline: 3px solid #b5d9ff;
  outline-offset: 4px;
}
