/* Homepage product story and film. Uses the public brand tokens. */

.ca-hero {
  padding-bottom: clamp(48px, 6vw, 88px);
}

.ca-hero-grid {
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 4vw, 64px);
}

.ca-hero .ca-display {
  font-size: clamp(2.35rem, 1.15rem + 3.9vw, 4.5rem);
  letter-spacing: -.045em;
}

.ca-hero h1 .ca-accent {
  color: #86b6ff;
}

.ca-product-story {
  position: relative;
  width: 100%;
  max-width: 600px;
  container-type: inline-size;
  margin-inline: auto;
  border: 1px solid #29354c;
  border-radius: 24px;
  background: #101724;
  box-shadow: 0 30px 90px #0003;
  overflow: hidden;
}

.ca-story-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 23px 26px;
  font-size: .72rem;
  color: #a9b9d1;
}

.ca-story-brand {
  font-weight: 650;
  color: #e8f1ff;
}

.ca-story-art {
  display: grid;
  gap: 7cqi;
  padding: 3% 9% 9%;
}

.ca-story-statement {
  margin: 0;
  font-size: clamp(1.45rem, 7.4cqi, 2.8rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.045em;
  color: #f3f6fc;
}

.ca-story-statement span {
  display: block;
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

.ca-story-player {
  width: 100%;
  overflow: hidden;
  background: #e8eef6;
  border-radius: 13px;
  box-shadow: 0 22px 38px #0004;
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

.ca-story-player img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.ca-story-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 21px 26px;
  border-top: 1px solid #ffffff14;
  color: #c4d2e6;
  font-size: .82rem;
}

.ca-story-caption button {
  border: 0;
  background: none;
  color: #a9b9d1;
  padding: 5px 0;
  font: inherit;
  font-size: .7rem;
  cursor: pointer;
  flex: none;
}

/* Keep the caption geometry stable before JS and with reduced motion. */
.ca-story-caption button[hidden] {
  display: block;
  visibility: hidden;
}

.ca-story-caption button span {
  margin-left: 5px;
}

[data-motion-step="0"] .ca-story-player {
  opacity: .65;
  transform: translateY(8px) scale(.98);
}

[data-motion-step="0"] .ca-story-statement span:nth-child(n+2), [data-motion-step="1"] .ca-story-statement span:nth-child(3) {
  opacity: .35;
  transform: translateY(5px);
}

.ca-film {
  padding-top: 40px;
  background: var(--ink-900);
}

.ca-film-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 40px;
}

.ca-film-heading > p {
  max-width: 38ch;
  color: #b4c2d8;
  font-size: 1rem;
}

.ca-film-heading .ca-h2 {
  margin: 0;
}

.ca-film-frame {
  margin: 0;
}

.ca-film-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  background: #080c14;
  border: 1px solid #29364b;
  border-radius: 20px;
  box-shadow: 0 35px 90px #0004;
  color-scheme: dark;
}

.ca-film-frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  font-size: .82rem;
  color: #99abc5;
}

.ca-film-frame figcaption a {
  color: #c4d7f4;
  flex: none;
}

.ca-film-duration {
  font-family: var(--font-mono);
  color: #a7c0df;
  margin-left: 18px;
}

.ca-film-error {
  margin-top: 20px;
  color: #f4c8bd;
}

.ca-film-error a {
  text-decoration: underline;
}

.ca-principles {
  border-top: 1px solid #ffffff14;
  background: #0e1522;
}

.ca-principles .ca-h2 {
  max-width: 780px;
}

.ca-principles-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 40px;
  margin-top: 60px;
}

.ca-principles-grid article {
  border-top: 1px solid #314159;
  padding-top: 24px;
}

.ca-principles-grid article > span {
  font-size: .66rem;
  letter-spacing: .12em;
  color: #79baef;
}

.ca-principles-grid h3 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 24px 0 16px;
  letter-spacing: -.025em;
}

.ca-principles-grid p {
  color: #b1c0d6;
  font-size: 1rem;
}

.ca-format-shot {
  display: block;
  width: calc(100% + 56px);
  max-width: none;
  height: auto;
  margin: -28px -28px 28px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-bottom: 1px solid #cbd5e2;
}

.ca-surface {
  overflow: hidden;
  padding: 28px;
}

.ca-surface-ico {
  display: none;
}

.ca-badge-flag {
  position: static;
  display: inline-block;
  margin-bottom: 16px;
}

.ca-control-showcase {
  background: #121b2b;
}

.ca-control-heading {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 40px;
}

.ca-control-heading .ca-lead {
  font-size: 1rem;
}

.ca-control-shot {
  margin: 0;
}

.ca-control-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid #34445f;
}

.ca-control-shot figcaption, .ca-demo-caption {
  font-size: .75rem;
  color: #9dafc9;
  padding-top: 14px;
}

.ca-dash-shot {
  margin: 0;
}

.ca-dash-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid #34445f;
}

/* Desktop presentations share the available height; dense content keeps natural flow. */
@media (min-width: 1025px) {
  :root {
    --section-y: clamp(64px, 9svh, 112px);
    --hero-top: clamp(104px, 12svh, 140px);
    --hero-bottom: clamp(24px, 4svh, 56px);
  }

  .ca-hero {
    min-height: 100svh;
    padding-top: var(--hero-top);
    padding-bottom: calc(var(--hero-bottom) + clamp(24px, 4svh, 48px));
  }

  .ca-hero .ca-display {
    font-size: clamp(2.35rem, min(4.5vw, 8svh), 4.5rem);
  }

  .ca-hero .ca-eyebrow {
    margin-bottom: 18px;
  }

  .ca-hero h1 {
    margin-bottom: clamp(18px, 3svh, 28px);
  }

  .ca-hero-sub {
    font-size: clamp(1.05rem, min(1.45vw, 2.6svh), 1.3rem);
    margin-bottom: 24px;
  }

  .ca-hero-cta {
    margin-bottom: 20px;
  }

  .ca-hero .ca-btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .ca-product-story {
    max-width: clamp(300px, calc((100svh - var(--hero-top) - var(--hero-bottom) - 136px) * 520 / 570), 600px);
  }

  .ca-section-head {
    margin-bottom: clamp(24px, 4svh, 40px);
  }

  /* Match the existing 100px anchor offset; content can grow naturally. */
  .ca-film,
  .ca-control-showcase {
    min-height: calc(100svh - 100px);
    display: flex;
    align-items: center;
  }

  .ca-film {
    padding-top: var(--section-y);
  }

  .ca-film > .ca-container,
  .ca-control-showcase > .ca-container {
    display: grid;
    grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
  }

  .ca-film-heading,
  .ca-control-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 0;
  }

  .ca-film-error {
    grid-column: 2;
    margin-top: 0;
  }

  .ca-control-shot {
    width: 100%;
    max-width: max(408px, calc((100svh - 232px) * 1600 / 1100));
    margin-inline: auto;
  }

  .ca-control-shot figcaption {
    text-align: center;
  }
}

@media (max-width: 1024px) {
  .ca-hero-grid {
    grid-template-columns: 1fr;
  }
  .ca-product-story {
    max-width: 620px;
  }
  .ca-film-heading, .ca-control-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ca-principles-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .ca-principles-grid {
    grid-template-columns: 1fr;
    margin-top: 36px;
    gap: 32px;
  }
  .ca-principles-grid h3 {
    margin: 15px 0 12px;
  }
  .ca-film {
    padding-top: 10px;
  }
  .ca-film-frame video {
    border-radius: 10px;
  }
  .ca-film-frame figcaption {
    flex-direction: column;
    gap: 8px;
  }
  .ca-control-shot img {
    border-radius: 12px;
  }
}

@media (max-width: 430px) {
  .ca-story-top {
    padding: 18px;
    font-size: .59rem;
  }
  .ca-story-caption {
    padding: 14px 18px;
    font-size: .7rem;
  }
  .ca-story-caption button {
    font-size: .6rem;
  }
  .ca-story-player {
    border-radius: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ca-story-player, .ca-story-statement span {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
}

/* Public HB offer: explicitly preparing for launch. */

.ca-demo-link {
  margin: 0 0 30px;
}

.ca-hb {
  background: var(--paper-soft);
}

.ca-hb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.ca-hb .ca-lead {
  max-width: 39ch;
}

.ca-hb-status {
  display: inline-block;
  margin-top: 24px;
  padding: 7px 13px;
  border: 1px solid #cbd5e5;
  border-radius: var(--control-radius);
  font-size: 13px;
  color: var(--l-mid);
}

.ca-hb-detail h3 {
  font-size: 24px;
  letter-spacing: -.025em;
  margin: 30px 0 14px;
}

.ca-hb-detail>p {
  color: var(--l-mid);
  font-size: 16px;
  line-height: 1.75;
  max-width: 45ch;
}

.ca-hb-diagram {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  white-space: nowrap;
}

.ca-hb-brand {
  background: var(--ink-900);
  color: white;
  padding: 20px 18px;
  border-radius: 14px;
  font-weight: 650;
}

.ca-hb-connection {
  height: 1px;
  background: #9dadc7;
  flex: 1;
  min-width: 20px;
  position: relative;
}

.ca-hb-connection::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: absolute;
  right: 0;
  top: -3px;
  background: var(--accent-on-light);
}

.ca-hb-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 28px;
}

.ca-hb-links>a:not(.ca-btn) {
  font-size: 14px;
  color: var(--accent-on-light);
  text-underline-offset: 4px;
}

@media (max-width:900px) {
  .ca-hb-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .ca-hb-diagram {
    max-width: 480px;
  }
}

@media (max-width:400px) {
  .ca-hb-diagram {
    gap: 10px;
    font-size: 12px;
  }
  .ca-hb-brand {
    padding: 17px 12px;
  }
  .ca-hb-connection {
    min-width: 12px;
  }
}
