/* Leave more scroll room for the steps while keeping the entrance brisk. */
.home-transition-tail {
  height: clamp(24px, 7svh, 72px);
}

#loop-act.journey-act {
  height: 780svh;
}

.journey-anchor {
  /* Workspace begins at 34% of the 680svh pinned distance. */
  top: calc(231.2svh + var(--nexa-topbar-height) + 12px);
}

/* Center the copy above the fold of the approaching scene, before the device. */
#loop-act .loop-sticky > .film-intro {
  z-index: 4;
  inset: 0;
  padding: var(--nexa-topbar-height) var(--gutter) 12svh;
  justify-content: center;
  align-items: center;
  gap: .18em;
  text-align: center;
  font-size: clamp(28px, 5.1vw, 76px);
  line-height: 1.12;
  letter-spacing: -.035em;
  opacity: var(--intro-opacity, 1);
  background: radial-gradient(ellipse at center, #0b0613a6 0%, transparent 68%);
  pointer-events: none;
}

.film-intro span { max-width: 25ch; text-wrap: balance; }
.film-intro span + span { font-size: .74em; color: #f1dbff; }

:root { --nexa-topbar-height: 86px; }
.topbar .logo, .topbar .logo img { width: clamp(130px, 11vw, 160px); }
.topbar nav { gap: clamp(6px, .8vw, 14px); }

.topbar nav a {
  justify-content: center;
  min-height: 44px;
  padding-inline: clamp(8px, 1.1vw, 17px);
  border: 1px solid #a855f72b;
  border-radius: 9px;
  background: #1b1722;
  color: #f5edff;
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 700;
}

.topbar nav a:is(:hover, :focus-visible) {
  border-color: #c084fc8c;
  background: #2b1e39;
  text-decoration: none;
}

#projects-panel {
  top: calc(var(--nexa-topbar-height) + 12px);
  max-height: calc(100svh - var(--nexa-topbar-height) - 28px);
}

@media (max-width: 760px) {
  :root { --nexa-topbar-height: 76px; }
  .topbar .logo, .topbar .logo img { width: 116px; }
  .topbar.menu-open nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px var(--gutter);
  }
}

@media (max-height: 550px) {
  :root { --nexa-topbar-height: 64px; }
  #loop-act .loop-sticky > .film-intro { font-size: clamp(24px, 5vw, 48px); }
}

/* Frame the workspace at a consistent logical resolution. The outer laptop
   still scales uniformly, and the same interface fills its 16:10 screen. */
body:not(.reading) .platform-surface .demo-window[data-full=true] {
  inset: 0 auto auto 0 !important;
  width: var(--workspace-width, 1120px) !important;
  height: var(--workspace-height, 700px) !important;
  transform: scale(var(--workspace-scale, 1)) !important;
  transform-origin: top left;
}

body:not(.reading) .platform-surface .demo-stage {
  padding: 24px;
}

body:not(.reading) .platform-surface .demo-panel {
  max-width: none;
}

.platform-surface .demo-heading .nexa-page-title { font-size: 28px; }
.platform-surface .demo-heading .nexa-page-subtitle { font-size: 15px; }
/* Keep all four chat messages inside the enlarged thread. */
body:not(.reading) .platform-surface .demo-conversation {
  justify-content: flex-start;
  gap: 8px;
  padding: 14px;
}

.platform-surface .bubble {
  font-size: 16px;
  padding: 9px 12px;
  max-width: 94%;
}

.platform-surface .bubble p { line-height: 1.45; }
.platform-surface .bubble small { font-size: 12px; }
.platform-surface .demo-chat-composer { font-size: 14px; }
.platform-surface .demo-context dt { font-size: 12px; }
.platform-surface .demo-context dd { font-size: 14px; }
.platform-surface .demo-sprint > strong { font-size: 15px; }
.platform-surface .plan-items h4 { font-size: 19px; }
.platform-surface .plan-items p { font-size: 14px; }

/* Fit the content to the laptop's 1120 × 700 workspace. */
.platform-surface .preview-browser {
  clip-path: none;
  opacity: calc(.8 + var(--build, 1) * .2);
}

body:not(.reading) .platform-surface .demo-heading {
  padding-block-start: 3px;
  margin-bottom: 14px;
}

body:not(.reading) .platform-surface .demo-sprint {
  padding: 6px 10px;
  gap: 5px;
}

body:not(.reading) .platform-surface .demo-sprint > strong { line-height: 1.22; }
body:not(.reading) .platform-surface .demo-sprint > i { flex: 0 0 3px; }
body:not(.reading) .platform-surface .sprint-tasks {
  gap: 3px;
  line-height: 1.25;
}

.platform-surface .sprint-tasks .icon { flex-shrink: 0; }

.platform-surface .mesa-hero {
  padding: 18px;
  gap: 18px;
}

.platform-surface .restaurant-plan {
  height: auto;
  max-height: none;
  padding: 14px;
  gap: 9px;
}

.platform-surface .restaurant-plan h5 {
  font-size: 18px;
  line-height: 1.2;
}

.platform-surface .reservation-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-surface .reservation-fields > span {
  color: var(--landing-muted);
  padding-bottom: 7px;
}

.platform-surface .reservation-fields strong {
  margin-top: 4px;
  color: var(--landing-text);
  overflow-wrap: anywhere;
}

.platform-surface .reservation-fields .icon { flex-shrink: 0; }
.platform-surface .reservation-times .chosen { color: #f3b89e; }

body:not(.reading) .platform-surface .mesa-dashboard-body {
  padding: 16px;
  gap: 12px;
}

body:not(.reading) .platform-surface .mesa-main {
  grid-template-rows: minmax(0, 1fr);
}

.platform-surface .week-chart > div {
  flex: 1;
  height: auto;
  min-height: 0;
  padding: 4px 0 0;
  gap: 6px;
}

.platform-surface .week-chart i { min-height: 0; }
.platform-surface .week-chart small { color: var(--landing-muted); }
.platform-surface .reservations > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 3px 10px;
  padding-block: 6px;
}

.platform-surface .reservations > div > strong { grid-column: 1 / -1; }
.platform-surface .reservations > div > small { width: auto; }
.platform-surface .mesa-connected { flex-shrink: 0; }

body:not(.reading) .platform-surface .demo-team-project {
  padding: 16px;
}

body:not(.reading) .platform-surface .project-metrics {
  margin-block: 11px;
  padding-block: 8px;
}

body:not(.reading) .platform-surface .delivery-checklist > span { padding-block: 6px; }
/* The completion badge has one icon, centered on both axes. */
.platform-surface .project-complete > .complete-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.platform-surface .demo-team-contact { padding-block: 5px; }
.platform-surface .demo-team-contact h3 { line-height: 1.22; }

@media (min-width: 560px) and (max-width: 1000px) and (max-height: 550px) and (pointer: coarse) {
  body:not(.reading) .platform-surface .demo-workspace {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  body:not(.reading) .platform-surface .demo-sprints { display: flex; }
}

@media (max-width: 440px) {
  .reading .platform-surface .demo-sprints {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Let Silk return as a soft atmosphere beneath the editorial copy. */
[data-silk-section] {
  isolation: isolate;
  position: relative;
  overflow: clip;
}

.silk-echo {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  filter: blur(38px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 76%, transparent 100%);
}

.capabilities .silk-echo { opacity: .28; }
.reading .silk-echo { display: none; }

/* Each project keeps its own accent and a complete product capture. */
.case-sail { --case-accent: 62 163 211; }
.case-health { --case-accent: 87 122 246; }
.case-pulse { --case-accent: 255 54 91; }

.case-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--landing-muted);
  font-size: 12px;
  font-weight: 650;
}

.case-identity img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.case .case-image {
  flex-direction: column;
  gap: 10px;
  padding: clamp(10px, 1.2vw, 20px);
  background: radial-gradient(ellipse at 50% 5%, rgb(var(--case-accent) / .19), transparent 82%), #15161b;
  border: 1px solid rgb(var(--case-accent) / .24);
  border-radius: 14px;
}

.case .case-image > img {
  width: 100%;
  max-height: 550px;
  border: 0;
  border-radius: 8px;
}

.case-product-brand {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f8fafc;
}

.case .case-product-brand img {
  display: block;
  width: auto;
  height: 19px;
  border: 0;
  border-radius: 0;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .case .case-image {
    transition: border-color .24s ease-out;
  }
  .case .case-image > img {
    transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  }
  .case:hover .case-image, .case:focus-within .case-image {
    border-color: rgb(var(--case-accent) / .55);
  }
  .case:hover .case-image > img, .case:focus-within .case-image > img {
    transform: scale(1.018);
  }
}

/* The laptop remains a preview on narrow screens. The same steps can be
   read at page size with the existing reading layout. */
.laptop-reading-toggle { display: none; }

.laptop-reading-toggle, .journey-controls button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #a855f74d;
  border-radius: 8px;
  background: #15131d;
  color: var(--landing-text);
  font: inherit;
  font-size: 13px;
}

.reading .laptop-reading-toggle {
  display: inline-flex;
  align-items: center;
  margin: 12px var(--gutter);
}

@media (max-width: 760px) and (orientation: portrait) {
  body:not(.reading, .manual-journey) .workspace-ready .laptop-reading-toggle {
    display: block;
    position: absolute;
    z-index: 4;
    inset: auto auto 12px var(--gutter);
  }
}

.manual-journey #loop-act.journey-act {
  height: auto;
  background: var(--landing-black);
}

.manual-journey .journey-anchor { top: 0; }

:is(.manual-journey, .reading) .journey-anchor { scroll-margin-top: 0; }

.manual-journey #loop-act .loop-sticky {
  position: relative;
  height: clamp(330px, calc(100svh - var(--nexa-topbar-height) - 84px), 860px);
}

.manual-journey .demo-scroll { display: none; }

.journey-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 24px;
  padding-block: 16px 4px;
}

.journey-steps {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(100%, 390px);
}

#journey-step-status {
  margin: 0;
  color: var(--landing-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.journey-controls button[aria-disabled="true"] {
  opacity: .5;
  cursor: default;
}

.journey-controls button:not([aria-disabled="true"]):is(:hover, :focus-visible),
.laptop-reading-toggle:is(:hover, :focus-visible) {
  border-color: #c084fc;
}

.journey-controls #journey-read {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.delivery.section { padding-block-start: clamp(66.5px, 8.33vw, 123.9px); }

.footer-bottom > div {
  flex-wrap: wrap;
  row-gap: 4px;
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
}

.footer-main {
  scroll-margin-top: var(--nexa-topbar-height);
}

.projects-button {
  white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 960px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: clamp(16px, 3vw, 30px);
    gap: 12px;
  }

  .topbar .logo, .topbar .logo img { width: 112px; }
  .topbar nav { justify-content: center; gap: 6px; }
  .topbar nav a { padding-inline: 8px; }
  .top-actions { gap: 4px; }
  .top-actions > .button.small { padding-inline: 12px; }
  .projects-button { padding-inline: 4px; }
}

@media (max-width: 760px) {
  .projects-button { min-width: 44px; justify-content: center; }
  .top-actions > .button.small { min-height: 44px; }
}

@media (max-width: 379px) {
  .topbar .logo, .topbar .logo img { width: 96px; }
  .top-actions > .button.small .start-arrow { display: none; }
}

@media (min-width: 761px) and (max-height: 550px) and (pointer: fine) {
  #home { padding-top: calc(var(--nexa-topbar-height) + 14px); }
  #home .hero-creation-group { margin-top: 18px; }
  #home .hero-description { margin-top: 16px; font-size: 16px; }
}
