/* Refinement pass: preserve the source composition and keep motion purposeful. */
.hero > video {
  transform: scale(calc(1.02 + var(--hero-progress, 0) * .035));
  filter: saturate(calc(.9 + var(--hero-progress, 0) * .18)) contrast(1.02);
  transition: filter .2s linear;
}

.hero-scroll-state {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.8);
  opacity: calc(1 - var(--hero-progress, 0) * 2.5);
}

.hero-scroll-state span {
  width: 28px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(calc(.22 + var(--hero-progress, 0) * .78));
}

.hero-scroll-state small { font: 7px "DM Mono", monospace; letter-spacing: .12em; }

.trusted { padding: 31px 0 31px; height: 269px; overflow: hidden; }
.trusted > p { margin: 0 auto 38px; font-size: 21px; line-height: 32px; }
.logo-marquee { height: 36px; width: 100%; margin-bottom: 29px; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.logo-track { animation: logo-loop 25s linear infinite !important; display: flex !important; width: max-content; gap: 0 !important; padding: 0 !important; }
.logo-marquee-reverse .logo-track { animation-direction: reverse !important; animation-duration: 29s !important; }
.logo-group { display: flex; flex: none; align-items: center; gap: 78px; padding-right: 78px; }
.logo-group span { flex: none; font-size: 18px; line-height: 36px; white-space: nowrap; opacity: .66; }
@keyframes logo-loop { to { transform: translate3d(-50%,0,0); } }

/* Figma node 8:2230 — 1440 × 780 diagonal marquee composition. */
.idea-map { height: 780px; min-height: 780px; padding: 0; overflow: hidden; background: #fff; }
.idea-sticky.section {
  position: relative;
  inset: auto;
  height: 780px;
  min-height: 780px;
  padding: 101px 100px 95px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  background: #fff;
  overflow: hidden;
}
.idea-sticky h2,
.idea-map h2 {
  flex: 0 0 407px;
  width: 309px;
  margin: 0;
  font-size: 36px;
  line-height: 1.36;
  letter-spacing: -.04em;
  font-weight: 400;
}
.idea-steps {
  position: relative;
  inset: auto;
  flex: 1 1 auto;
  width: auto;
  height: 584px;
  transform: none;
  margin: 0;
}
.idea-steps article {
  --base-opacity: .4;
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  opacity: var(--base-opacity);
  transform: translateY(24px);
  filter: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.16,1,.3,1), color .35s ease;
}
.idea-map.idea-in .idea-steps article { transform: translateY(0); }
.idea-steps article:nth-child(1) { --base-opacity: 1; left: 10px; top: 24px; }
.idea-steps article:nth-child(2) { left: 146.33px; top: 74px; transition-delay: 60ms; }
.idea-steps article:nth-child(3) { left: 282.67px; top: 134px; transition-delay: 120ms; }
.idea-steps article:nth-child(4) { left: 419px; top: 204px; transition-delay: 180ms; }
.idea-steps article:nth-child(5) { left: 555.33px; top: 264px; transition-delay: 240ms; }
.idea-steps article:nth-child(6) { left: 691.67px; top: 374px; transition-delay: 300ms; }
.idea-steps article b {
  display: block;
  grid-row: auto;
  color: #d78970;
  font-family: Inter, Arial, sans-serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 58px;
}
.idea-steps article:first-child b { color: #c2451c; }
.idea-steps article i {
  display: block;
  grid-row: auto;
  width: 1px;
  height: 53px;
  margin: 0;
  background: #d9d5d1;
}
.idea-steps article h3 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 400; }
.idea-steps article p { margin: 2px 0 0; font-size: 11px; line-height: 1.4; color: #8c847c; }
.idea-steps article.active,
.idea-steps article:hover { --base-opacity: 1; opacity: 1; transform: translateY(-6px) !important; }
.idea-steps article.active::after { content: none; }
.idea-steps article.past,
.idea-steps article.future { opacity: var(--base-opacity); transform: translateY(0); filter: none; }

/* Features now scroll naturally, with a quiet entrance instead of a bouncy stack. */
.feature-stack { width: min(1020px, 100%); max-width: none; }
.feature-card,
.feature-card:nth-child(n) {
  position: relative;
  top: auto;
  min-height: 630px;
  height: auto;
  margin: 0 0 32px;
  transform: none;
  transition: opacity .5s ease, transform .5s ease, box-shadow .3s ease;
}
.feature-card:not(.arrived) { opacity: 0; transform: translateY(18px); }
.feature-card.arrived { animation: none; opacity: 1; transform: none; }
.feature-card.is-behind { filter: none; box-shadow: 0 18px 50px rgba(35,33,29,.08); }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 22px 56px rgba(35,33,29,.11); }
.feature-art { height: auto; aspect-ratio: 16 / 8.2; padding: 34px 55px 0; }
.feature-art img { object-fit: contain; object-position: center bottom; }

/* The canvas is a real control surface: no simulated generation animation. */
.dashboard-window { overflow: hidden; }
.canvas-stage { position: relative; overflow: hidden; background: #e9e4de; aspect-ratio: 16 / 8.65; }
.canvas-stage > img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform-origin: center; transition: none; }
.canvas-pins { position: absolute; inset: 0; pointer-events: none; }
.canvas-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--lime);
  color: #24251c;
  display: grid;
  place-items: center;
  font: 9px "DM Mono", monospace;
  box-shadow: 0 5px 15px rgba(0,0,0,.24);
}
.canvas-add-note { position: absolute; right: 18px; top: 18px; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; padding: 9px 13px; background: rgba(22,22,21,.66); backdrop-filter: blur(12px); color: #fff; font-size: 8px; cursor: pointer; }
.canvas-add-note.active { background: var(--lime); color: #24251c; border-color: var(--lime); }
.canvas-toolbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  min-height: 66px;
  border: 0;
  border-top: 1px solid #363532;
  border-radius: 0;
  background: #1d1c1a;
  box-shadow: none;
  padding: 10px 14px;
}
.canvas-modes { display: flex; gap: 4px; }
.canvas-toolbar label { min-width: 165px; justify-content: flex-start; }
.canvas-toolbar output { color: #fff; width: 30px; }
.canvas-toolbar input { width: 92px; }
.canvas-reset { margin-left: auto; border: 0; background: transparent; color: #aaa; font-size: 8px; cursor: pointer; }
.generate-button { margin-left: 0; }
.canvas-feedback { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-top: 1px solid #e3ded7; color: #6f6962; background: #faf8f5; font-size: 8px; }
.canvas-feedback small { font-size: 7px; color: #aaa; }
.cursor-dot { display: none; }

/* Room sizing and color treatment. */
.room-panel { grid-template-columns: .78fr 1.22fr; gap: 74px; align-items: center; }
.room-copy h3 { font-size: clamp(24px, 2.1vw, 31px); max-width: 430px; }
.room-copy > p { max-width: 430px; }
.room-copy dl > div { width: 100%; max-width: 430px; }
.room-visual { padding: 9px; border: 1px solid #d6cec7; background: #e9e4de; box-shadow: 0 22px 52px rgba(57,47,40,.12); }
.room-visual:hover { transform: translateY(-4px); box-shadow: 0 27px 60px rgba(57,47,40,.16); }
.room-window-bar { background: rgba(255,255,255,.96); }
.room-image { height: auto; aspect-ratio: 4 / 3; border-radius: 0 0 13px 13px; }
.room-tabs button.active { background: #1d1c1a; box-shadow: none; }
.room-visual.changing .room-image { animation: none; }

/* Square imagery keeps the 4 × 3 atlas cells in their original aspect ratio. */
.gallery-grid { width: min(100%, 960px); max-width: none; grid-template-columns: repeat(4, 1fr); grid-auto-rows: auto; gap: 14px; }
.gallery-grid > button {
  appearance: none;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  border: 0;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease, box-shadow .3s ease;
}
.gallery-grid.gallery-in > button { opacity: 1; transform: none; }
.gallery-grid > button:hover,
.gallery-grid > button:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(30,27,24,.18); outline: 2px solid #c26749; outline-offset: 3px; }
.gallery-viewer[hidden] { display: none; }
.gallery-viewer { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(17,16,15,.82); backdrop-filter: blur(18px); padding: 6vw; }
.gallery-viewer-image { width: min(72vh, 72vw); aspect-ratio: 1; border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.gallery-close { position: absolute; top: 28px; right: 34px; border: 1px solid rgba(255,255,255,.55); width: 42px; height: 42px; border-radius: 50%; background: transparent; color: #fff; font-size: 24px; cursor: pointer; }
.gallery-viewer > p { position: absolute; bottom: 28px; color: #fff; font: 8px "DM Mono", monospace; letter-spacing: .1em; }

/* Portrait atlas is 3 × 2:3 portraits. Height-based sizing prevents stretching. */
.quote-grid.bento { grid-template-columns: 1.15fr .85fr; grid-template-rows: 284px 284px; }
.quote-grid.bento blockquote { cursor: pointer; border: 1px solid transparent; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.quote-grid.bento blockquote:hover,
.quote-grid.bento blockquote:focus-visible,
.quote-grid.bento blockquote.selected { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(35,30,27,.14); border-color: rgba(183,83,52,.5); outline: 0; }
.quote-main { display: grid !important; grid-template-columns: 43% 57%; grid-row: 1 / 3; }
.quote-main .portrait { width: 100%; height: 100%; }
.quote-main .quote-body { padding: 34px; display: flex; flex-direction: column; }
.quote-grid.bento .quote-main > p { margin: 0; }
.quote-side { grid-template-columns: 43% 57%; }
.quote-wide { grid-template-columns: 57% 43%; }
.quote-body { padding: 25px; display: flex; min-width: 0; flex-direction: column; }
.quote-body > b { color: var(--rust); font: 30px serif; line-height: .6; }
.quote-body > p { margin: 22px 0 auto; font-size: 12px; line-height: 1.5; }
.quote-body footer { padding: 0; }
.quote-body em { margin-top: 16px; color: rgba(125,74,55,.7); font: normal 7px "DM Mono", monospace; }
.portrait { background-size: auto 100%; background-repeat: no-repeat; }
.portrait-1 { background-position: left center; }
.portrait-2 { background-position: center center; }
.portrait-3 { background-position: right center; }

@media (max-width: 900px) {
  .idea-sticky.section { padding-left: 5vw; padding-right: 5vw; gap: 0; }
  .idea-sticky h2, .idea-map h2 { flex-basis: 310px; }
  .idea-steps { transform: scale(.82); transform-origin: left top; }
  .canvas-toolbar { flex-wrap: wrap; }
  .canvas-toolbar label { min-width: 150px; }
}

@media (min-width: 901px) and (max-width: 1399px) {
  .idea-sticky.section { padding-left: 6vw; padding-right: 6vw; gap: 18px; }
  .idea-sticky h2, .idea-map h2 { flex-basis: 355px; }
  .idea-steps { transform: scale(.82); transform-origin: left top; }
}

@media (max-width: 760px) {
  .hero-scroll-state { bottom: 28px; }
  .trusted { height: 220px; padding-top: 28px; }
  .trusted > p { font-size: 14px; margin-bottom: 24px; }
  .logo-marquee { margin-bottom: 20px; }
  .logo-group { gap: 44px; padding-right: 44px; }
  .logo-group span { font-size: 15px; }
  .idea-map { height: 560px; min-height: 560px; }
  .idea-sticky.section { height: 560px; min-height: 560px; padding: 54px 22px; display: block; }
  .idea-sticky h2, .idea-map h2 { width: 300px; font-size: 32px; }
  .idea-steps { position: relative; width: 720px; height: 584px; margin-top: 26px; transform: scale(.46); transform-origin: left top; display: block; }
  .idea-steps article { position: absolute; opacity: var(--base-opacity) !important; transform: translateY(0) !important; }
  .idea-steps article:nth-child(1) { left: 10px; top: 24px !important; }
  .idea-steps article:nth-child(2) { left: 146.33px; top: 74px !important; }
  .idea-steps article:nth-child(3) { left: 282.67px; top: 134px !important; }
  .idea-steps article:nth-child(4) { left: 419px; top: 204px !important; }
  .idea-steps article:nth-child(5) { left: 555.33px; top: 264px !important; }
  .idea-steps article:nth-child(6) { left: 691.67px; top: 374px !important; }
  .idea-steps article.active { opacity: 1 !important; transform: translateY(-6px) !important; }
  .feature-card, .feature-card:nth-child(n) { min-height: 0; }
  .feature-art { aspect-ratio: 16 / 10; padding: 20px 20px 0; }
  .canvas-stage { aspect-ratio: 4 / 3; }
  .canvas-toolbar label { display: flex; width: calc(50% - 8px); min-width: 0; flex-wrap: wrap; }
  .canvas-toolbar input { width: 100%; }
  .canvas-reset { margin-left: 0; }
  .canvas-feedback { height: auto; min-height: 44px; gap: 12px; }
  .canvas-feedback small { display: none; }
  .room-panel { grid-template-columns: 1fr; gap: 32px; }
  .room-image { aspect-ratio: 1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid.bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .quote-main { grid-row: auto; grid-template-columns: 42% 58%; height: 390px; }
  .quote-side, .quote-wide { height: 280px; }
  .quote-main .quote-body, .quote-body { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero > video, .idea-steps article, .gallery-grid > button { transition: none !important; }
  .logo-track { animation-play-state: paused !important; }
}
